Enable WebSocket endpoint with config property

Prior to this commit, the WebSocket endpoint (MVC or WebFlux) would be
enabled by default. In the case of MVC, the presence of
`spring-websocket` and the required dependencies was an additional hint
that could enable/disable this support depending on the application.

This commit changes the websocket path configuration so that it doesn't
hold a default value anymore. Configuring this property will trigger the
WebSocket support.

Right now developers cannot configure it to be the same as the
`spring.graphql.path`, but this will be solved in #30.

This commit also revisits the configuration properties namespace for
clarity, moving the websocket bits under their own section.

Closes gh-31
This commit is contained in:
Brian Clozel
2021-02-02 15:27:00 +01:00
parent 5696b8cead
commit 36121f338f
5 changed files with 82 additions and 48 deletions

View File

@@ -1,3 +1,4 @@
spring.graphql.websocket.path=/graphql/websocket
management.endpoints.web.exposure.include=health,metrics,info
logging.level.org.springframework.web=debug
logging.level.org.springframework.http=debug