Skip to content

ScheduledAnnotationBeanPostProcessor does not support Duration syntax [SPR-15455] #20016

Closed
@spring-projects-issues

Description

@spring-projects-issues

Misagh Moayyed opened SPR-15455 and commented

The ScheduledAnnotationBeanPostProcessor component is not able to parse and support the duration syntax. (PT20S).

In order to support this, one may have to configure a StringValueResolver on ScheduledAnnotationBeanPostProcessor but there is no clear path to how that might be injected into ScheduledAnnotationBeanPostProcessor. Given how SchedulingConfiguration creates the ScheduledAnnotationBeanPostProcessor bean, it seems like the StringValueResolver instance is always hardcoded.

Received error is:

Initialization of bean failed; nested exception is java.lang.IllegalStateException: Encountered invalid @Scheduled method 'run': Invalid initialDelayString value "PT10S" - cannot parse into integer>

Affects: 4.3.7

Issue Links:

Referenced from: commits 13c7354

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions