Skip to content
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

BUG!!!ShiroFilterFactoryBean导致Realm注入的xxService以及依赖xxService的Service事务失效 #40

Open
mingchiuli opened this issue Jun 9, 2022 · 0 comments

Comments

@mingchiuli
Copy link

mingchiuli commented Jun 9, 2022

ShiroConfig中对ShiroFilterFactoryBean做了配置,而ShiroFilterFactoryBean实现了BeanPostProcessor接口,导致所有依赖AccountRealm的Service被提前初始化,递归初始化Service依赖的Service,无法受到Spring AOP的代理导致事务失效!!!

导致事务失效!!!

具体查看启动时Spring日志打印信息:

[org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:376] INFO - Bean 'userServiceImpl' of type [com.markerhub.service.impl.UserServiceImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

BUG处理方法是在依赖的Service上加@lazy开启懒加载模式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant