Closed tomBold closed 6 years ago
I think if you try grails run-app
then it should work. The problem is with the Gradle bootRun
task for this particular Grails version I think.
You may want to try upgrading to a newer Grails version like 3.1.2 and see if it helps.
Thanks for the response :)
The problem was that in a plugin profile project, Spring DSL code should be in:
src \ main \ groovy \ pluginName \ pluginNamePlugin.groovy
Closure doWithSpring() {
{ ->
securityCorsFilter(SpringSecurityCorsFilter)
myFilterDeregistrationBean(FilterRegistrationBean) {
filter = ref('securityCorsFilter')
enabled = false
}
and NOT in the:
grails-app \ conf \ spring \ resources.groovy
Anyway, The solution works only for the login issue.
Hey, There's a problem with the Spring Security where the login endpoint url /api/login returns "405 Method Not Allowed" error on CORS preflight 'OPTIONS' requests. so i try this solution - to apply the SpringSecurityCorsFilter from the grails3-cors-interceptor plugin to the Spring Security REST login url: grails3-cors-interceptor-spring-security-rest-sample-app
I am running bootRun task using Spring Security and i am getting the following error:
How can I resolve this error?
| Grails Version: 3.1.16 | Groovy Version: 2.4.7 | JVM Version: 1.8.0_151
build.gradle:
conf/spring/resources.groovy:
application.groovy:
'bootRun --stacktrace':