2021年2月10日星期三

How do spring scopes work when application is used as an importable library/JAR

I have a spring boot application J. J used to be a web application in itself, but now it is not and is being imported as a library by another spring boot app X, which is a web app. X uses methods of J to do certain things and passes certain arguments - user name and email for example.

In J, I was using request scope in J for stateful beans (which were storing user name and email). I would like to know that now when J is not a web application but a library, how scopes like session and request would work here for beans of J, as these scopes work specifically with http requests and sessions. Should I use prototype instead?

https://stackoverflow.com/questions/66147798/how-do-spring-scopes-work-when-application-is-used-as-an-importable-library-jar February 11, 2021 at 10:05AM

没有评论:

发表评论