Skip to content

Problem with @WebMvcTest upgrading to Spring Boot 3.2 #180

Answered by ch4mpy
wimdeblauwe asked this question in Q&A
Discussion options

You must be logged in to vote

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

  • remove the @Qualifier("defaultJwtAuthenticationConverter"). spring-addons will back-off and your bean will be the only one in the application context
  • change @Qualifier("d…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@wimdeblauwe
Comment options

@ch4mpy
Comment options

@wimdeblauwe
Comment options

Answer selected by ch4mpy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants