Back to project page bike-friend.
The source code is released under:
GNU General Public License
If you think the Android project bike-friend listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.lemoulinstudio.bikefriend.webapp.conf; //from w w w.j a v a 2 s. com import javax.annotation.PreDestroy; import org.quartz.Scheduler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.stereotype.Component; /** * * @author Vincent Cantin */ @Component public class ShutdownHook { @Autowired private MongoTemplate db; @Autowired private Scheduler scheduler; @PreDestroy public void destroy() throws Exception { scheduler.shutdown(true); db.getDb().getMongo().close(); } }