Closed antondelpiero closed 6 years ago
try aligning the spring-security-config
/spring-security-messaging
versions with the spring-security-core
version pulled in by the grails spring-security plugin (or rather defined by the spring-boot bom), i.e. 4.2.x
.
compile "org.springframework.security:spring-security-config"
compile "org.springframework.security:spring-security-messaging"
(leaving out spring-security-web
as that is already a dependency of the spring-security-core plugin).
depending on your setup, if you get any startup error related to boot autoconfiguration, you might have to exclude some auto-configuration classes, e.g. by putting this onto your Application
class:
@EnableAutoConfiguration(exclude = [SecurityFilterAutoConfiguration, SpringBootWebSecurityConfiguration])
after that, you should be able to use a @Configuration
bean extending AbstractSecurityWebSocketMessageBrokerConfigurer
.
Thank you very much, it works. Would you mind updating the doc?
the docs are correct. the issue you were facing is just that you are using the spring-security-core grails plugin. the example in the docs is not. but sure, if you feel that is misleading, feel free to pull-request a hint reg. the grails spring-security-core plugin to the "misc" section at the bottom of the readme.
glad you got it working!
Hi there,
I need a little help. I create a new REST Grails 3 app with this plugins:
without the three last plugin I can start the app, but I need to secure the communication therefore the last 3 plugins.