The security manager does not implement the WebSecurityManager interface.

问题:

Shrio异常FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanInitializationException: The security manager does not implement the WebSecurityManager interface.

修改为:

    @Bean
    public DefaultWebSecurityManager securityManager() {
        DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager();
        defaultWebSecurityManager.setRealm(getShiroReal());
        return defaultWebSecurityManager;
    }

不是DefaultSecurityManager 应改为DefaultWebSecurityManager类型

posted on 2021-12-13 10:26  jav-a-  阅读(39)  评论(0编辑  收藏  举报