Closed bilak closed 5 months ago
Thanks for the report but it's not clear why you believe this to be a Spring Boot bug, particularly when you've referenced a Spring Framework issue as being related. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
@wilkinsona sorry didn't realised that it's framework's issue. I'm attaching the project which simulates the circular dependency. websocket-issue.zip
The cycle is happening because you're sub-classing DelegatingWebSocketMessageBrokerConfiguration
and, in the same @Configuration
class, you're defining a bean that a WebSocketMessageBrokerConfigurer
consumes. As the javadoc of DelegatingWebSocketMessageBrokerConfiguration
suggests, this is atypical and you should use @EnableWebSocketMessageBroker
instead. If you need to sub-class DelegatingWebSocketMessageBrokerConfiguration
, you shouldn't define additional beans in the same class. As you have seen here, it's a brittle arrangement that will break as soon as you define a bean that's consumed by a WebSocketMessageBrokerConfigurer
as is now the case due to https://github.com/spring-projects/spring-boot/pull/39611.
Hello, after upgrade from
3.2.3
to3.3.0
without any changes we have issue with websocket config.the
PerformanceMonitoringService
has constructor like thisand we are overriding the
DelegatingWebSocketMessageBrokerConfiguration
withwhen I remove that method application starts...however it's weird that this started to happen without any other change. I've also seen this issue which seems to be related however I don't use such method to set task scheduler.