I have an API server based on Grails 6.2.3 running...
# questions
c
I have an API server based on Grails 6.2.3 running on JDK17. I should allow access to the API via a token and I would like to use it for an Angular FE app. Security is via a token and I allow users to login to access their data in Angular. I have used Spring Security in the past and want to leverage this again. Although a bit dated I am following the steps shown in this post - https://www.djamware.com/post/58a53b5180aca748640ce350/securing-rest-api-with-grails-3-and-spring-security-rest I have added the following two imports for security 1. implementation "org.grails.pluginsspring security core6.1.2" 2. implementation "org.grails.pluginsspring security rest6.0.0-M1" Unfortunately I go round in circles with dependencies and errors such as the following, Can anyone help me progress and solve this? Have others got Spring Security 6 working with Grails 6.X as I suggest above? Could not resolve all files for configuration ':runtimeClasspath'. > Could not resolve org.codehaus.groovygroovy bom3.0.13. Required by: project : > org.grailsgrails core6.2.3 > io.micronaut.springmicronaut spring context4.5.1 > io.micronautmicronaut bom3.10.4 project : > org.grailsgrails core6.2.3 > io.micronaut.springmicronaut spring context4.5.1 > io.micronautmicronaut bom3.10.4 > io.micronaut.groovymicronaut groovy bom3.4.0 > No matching variant of org.apache.groovygroovy bom4.0.24 was found. The consumer was configured to find a runtime of a library compatible with Java 17, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally but: - Variant 'apiElements' capability org.apache.groovygroovy bom4.0.24: - Incompatible because this component declares an API of a platform and the consumer needed a runtime of a library - Other compatible attributes: - Doesn't say anything about how its dependencies are found (required its dependencies declared externally) - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs) - Doesn't say anything about its target Java version (required compatibility with Java 17) - Doesn't say anything about its elements (required them packaged as a jar)
l
I have a Grails-6 app with Spring-security and token-based auth with these dependences (rest is v5 instead of v6):
Copy code
implementation 'org.grails.plugins:spring-security-core:6.1.2'
implementation("org.grails.plugins:spring-security-rest:5.0.1")
👍 1