Shiro Security

时间:2022-04-16 17:23:34

手动创建shiro Filter的java代码

// Factory<org.apache.shiro.mgt.SecurityManager> factory = new IniSecurityManagerFactory("classpath:shiro.ini");
// 创建SecurityManager (根据配置创建SecurityManager实例)
//org.apache.shiro.mgt.SecurityManager security = (org.apache.shiro.mgt.SecurityManager) factory.getInstance();
//SecurityUtils.setSecurityManager((org.apache.shiro.mgt.SecurityManager) security);