Closed OlgaMaciaszek closed 1 year ago
I went through the same problem when I updated my project to spring boot 3 (PR).
The workaround worked for me, thanks.
@OlgaMaciaszek Any progress on this issue?
I'm not sure it is correct to move the issue here. ResourceServerTokenRelayAutoConfiguration is, looking at the property, mvc oriented and depends on classes from web-mvc (like WebMvcConfigurer
) but is only checking for GenericWebApplicationContext
(web) through the ConditionalOnWebApplication. For me, it seems better that ResourceServerTokenRelayAutoConfiguration
has also a @ConditionalOnClass(WebMvcConfigurer.class)
to ensure that there is indeed a web-mvc classpath present.
Now, looking at what is in that ResourceServerTokenRelayAutoConfiguration
class..., it doesn't seems to do anything useful. All the code that could do any useful work is commented out :open_mouth: :thinking: :wink:
Adding that additional class check could fix the issue and being such a small fix, can be included in the upcoming release. We are currently upgrading our internal libraries to Spring Boot 3.x and also facing the missing class issue :disappointed:
Looking into it now.
This is a bug in Commons. Moving it there. Will provide a fix.
@Fyro-Ing commented on Tue Mar 14 2023
When using Spring boot 3.0 with jersey (not mvc) with spring cloud open feign, start failed
Spring cloud open feign include org.springframework.cloud:spring-cloud-commons with a default config for web mvc
https://github.com/spring-cloud/spring-cloud-commons/blob/8ec45e03b00f3ad96bbc03a86390ed029364bb89/spring-cloud-commons/src/main/java/org/springframework/cloud/commons/security/ResourceServerTokenRelayAutoConfiguration.java#L58
To reproduce : run starter
https://start.spring.io/#!type=gradle-project&language=java&platformVersion=3.0.4&packaging=jar&jvmVersion=17&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&dependencies=lombok,cloud-feign,jersey
Workaround : set "spring.cloud.mvc.token-relay.enabled" at false