Autowiring request scoped beans into application scoped beans

前端 未结 3 815
孤独总比滥情好
孤独总比滥情好 2021-02-08 15:17

Is it possible to autowire a request scoped bean into an application scoped bean. i.e

I have a class RequestScopedBean:

class RequestScopedBean {
   ....         


        
3条回答
  •  梦毁少年i
    2021-02-08 16:02

    @Airwavezx the annotation equivalent is the followinng:

    @Scope( value = SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS )
    

提交回复
热议问题