zhang-arvin opened a new pull request, #4501: URL: https://github.com/apache/streampark/pull/4501
## What changes were proposed in this pull request Make the WebSocket `ServerEndpointExporter` bean conditional on the `websocket.enabled` property (default: `true`), so that the application can start gracefully when the `javax.websocket.server.ServerContainer` is not available. ## Why are the changes needed? When `flink-shaded-hadoop-3-uber` jar is placed in the `lib/` directory, it conflicts with the embedded server's WebSocket implementation, causing the `ServerContainer` to be unavailable. This results in the application failing to start with: ``` java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available ``` This fix makes the WebSocket support optional, allowing users to disable WebSocket by setting `websocket.enabled=false` when they encounter classpath conflicts. Fix: #3907 ## How was this patch tested? - Manual verification: The `@ConditionalOnProperty` annotation is a standard Spring Boot mechanism that is widely used in the project. - The existing behavior is preserved: when `websocket.enabled` is not set (or set to `true`), the `ServerEndpointExporter` bean is created as before. - When `websocket.enabled=false`, the bean is not created, and the application starts without WebSocket support. The `MessageServiceImpl.push()` method already handles the case where WebSocket is unavailable via try-catch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
