Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-boot-shiro 提示缺失 bean authenticator #56

Closed
Aaronffp opened this issue Aug 8, 2018 · 5 comments
Closed

spring-boot-shiro 提示缺失 bean authenticator #56

Aaronffp opened this issue Aug 8, 2018 · 5 comments

Comments

@Aaronffp
Copy link

Aaronffp commented Aug 8, 2018

现象:
依据提供的示例中的源码参考写了一个(仅表结构有所差异),启动时提示如下错误信息:


APPLICATION FAILED TO START


Description:

Parameter 0 of method authorizationAttributeSourceAdvisor in com.shenma.pmp.config.ShiroConfig required a bean named 'authenticator' that could not be found.

Action:

Consider defining a bean named 'authenticator' in your configuration.

存在的主要差异在表结构方面,config、dao、service、controller 一样,请问是什么原因呢?非常感谢!

@sukeyYang
Copy link

如果没猜错的话,是你在注入securityManager的时候是这么写的

@Bean public SecurityManager securityManager() {……}

改为默认的即可:
@Bean public DefaultWebSecurityManager securityManager() {……}

@bwensun
Copy link

bwensun commented Nov 3, 2018

如果没猜错的话,是你在注入securityManager的时候是这么写的

@Bean public SecurityManager securityManager() {……}

改为默认的即可:
@Bean public DefaultWebSecurityManager securityManager() {……}

你说的很对,我震惊了,居然是这个原因

@MJJKG5
Copy link

MJJKG5 commented Sep 21, 2019

被猜到了!!
能说说为什么使用DefaultWebSecurityManager类问题解决,而使用SecurityManager出现问题。
我使用的jar包是shiro-spring-boot-web-starter

@OliverSeth
Copy link

同,想知道为什么

1 similar comment
@pluveto
Copy link

pluveto commented Jul 5, 2020

同,想知道为什么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants