Spring MVC: @EnableScheduling needs to be redeclared for each application context [SPR-16852] #21392
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: task
A general task
Milestone
Manuel Jordan opened SPR-16852 and commented
The following is not critical, but
I have:
When
SchedulingConfig
is scanned only for theRootApplicationContext
(and known that theServletApplicationContext
must be able to use/access theRootApplicationContext
beans) my@Components
working with@Schedule
in theServletApplicationContext
does not work.The current solution is scan
SchedulingConfig
from theServletApplicationContext
Thus seems mandatory scans twice this
SchedulingConfig
from theRootApplicationContext
(consider a batch process where web is not involved) andServletApplicationContext
(considerWebsocket
, sending messages to aJMS
destination, workingSimpMessagingTemplate
)It is similar than (prior when to be fixed of course):
I am assuming this situation would be the same or reflected for a
@Configuration
class working with@EnableAsync
Affects: 4.3.17, 5.0.5
Issue Links:
@EnableAspectJAutoProxy
needs to be redeclared for each application contextReferenced from: commits b39ce80, 5935b7a
Backported to: 4.3.18
The text was updated successfully, but these errors were encountered: