Action: Consider defining a bean named ‘authenticator‘ in your configuration.

created at 12-16-2021 views: 16

error description

Today Springboot integrates Shiro and throws the following error:

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method shirFilter in com.bbzd.mes.shiro.config.ShiroConfig required a bean named 'authenticator' that could not be found.


Action:

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

reason

I think it is dependency incompatibility

solution

Error reliance

<dependency>
    <groupId>org.apache.shiro</groupId>
    <artifactId>shiro-spring-boot-starter</artifactId>
    <version>1.4.0</version>
</dependency>

Change the error dependency to:

<dependency>
    <groupId>org.apache.shiro</groupId>
    <artifactId>shiro-spring</artifactId>
    <version>1.4.0</version>
</dependency>
created at:12-16-2021
edited at: 12-16-2021: