Spring boot: 2.4.3

When the property spring.main.lazy-initialization is set to true

This method never gets called:

org.springframework.security.config.annotation.web.configuration.SecurityReactorContextConfiguration#securityReactorContextSubscriberRegistrar

This will break org.springframework.security.oauth2.server.resource.web.reactive.function.client.ServletBearerExchangeFilterFunction the attributes will be null and a token is not added to requests.

The documentation I found doesn't state this as a possible side-effect of lazy initialization: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-lazy-initialization

Comment From: mbhave

@ls-urs-keller Could you provide a minimal sample that we can run to reproduce this behavior?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.