Description: No bean of type ‘org.apache.shiro.realm.Realm‘ found.

created at 12-16-2021 views: 30

Problem Description

When the project is all configured, we run the Shiro project and found that it cannot run successfully, and the error message is shown below.

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

Description:

No bean of type 'org.apache.shiro.realm.Realm' found.

Action:

Please create bean of type 'Realm' or add a shiro.ini in the root classpath (src/main/resources/shiro.ini) or in the META-INF folder (src/main/resources/META-INF/shiro.ini).

reason

This is because we did not configure the `INI` file

solution

Follow the prompts to create a file named shiro.ini under the resources or src/main/resources/META-INF folder. And add our user authentication information. As shown below

shiro.ini

created at:12-16-2021
edited at: 12-16-2021: