Open nytins opened 4 years ago
Hi @nytins - I have not tried to run a JAX-RS application inside SpringBoot. Do you have some sample code I can test with?
Hi @sapessi
I really want to use Jersey for JAX-RS but within Spring boot too.
You can in any Spring boot setup depend on spring jersey starter jar. Check this link https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-jersey
I have a small sample which is a bit old here: https://github.com/Lucas3oo/jersey-spring
Hi, I was able to reproduce the issue by following https://docs.spring.io/spring-boot/docs/current/reference/html/web.html#web.servlet.jersey and applying it to the Spring Boot 2 Petstore.
aws-serverless-java-container-jersey isn't used in this scenario and that's why Jersey fails with an NPE (WebComponent isn't initialized as org.glassfish.jersey.servlet.ServletContainer.init was never called).
I think to make it work we need to combine the functionalities of aws-serverless-java-container-springboot2 and aws-serverless-java-container-jersey.
Scenario
Trying to run a Spring Boot with Jersey api
Expected behavior
Returns successful response
Actual behavior
Returns 502 Bad Gateway error
Steps to reproduce
Full log output