Problem with @WebMvcTest upgrading to Spring Boot 3.2 #180
-
I have a working Spring Boot 3.1 project that uses
My security config class looks similar to this:
Things I tried:
Are there any other things I can try? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
First, good job! you are exposing the authentication converter as a bean, which is now a requirement to use Do you really intend to use several JWT authentication converters? If not, you have several options. But if yes, then you are in a case I did not anticipate (and for which I have to think of a solution). Hopefully, there is a very high probability that you are using only one authentication converter and what you can do depends on your dependencies. If using
|
Beta Was this translation helpful? Give feedback.
First, good job! you are exposing the authentication converter as a bean, which is now a requirement to use
@WithJwt
and@WithMockJwtAuth
.Do you really intend to use several JWT authentication converters?
If not, you have several options. But if yes, then you are in a case I did not anticipate (and for which I have to think of a solution).
Hopefully, there is a very high probability that you are using only one authentication converter and what you can do depends on your dependencies.
If using
spring-addons-starter-oidc
@Qualifier("defaultJwtAuthenticationConverter")
. spring-addons will back-off and your bean will be the only one in the application context@Qualifier("d…