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

线程安全问题 #2

Open
martinbob1992 opened this issue Feb 17, 2022 · 2 comments
Open

线程安全问题 #2

martinbob1992 opened this issue Feb 17, 2022 · 2 comments

Comments

@martinbob1992
Copy link

image
spring mvc采用单例模式,这里这样写会导致并发获取request的情况下request混乱问题产生。

@jyusun
Copy link

jyusun commented Feb 17, 2022 via email

@martinbob1992
Copy link
Author

而为了能正常使用这个超类,需要给所有继承了这个超类的Controller都加上注解@scope("prototype")将单例类改为多实例是非常不划算的

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

2 participants