Resolves a problem where the quartz timed task was triggered two times:
Where <Host/> tells Tomcat to load all project files under WebApps at startup,<Context/> lets Tomcat reload again (typically configuration < Context/>, mainly due to the name of the domain access will be removed from the cause of the configuration, this situation will cause the project quartz timing is triggered two times, executed two times.
<Host/> change it to autodeploy= "false" deployonstartup= "false" to prevent the Quartz timer task from being triggered two times by booting from the Tomcat server. (Of course, it can be modified according to requirements, after all, the requirements of each project are different.) )
1. The Autodeploy property value is set to False, if this is set to True, indicates that the Tomcat service is running and can monitor the files under AppBase, and if a new Web application is added, it will be released from the Web application and set to False.
2. Add deployonstartup= "False", indicating that all Web apps under the AppBase directory will not be automatically published when the Tomcat server starts.
In this case, when Tomcat is started, the app under AppBase will not be automatically released and will not be automatically appbase under boot.
Of course, there is another way to configure the network:
is in <Context/> inside modify docbase Add "/webapps" path, of course, the project access path becomes http://localhost/eugeneqiu_test, see the project name is really uncomfortable, I will not use this method.
Fixed issue where quartz timed task was triggered two times
Method 1, by changing the configuration file of Tomcat Server.xml configuration
Method 2, first extract the quartz configuration information, stored separately as a file, such as Applicationcontext-quartz.xml and then modify the Web. XML, so that the website can be loaded when the container starts. (This article does not delve into this approach)
Spring Quartz performs two issues