pom.xml
@@ -18,7 +18,7 @@ </properties> <dependencies> <dependency> <!--dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.3</version> @@ -32,6 +32,24 @@ <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.3</version> </dependency--> <!--log4j--> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.3</version> <exclusions> <exclusion> <artifactId>slf4j-api</artifactId> <groupId>org.slf4j</groupId> </exclusion> </exclusions> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -61,7 +79,7 @@ <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> <!-- <dependency>添加Swagger依赖 <!--<dependency>添加Swagger依赖 <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.7.0</version> @@ -70,14 +88,12 @@ <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.7.0</version> </dependency> --> <!-- <dependency> </dependency>--> <!--<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>3.0.0</version> </dependency> --> </dependency>--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> @@ -141,14 +157,12 @@ <artifactId>knife4j-spring-boot-starter</artifactId> <version>3.0.3</version> </dependency> <!-- 二维空间谓词和函数的Java API --> <dependency> <groupId>org.locationtech.jts</groupId> <artifactId>jts-core</artifactId> <version>1.18.2</version> </dependency> <!-- geotools依赖 --> <dependency> <groupId>org.geotools</groupId> src/main/java/com/yssh/run/InitDataRunner.java
@@ -1,6 +1,8 @@ package com.yssh.run; import com.yssh.utils.CacheUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -13,8 +15,7 @@ @Component public class InitDataRunner implements ApplicationRunner { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); @Autowired private ICommonService commonService; @@ -32,5 +33,7 @@ } //读取dat数据 commonService.readDatData(); logger.info("***************** 系统启动完毕 *****************" + "\n"); } } src/main/java/com/yssh/scheduled/ReadCsvTask.java
@@ -6,6 +6,8 @@ import java.util.Calendar; import java.util.Date; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -27,7 +29,7 @@ @Component public class ReadCsvTask { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); @Autowired private CsvFilePathConfig csvFilePathConfig; src/main/java/com/yssh/service/impl/AlertConfigServiceImpl.java
@@ -2,6 +2,8 @@ import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -16,8 +18,8 @@ @Service public class AlertConfigServiceImpl implements IAlertConfigService { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); @Autowired private AlertConfigMapper alertConfigMapper; src/main/java/com/yssh/service/impl/AsyncServiceImpl.java
@@ -3,6 +3,8 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; @@ -14,7 +16,7 @@ @Service public class AsyncServiceImpl implements IAsyncService { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); @Override src/main/java/com/yssh/service/impl/CommonServiceImpl.java
@@ -10,6 +10,8 @@ import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -25,8 +27,8 @@ @Service public class CommonServiceImpl implements ICommonService { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); private static final String TABLE_SCHEMA = "yssh"; src/main/java/com/yssh/service/impl/ExpPointServerImpl.java
@@ -7,6 +7,8 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.geotools.geojson.geom.GeometryJSON; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; @@ -30,7 +32,7 @@ @Service public class ExpPointServerImpl implements IExpPointServer { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); @Autowired private ExpPointMapper expPointMapper; src/main/java/com/yssh/service/impl/ForecastAnalyseServiceImpl.java
@@ -6,6 +6,8 @@ import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -27,7 +29,7 @@ @Service public class ForecastAnalyseServiceImpl implements IForecastAnalyseService{ protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); @Autowired private ICommonService commonService; src/main/java/com/yssh/service/impl/SuYuanServiceImpl.java
@@ -10,6 +10,8 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -41,7 +43,7 @@ @Service public class SuYuanServiceImpl implements ISuYuanService { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); @Resource private SuYuanMapper suYuanMapper; src/main/java/com/yssh/service/impl/WarningAnalyseServiceImpl.java
@@ -10,6 +10,8 @@ import java.util.Map; import java.util.concurrent.CountDownLatch; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -39,7 +41,7 @@ @Service public class WarningAnalyseServiceImpl implements IWarningAnalyseService { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); @Resource private WarningDetailMapper warningDetailMapper; src/main/java/com/yssh/utils/CsvParser.java
@@ -3,6 +3,8 @@ import java.util.ArrayList; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -12,7 +14,7 @@ public class CsvParser extends AbstractCsvFileParser<SuYuan>{ protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Log logger = LogFactory.getLog(this.getClass()); /** * 每隔3000条存储数据库,然后清理list ,方便内存回收 */ src/main/resources/application.yml
@@ -29,9 +29,7 @@ # 日志配置 logging: level: com.yssh: info org.springframework: warn config: classpath:logback.xml #MyBatis配置 mybatis: src/main/resources/logback.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- scan 配置文件如果发生改变,将会被重新加载 scanPeriod 检测间隔时间--> <configuration scan="true" scanPeriod="60 seconds" debug="false"> <contextName>LFServer</contextName> <contextName>yssh</contextName> <!-- 文件名称 --> <property name="log.name.info" value="info" />