简体   繁体   中英

Grails - uninstalling Spring Security Core

What is the correct way to uninstall spring-security-core plugin completely? I'm working on a Grails app that no longer needs a login and I'd like to remove it.

Even though I have uninstalled it via:

grails uninstall-plugin spring-security-core

Plugin [spring-security-core-1.1.3] is installed, but was not found in the application's metadata, do you want to uninstall? [y,n] My choice doesn't seem to effect anything.

I keep getting message "Configuring Spring Security..." when starting application.

uninstall-plugin should work, but you can do it manually. Edit application.properties and remove the line for the plugin, then delete the directory under $HOME/.grails/<grails version>/projects/<your project>/plugins . Then run grails clean to remove any old classes.

In general this will work, as long as the plugin doesn't do any work in its _Uninstall.groovy script, which is the case for Spring Security Core (it's empty).

You should also make sure you clean up any references to Spring Security beans that you may have used. For example, if you are injected springSecurityService into your controllers/services/etc to retrieve the currently logged in user - you will now find missing beans on startup/null pointer exceptions

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