简体   繁体   中英

spring-security-core:3.0.0.M1 plugin builds ok in grails 3.0.8 but not 3.1.0.RC1

As far as I can tell, the spring-security-core:3.0.0.M1 plugin doesn't build in 3.1.0.RC1.

The 3.1.0.RC1 stack trace states

Unable to start embedded Tomcat 
FAILURE: Build failed with an exception
...        
* What went wrong:
Execution failed for task ':main:bootRun'.
> Process 'command '/opt/java/jdk1.8.0_60/bin/java'' finished with non-zero exit value 1

If I include the 3.2.9 jars as suggested here Grails 3.1.0_M2 - Spring-Security-Core 3.0.0.M1 Error the 3.1.0.RC1 build gives a different stack trace:

ERROR grails.boot.GrailsApp - Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityProperties' defined in class path resource [org/springframework/boot/autoconfigure/security/SecurityFilterAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.security.SecurityProperties]: Factory method 'securityProperties' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/config/http/SessionCreationPolicy
...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.security.SecurityProperties]: Factory method 'securityProperties' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/config/http/SessionCreationPolicy

https://github.com/grails-plugins/grails-spring-security-core/issues/401

and btw: spring-security-core-3.0.0 has been released.

The workaround described above works in 3.1.0.RC1 with the spring-security-core:3.0.0 plugin. Requestmaps are required instead of a map of staticRules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM