mitreid-connect / OpenID-Connect-Java-Spring-Server

An OpenID Connect reference implementation in Java on the Spring platform.
Other
1.47k stars 767 forks source link

Run with an embedded servlet container? #1500

Closed ianmobbs closed 4 years ago

ianmobbs commented 4 years ago

Hi,

I'm working on running the application with a Maven Overlay and I'd like to be able to run the service using Embedded Jetty or Embedded Tomcat (so I can run java -jar target/my-openid-service.war, instead of mvn jetty:run-war). Is this supported or in any way possible? The only options I'm seeing are:

1) Only deploy the server package and run that as a .jar file 2) Specify a Main-Class in the Manifest. I'm unsure of what this Main-Class should be.

Any help would be much appreciated.

Ian

jricher commented 4 years ago

Assuming you're talking about the server-webapp component, it is not set up to be an executable standalone in that way. To do that you would need to wrap it in Spring Boot or another embedded container.

ianmobbs commented 4 years ago

Thanks @jricher. Another question - I've been trying to add another route (just a simple healthcheck to get my feet wet) to the webapp by injecting a class annotated with @Controller in example-openid-connect-overlay/my-openid-connect/src/main/java/org/example/controller/HealthcheckController.java, but not having any luck actually being able to hit the endpoint. Would wrapping the webapp in Spring Boot help with that? Sorry for these basic questions, but I really appreciate your response!