resteasy / resteasy-spring-boot

Apache License 2.0
124 stars 51 forks source link

ResteasyEmbeddedServletInitializer is not triggered and the app does not get deployed #243

Closed AlexandrSokolov closed 1 year ago

AlexandrSokolov commented 1 year ago

Hallo,

Spring Boot is a new tech stack for me, so my question might make no sense.

I am trying to use the last version of resteasy that supports jax rs with spring boot. It is:

      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-spring-boot-starter</artifactId>
      <version>4.9.2.Final</version>
      <scope>runtime</scope>
    </dependency>

When I use the 2.7.12 version of spring boot, everything works fine, I see in the console information about the application registration:

17:10:36.359 [main] INFO org.jboss.resteasy.springboot.ResteasyEmbeddedServletInitializer Finding JAX-RS Application classes
17:10:36.361 [main] INFO org.jboss.resteasy.springboot.ResteasyEmbeddedServletInitializer Property resteasy.jaxrs.app.registration has been set to property
17:10:36.362 [main] INFO org.jboss.resteasy.springboot.ResteasyEmbeddedServletInitializer Property resteasy.jaxrs.app.classes has been set to com.example.jaxrs_resteasy.rest.config.JaxRsConfiguration
17:10:36.362 [main] INFO org.jboss.resteasy.springboot.ResteasyEmbeddedServletInitializer JAX-RS Application class found: com.example.jaxrs_resteasy.rest.config.JaxRsConfiguration
...
17:10:37.148 [main] INFO org.jboss.resteasy.resteasy_jaxrs.i18n RESTEASY002225: Deploying javax.ws.rs.core.Application: class com.example.jaxrs_resteasy.rest.config.JaxRsConfiguration

The application gets deployed and everything works fine.

As soon as I try to updat spring boot to the next major 3.0.0 version, I see nothing about ResteasyEmbeddedServletInitializer, as a result the application does not get deployed.

Probably it is not possible at all to mix jax rs + resteasy with 3.x version of Spring Boot.

Could you please help. We have lots of jax rs based applications, we need to migrate them to Spring Boot, but we want to minimuze the effort and keep using the up-to-date version of Spring Boot.

liweinan commented 1 year ago

@AlexandrSokolov The resteasy-spring-boot 4.x is not compatible with spring-boot 3.x, please use resteasy-spring-boot 6.x, which uses spring-boot 3.x

liweinan commented 1 year ago

I assume this question is solved, please reopen if there are problems.