Browse Source

配置定时任务

master
453530270@qq.com 2 years ago
parent
commit
ff11d2197b
  1. 2
      bctask/src/main/java/bc/mm/mis/task/BcTaskApplication.java
  2. 11
      bctask/src/main/resources/application.properties

2
bctask/src/main/java/bc/mm/mis/task/BcTaskApplication.java

@ -27,7 +27,7 @@ public class BcTaskApplication implements CommandLineRunner {
* @param args
* @throws Exception
*/
@Override
public void run(String... args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String now = sdf.format(new Date());

11
bctask/src/main/resources/application.properties

@ -1,2 +1,11 @@
# server port
server.port=9090
server.port=9090
# quartz 配置信息
org.quartz.scheduler.instanceName = BCQuartzScheduler
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 10
org.quartz.threadPool.threadPriority = 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
# https://blog.csdn.net/qq_32419139/article/details/131212271
Loading…
Cancel
Save