Commit 5b767a4c authored by 张俊's avatar 张俊

添加日志

parent 5e707c49
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<groupId>net.cdkj.gjj</groupId> <groupId>net.cdkj.gjj</groupId>
<artifactId>InternalLogic</artifactId> <artifactId>InternalLogic</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>war</packaging>
<name>InternalLogic</name> <name>InternalLogic</name>
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
......
...@@ -34,8 +34,8 @@ public class AlarmTask { ...@@ -34,8 +34,8 @@ public class AlarmTask {
/** /**
* 第一次延迟(initialDelay)?秒后执行,之后按fixedDelay的规则每?秒执行一次 * 第一次延迟(initialDelay)?秒后执行,之后按fixedDelay的规则每?秒执行一次
*/ */
// @Scheduled(initialDelay = 5 * 1000, fixedDelay = 60 * 1000) @Scheduled(initialDelay = 5 * 1000, fixedDelayString = "${dwkhPullTaskDelay}")
public void run3() { public void dwkhPullTask() {
log.debug("第一个接口开始时间:{}", InternalUtils.getCurrentTime()); log.debug("第一个接口开始时间:{}", InternalUtils.getCurrentTime());
try { try {
providentFundServicesController.gjjxtfwjk(); providentFundServicesController.gjjxtfwjk();
...@@ -49,21 +49,21 @@ public class AlarmTask { ...@@ -49,21 +49,21 @@ public class AlarmTask {
/** /**
* 第一次延迟(initialDelay)?秒后执行,之后按fixedDelay的规则每?秒执行一次 * 第一次延迟(initialDelay)?秒后执行,之后按fixedDelay的规则每?秒执行一次
*/ */
// @Scheduled(initialDelay = 20 * 1000, fixedDelay = 60 * 1000) @Scheduled(initialDelay = 20 * 1000, fixedDelayString = "${dwkhPushTaskDelay}")
public void run4() { public void dwkhPushTask() {
log.debug("第二个接口开始时间:{}", InternalUtils.getCurrentTime()); log.debug("第二个接口开始时间:{}", InternalUtils.getCurrentTime());
providentFundServicesController.BusinessProcessing(); providentFundServicesController.BusinessProcessing();
} }
@Scheduled(initialDelay = 40 * 1000, fixedDelay = 60 * 1000) @Scheduled(initialDelay = 40 * 1000, fixedDelayString = "${dwxxbgPushTaskDelay}")
public void dwxxbgPushTask() { public void dwxxbgPushTask() {
log.debug("dwxxbgPushTask 开始时间:{}", InternalUtils.getCurrentTime()); log.debug("dwxxbgPushTask 开始时间:{}", InternalUtils.getCurrentTime());
deptInfoUpdateController.dwxxbgPush(); deptInfoUpdateController.dwxxbgPush();
} }
@Scheduled(initialDelay = 60 * 1000, fixedDelay = 60 * 1000) @Scheduled(initialDelay = 60 * 1000, fixedDelayString = "${dwxxbgPullTaskDelay}")
public void dwxxbgPullTask() { public void dwxxbgPullTask() {
log.debug("dwxxbgPullTask 开始时间:{}", InternalUtils.getCurrentTime()); log.debug("dwxxbgPullTask 开始时间:{}", InternalUtils.getCurrentTime());
deptInfoUpdateController.dwxxbgPull(); deptInfoUpdateController.dwxxbgPull();
......
...@@ -61,7 +61,6 @@ public class ProvidentFundServicesController { ...@@ -61,7 +61,6 @@ public class ProvidentFundServicesController {
@ResponseBody @ResponseBody
@PostMapping("ProvidentFundServices") @PostMapping("ProvidentFundServices")
public String ProvidentFundServices() { public String ProvidentFundServices() {
Properties prop = PropertyqUtil.getConfig("application.properties");
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
if ("1".equals(timetype)) {// 表示正式环境 if ("1".equals(timetype)) {// 表示正式环境
jsonObject.put("startTime", currenttime(0));// 正式环境 jsonObject.put("startTime", currenttime(0));// 正式环境
...@@ -181,7 +180,6 @@ public class ProvidentFundServicesController { ...@@ -181,7 +180,6 @@ public class ProvidentFundServicesController {
@ResponseBody @ResponseBody
@PostMapping("gjjxtfwjk") @PostMapping("gjjxtfwjk")
public void gjjxtfwjk() throws Exception { public void gjjxtfwjk() throws Exception {
Properties prop = PropertyqUtil.getConfig("application.properties");
// 1.调用公积金系统服务接口方法,请求前置机,让前置机请求市监接口,拿到市监返回的开户信息json数据,经过前置机zip解压返回给本内置机处理 // 1.调用公积金系统服务接口方法,请求前置机,让前置机请求市监接口,拿到市监返回的开户信息json数据,经过前置机zip解压返回给本内置机处理
String jsoninfom = ProvidentFundServices(); String jsoninfom = ProvidentFundServices();
System.out.println("拿到第一个接口返回的第三方数据,准备调第一个存储过程" + jsoninfom); System.out.println("拿到第一个接口返回的第三方数据,准备调第一个存储过程" + jsoninfom);
...@@ -518,7 +516,6 @@ public class ProvidentFundServicesController { ...@@ -518,7 +516,6 @@ public class ProvidentFundServicesController {
@ResponseBody @ResponseBody
@PostMapping("zjbmfhywtosj") @PostMapping("zjbmfhywtosj")
public List<BusinessProcessing> zjbmfhywtosj() throws Exception { public List<BusinessProcessing> zjbmfhywtosj() throws Exception {
Properties prop = PropertyqUtil.getConfig("application.properties");
// 1.调用oracle存储过程,拿到业务办理进度数据 // 1.调用oracle存储过程,拿到业务办理进度数据
Connection connection = dataSource.getConnection(); Connection connection = dataSource.getConnection();
// 得到预编译的Statement对象 // 得到预编译的Statement对象
...@@ -583,7 +580,6 @@ public class ProvidentFundServicesController { ...@@ -583,7 +580,6 @@ public class ProvidentFundServicesController {
public void zjbmfhywtosjHX(String uscc, Integer value) throws Exception { public void zjbmfhywtosjHX(String uscc, Integer value) throws Exception {
Properties prop = PropertyqUtil.getConfig("application.properties");
// 1.调用oracle存储过程,拿到业务办理进度数据 // 1.调用oracle存储过程,拿到业务办理进度数据
// 加载数据库驱动 // 加载数据库驱动
Connection connection = dataSource.getConnection(); Connection connection = dataSource.getConnection();
......
...@@ -8,6 +8,7 @@ startTime:20230201 00:00:00 ...@@ -8,6 +8,7 @@ startTime:20230201 00:00:00
#?????????? #??????????
endTime:20230208 23:00:00 endTime:20230208 23:00:00
#数据库
#正式环境 #正式环境
#url:2NiJQAsT5i5vcdRA4+QoL0OxDje63w09kf/upD6cZocEy3IvgPXj3BdymdZCw0I0vnYI/K8K+PTYJrRjv6xbqA== #url:2NiJQAsT5i5vcdRA4+QoL0OxDje63w09kf/upD6cZocEy3IvgPXj3BdymdZCw0I0vnYI/K8K+PTYJrRjv6xbqA==
#user:7MSN/YEwcQpKaVmXkrQtI5zBlPm6ThDA #user:7MSN/YEwcQpKaVmXkrQtI5zBlPm6ThDA
...@@ -21,11 +22,17 @@ password:ENC(PI2/xdOsEObL0YZlfGfQnyiJeYUw/90FePU+sO4EDjU=) ...@@ -21,11 +22,17 @@ password:ENC(PI2/xdOsEObL0YZlfGfQnyiJeYUw/90FePU+sO4EDjU=)
#user:GJJ80 #user:GJJ80
#password:GJJ80_Hg41RG #password:GJJ80_Hg41RG
# 前置服务URL # 前置服务URL
#frontEndProcessorServer:http://192.168.1.252:8888 #frontEndProcessorServer:http://192.168.1.252:8888
frontEndProcessorServer:http://127.0.0.1:8081 frontEndProcessorServer:http://127.0.0.1:8081
# 定时任务
dwkhPullTaskDelay:60000
dwkhPushTaskDelay:60000
dwxxbgPushTaskDelay:60000 dwxxbgPushTaskDelay:60000
dwxxbgPullTaskDelay:60000 dwxxbgPullTaskDelay:60000
# 日志配置
logging.config:classpath:logback-spring.xml
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<!-- 日志存放路径 --> <!-- 日志存放路径 -->
<property name="log.path" value="logs"/> <property name="log.path" value="C:/logs"/>
<!-- 日志输出格式 --> <!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/> <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment