我正在使用" Mock authentication support for Spring Security"使用以下配置:
我的Config.groovy有以下条目 - >
grails.plugins.springsecurity.providerNames = [
'anonymousAuthenticationProvider',
'rememberMeAuthenticationProvider',
'daoAuthenticationProvider',
'ldapAuthProvider']
grails.plugins.springsecurity.ldap.active = false
grails.plugins.springsecurity.ldap.authorities.retrieveGroupRoles = false
grails.plugins.springsecurity.ldap.usernameMapper.userDnBase = false
//Configuration changes to accommodate plugin for mocking spring security
grails.plugins.springsecurity.mock.active = true
grails.plugins.springsecurity.mock.fullName = 'User A'
grails.plugins.springsecurity.mock.email = 'user_a@gmail.com'
grails.plugins.springsecurity.mock.username = 'user_a'
grails.plugins.springsecurity.mock.roles = ['ROLE_USER', 'ROLE_ADMIN']
grails.plugins.springsecurity.mock.load.dao = false
但是,当我运行我的集成测试(扩展spock.lang.Specification)时,我得到以下错误 - > 运行测试的致命错误:没有名为& ddapAuthProvider'已定义(注意:已过滤堆栈跟踪。使用--verbose查看整个跟踪。) org.springframework.beans.factory.NoSuchBeanDefinitionException:没有名为< ldapAuthProvider'已定义
我错过了什么?