diff --git a/pom.xml b/pom.xml index b284715..b4cc137 100644 --- a/pom.xml +++ b/pom.xml @@ -71,11 +71,6 @@ org.springframework.boot spring-boot-starter-webflux - - org.springframework.boot - spring-boot-starter-test - test - org.springframework.boot spring-boot-starter diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index 88c1756..fd9303c 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -86,7 +86,7 @@ public class FirePointServiceImpl implements FirePointService { firePointEntity.setAddTime(DateTimeUtil.dateTimeToString(LocalDateTime.now())); firePointEntity.setFireType("0"); log.info("-------发现新火点"); - log.info("---------------开始进行实时通讯,将检测到的火点传给前端"); + /*log.info("---------------开始进行实时通讯,将检测到的火点传给前端"); Map map = new HashMap(3); map.put("countyCode",firePointQo.getCountyCode()); map.put("countyName",firePointQo.getCountyName()); @@ -101,7 +101,7 @@ public class FirePointServiceImpl implements FirePointService { map1.put("fire",map); String websocket = JSON.toJSONString(map1); // 将监测到的火点信息返给前端 - WebSocketServer.broadInfo(websocket); + WebSocketServer.broadInfo(websocket);*/ return firePointDao.save(firePointEntity); } diff --git a/src/main/java/com/xkrs/utils/PhotoUtil.java b/src/main/java/com/xkrs/utils/PhotoUtil.java index ecf1462..021805a 100644 --- a/src/main/java/com/xkrs/utils/PhotoUtil.java +++ b/src/main/java/com/xkrs/utils/PhotoUtil.java @@ -79,14 +79,14 @@ public class PhotoUtil { //uuid生成新的文件名 newName = UUID.randomUUID().toString() + suffix; //将图片保存到本地/usr/etc/images/Folder - //File file1 = new File("/home/web/wf-fire-service/forestTaskImage/"); - File file1 = new File("E:/file/work/image/"); + File file1 = new File("/home/sxy/image/firePointImage/"); + //File file1 = new File("E:/file/work/image/"); if (!file1.exists()) { file1.mkdirs(); } - //String path = "/home/web/wf-fire-service/forestTaskImage/" + newName; - String path = "E:/file/work/image/" + newName; - String uploadPaths = "/" + newName; + String path = "/home/sxy/image/firePointImage/" + newName; + //String path = "E:/file/work/image/" + newName; + String uploadPaths = "/firePointImage/" + newName; //实现上传 file.transferTo(new File(path)); FireTaskPhoto fireTaskPhoto = new FireTaskPhoto(); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 238054a..f7f0d92 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +1,4 @@ -server.port = 6466 +server.port = 6700 ## 数据源配置 spring.datasource.url = jdbc:postgresql://192.168.2.9:5432/fire_point @@ -24,7 +24,7 @@ spring.datasource.hikari.validation-timeout = 3000 ## Spring Data JPA 配置 spring.jpa.database = POSTGRESQL spring.jpa.database-platform = org.hibernate.dialect.PostgreSQLDialect -spring.jpa.show-sql = true +spring.jpa.show-sql = false # 指定 ddl mode (none, validate, create, create-drop, update) spring.jpa.hibernate.ddl-auto = update # 命名策略 diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index 1c812e2..a2982c7 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -11,8 +11,8 @@ - - + + diff --git a/src/test/java/com/xkrs/FirePointApplicationTests.java b/src/test/java/com/xkrs/FirePointApplicationTests.java deleted file mode 100644 index db9ac83..0000000 --- a/src/test/java/com/xkrs/FirePointApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xkrs; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class FirePointApplicationTests { - - @Test - void contextLoads() { - } - -}