-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MyRealm 中依赖 提前初始化造成 获取对象为非代理对象,造成事物注解失效 #77
Comments
3Q |
public class MyRealm extends AuthorizingRealm {
看看是否正确 |
是的 |
ok 下个版本发布 |
lexmeng
pushed a commit
to lexmeng/jeecg-boot
that referenced
this issue
Jun 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ShiroFilterFactoryBean 现了FactoryBean接口,所以它会提前被初始化。他依赖的都会提前,造成早于AnnotationAwareAspectJAutoProxyCreator 注册到 FactoryBean中,造成之前初始化的Bean 都是不是代理类。MyRealm 中的依赖 ISysPermissionService ISysUserService StringRedisTemplate RedisUtil,而ShiroFilterFactoryBean 依赖SecurityManager ,SecurityManager 依赖 MyRealm ,MyRealm 中的依赖会提前初始化,获取的是非代理对象,无法使用 @transactional @Cacheable 等注解,可以添加@lazy 延迟初始化。
The text was updated successfully, but these errors were encountered: