zyro23 / grails-spring-websocket

93 stars 28 forks source link

Implementing new Websocket Artefact handler #58

Closed davydotcom closed 6 years ago

davydotcom commented 6 years ago

This replaces the default behavior to use the Websocket Artefact type instead of scanning grails controllers as those endpoints cause performance bottlenecks and security concerns with accidental human error and action names (aka forgetting to mark methods protected).

This shaves a full 12 seconds off my application startup time.

It does not support scanning Grails Controllers anymore and is in essence a breaking change, nor does it support scanning Spring Controllers at this current time. This can be potentially adjusted to do so. Also some methods had to be copied out of spring to be able to be overridden for purposes of the afterPropertiesSet method.

A new grails helper script has also been created grails create-web-socket TestWebsocket which gets created in grails-app/websockets/pakageName/TestWebsocket.groovy

davydotcom commented 6 years ago

related to issue #57