-
|
Bonjour! I have a small private project that is heavily based on the BFF tutorial for the authentication part. Now I am trying to upgrade to Spring Boot 4.0.6 and Spring-Addons 9.1.3. On the BFF server the integration tests that worked with SB3 do not build anymore. I guess I have messed the dependencies as I have tried a bunch of different combinations, and would be grateful for any advice. For this BFF server application, am I correct in that with SB4, both Error message: The problematic test code: Dependencies in Thank you all for using your time to read this! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
I see Regarding your issue, to auto-wire a Look at |
Beta Was this translation helpful? Give feedback.
-
|
Thank you @ch4mpy for a quick reply! SecurityMockServerConfigurers.java lines 258-265 here: It seems obvious that the last line will fail when Anyway, I have these annotations: As far as I can understand SB documents, this should be sufficient to autoconfigure a Any suggestions would be appreciated! |
Beta Was this translation helpful? Give feedback.
-
|
This fixed my issue:
Defining And, thank you @ch4mpy for this outstanding project! |
Beta Was this translation helpful? Give feedback.
I see
spring-boot-starter-webflux-testamong yourtestImplementationdependencies, but notspring-boot-starter-webfluxamongimplementationones. Is it intended?Regarding your issue, to auto-wire a
WebTestClientSupport, you needAddonsWebfluxTestConfto be scanned. In a regular@WebFluxTest, use@AutoConfigureAddonsWebfluxClientSecurity. In an integration test, you may just add it to your import statement:@Import({TestSecurityConf.class, AddonsWebfluxTestConf.class}).Look at
AddonsWebfluxTestConfsources to see other test beans it creates. You may also copy just theWebTestClientSupportbean definition from this source and add it to yourTestSecurityConf)