Spring's @Scheduled error : Only one AsyncAnnotationBeanPostProcessor may exist within the context

后端 未结 7 1725
梦毁少年i
梦毁少年i 2020-12-06 04:50

I am trying Spring 3\'s @Scheduled annotation . Here is my configuration (app.xml) :




        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 04:59

    This happens when spring parses the text twice in a config XML.

    For me this was happening because both applicationContext-root.xml and applicationContext-where-annotation-driven-is-specififed.xml were imported in my WEB.xml in section.

    Leaving only applicationContext-root.xml in WEB.xml solved the issue.

提交回复
热议问题