Java Spring @Scheduled tasks executing twice

前端 未结 23 1662
清歌不尽
清歌不尽 2020-11-29 09:07

I have a simple test method here that is set to run every 5 seconds and it does, but looking at the System.out you can see it appears to be doing something odd.



        
23条回答
  •  既然无缘
    2020-11-29 09:46

    You might want to check if you are scanning components for the same package in two different contexts if your app is WEB, e.g. applicationContext.xml and then again some-servlet.xml.

提交回复
热议问题