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

后端 未结 7 1698
梦毁少年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:53

    That error, about

    Only one AsyncAnnotationBeanPostProcessor may exist within the context
    

    , can appear in one more case. I do not insist, that that must help you, maybe you really have some complicated problem, described in other posts, but no one of them helped me.

    What did help, was simple

    mvn clean
    

    , for the project somehow had created some duplicated files and those caused the problem. And a simple clean had... ehm... cleaned them.

    That situation, for example, can happen after a merge with a branch with a higher version of the project.

提交回复
热议问题