|
@@ -1,25 +1,30 @@
|
|
|
package com.example.nngkxxdp;
|
|
|
|
|
|
-import org.apache.catalina.connector.Connector;
|
|
|
+import com.example.nngkxxdp.task.HandleTask;
|
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.CommandLineRunner;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
-import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
|
|
import org.springframework.boot.web.servlet.ServletComponentScan;
|
|
|
-import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
|
|
-import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
|
|
@SpringBootApplication
|
|
|
@EnableScheduling
|
|
|
@ServletComponentScan
|
|
|
@MapperScan({"com.example.nngkxxdp.dao", "com.example.nngkxxdp.program.dao"})
|
|
|
-public class NngkxxdpApplication {
|
|
|
+public class NngkxxdpApplication implements CommandLineRunner {
|
|
|
//
|
|
|
+ @Autowired
|
|
|
+ private HandleTask handleTask;
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
SpringApplication.run(NngkxxdpApplication.class, args);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public void run(String... args) throws Exception {
|
|
|
+ // 加载今日的办件量
|
|
|
+ handleTask.loadDailyCount();
|
|
|
+ }
|
|
|
}
|