This commit is contained in:
xiangwbs
2018-04-03 22:01:27 +08:00
parent b62de24aeb
commit 61e345b240
2 changed files with 2 additions and 14 deletions
@@ -12,7 +12,6 @@ import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.crazycake.shiro.RedisCacheManager;
import org.crazycake.shiro.RedisManager;
import org.crazycake.shiro.RedisSessionDAO;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
@@ -213,18 +212,7 @@ public class ShiroConfig {
}
/**
* 自动创建代理类,若不添加,shiro注解可能不会生效
*/
@Bean
@DependsOn("lifecycleBeanPostProcessor")
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator defaultAAP = new DefaultAdvisorAutoProxyCreator();
defaultAAP.setProxyTargetClass(true);
return defaultAAP;
}
/**
* 开启shiro注解
* AOP式方法级权限检查
*
* @param securityManager
* @return
+1 -1
View File
@@ -26,7 +26,7 @@ spring:
#aop
aop:
auto: true # Add @EnableAspectJAutoProxy
proxy-target-class: false
proxy-target-class: true
#mail
mail:
host: smtp.163.com