There was a problem testing the Shiro framework
Configuration error: No realms have been configured! One or more realms must be present to execute an authentication attempt.
Configuration error: no fields are configured! One or more domains must exist to perform authentication attempts.
I’ve been looking for it for a long time. Some people on the Internet say yes
<property name="realms"> or <property name="authenticator" ref="authenticator" />
Wrong order
But not solved
Finally found
@Bean
public DefaultWebSecurityManager getDefaultWebSecurityManager(@Qualifier("userRealm") UserRealm userRealm){
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
//Associate UserRealm, UserRealm cannot be obtained directly at this time, skills are required
securityManager.setRealm(userRealm);
return new DefaultWebSecurityManager();
}
When the object is returned, a new one is created incorrectly, and the object passed into user realm is not returned
Similar Posts:
- [Solved] Access denied for user ‘Administrator’@’localhost’ (using password: YES)
- uniapp Use picker Error: Error in render: “TypeError: Cannot read property ‘XXX’ of undefined”
- ”Cannot read property ‘addEventListener’ of null“
- Bad owner or permissions on .ssh/config [How to Solve]
- How to Solve the login error of Spring + Shiro CacheManager
- [Solved] hive beeline Connect Error: User:*** is not allowed to impersonate
- Hive initialization metadata error [How to Solve]
- [Solved] Spring introduces the properties variable Error: org.springframework.beans.TypeMismatchException…
- [Solved] mapper.xml Error: java.lang.AbstractMethodError: Method oracle/jdbc/driver/OracleResultSetImpl.getNString(Ljava/lang/String;)Ljava/lang/String; is abstract,
- How to Solve Hibernate error: No CurrentSessionContext configured!