@Scheduled task runs twice on bean with target-class scoped proxy (when injected) [SPR-17166] #21702
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Markus Malkusch opened SPR-17166 and commented
When a proxied bean has a
@Scheduled
annotation, that task is executed twice as if there would be two beans. As a user I would expect that a proxied bean still behaves and acts as there would be only one bean. I would expect the task to be executed only once.If you run the example, you notice two outputs every second, while I would expect only one output per second.
Affects: 4.3.18, 5.0.8
Reference URL: spring-attic/spring-framework-issues#182
Issue Links:
Backported to: 4.3.19
The text was updated successfully, but these errors were encountered: