启动springboot出现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).
原因:缺少Realm类型bean
解决方案:
shiro配置添加Realm类型bean
示例:
@Bean
public Realm realm() {
TextConfigurationRealm realm = new TextConfigurationRealm();
//配置信息
return realm;
}
或 自定义realm