Add application-dev.yaml for development

pull/137/head
johnniang 2019-03-02 16:50:49 +08:00
parent 764d5cfa4f
commit 79eeba7fbd
3 changed files with 14 additions and 4 deletions

View File

@ -14,6 +14,7 @@ import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PreDestroy;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -53,6 +54,12 @@ public class StartedListener implements ApplicationListener<ApplicationStartedEv
log.info("The scheduled task starts successfully!");
}
@PreDestroy
public void onDestroy() {
log.info("Destroyed the cron scheduler");
CronUtil.stop();
}
/**
*
*/

View File

@ -23,10 +23,10 @@ spring:
password: 123456
#MySql配置
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
# username: root
# password: 123456
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
# username: root
# password: 123456
h2:
console:
@ -62,4 +62,5 @@ logging:
level:
cc.ryanc.halo: DEBUG
org.hibernate: ERROR
web: DEBUG
file: ./logs/log.log

View File

@ -10,6 +10,8 @@ server:
session:
timeout: 86400s
spring:
devtools:
add-properties: false
output:
ansi:
enabled: always