From 6264fb84ac2f297bd238e6fd1b69081ecd2356b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E6=BC=8F=E6=B4=9E?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=8C=E6=88=90?= <> Date: Sat, 1 Nov 2025 11:50:23 +0800 Subject: [PATCH] fg --- .idea/workspace.xml | 4 +++- maven_install.sh | 1 + pom.xml | 18 ++++++++++++++++-- .../AdminClientTemperatureApplication.java | 12 +++++++++++- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7aa13b0..92105e6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,8 +5,9 @@ - + + diff --git a/maven_install.sh b/maven_install.sh index 57d969a..1f19e81 100644 --- a/maven_install.sh +++ b/maven_install.sh @@ -22,3 +22,4 @@ git config --global credential.helper store #maven查看依赖树命令 mvn dependency:tree +#mvn clean package -DskipTests diff --git a/pom.xml b/pom.xml index d6d314d..a7819cf 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.rehome admin-client-temperature 1.0.0 - jar + war admin-client-temperature admin-client-temperature @@ -26,6 +26,20 @@ org.springframework.boot spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + org.springframework.boot + spring-boot-starter-tomcat + + + + + org.springframework.boot + spring-boot-starter-undertow org.mybatis.spring.boot @@ -305,7 +319,7 @@ - ${project.artifactId} + ${project.artifactId}-kingbase org.springframework.boot diff --git a/src/main/java/com/rehome/mqttclienttemperature/AdminClientTemperatureApplication.java b/src/main/java/com/rehome/mqttclienttemperature/AdminClientTemperatureApplication.java index ab6b4c2..0414bf5 100644 --- a/src/main/java/com/rehome/mqttclienttemperature/AdminClientTemperatureApplication.java +++ b/src/main/java/com/rehome/mqttclienttemperature/AdminClientTemperatureApplication.java @@ -22,7 +22,7 @@ import java.util.Map; @EnableScheduling @EnableAsync @SpringBootApplication -public class AdminClientTemperatureApplication implements CommandLineRunner, ApplicationContextAware { +public class AdminClientTemperatureApplication extends SpringBootServletInitializer implements CommandLineRunner, ApplicationContextAware { /** * 获取Spring框架的上下文 @@ -68,4 +68,14 @@ public class AdminClientTemperatureApplication implements CommandLineRunner, App public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } + + /** + * @date 2021-05-18 09:20 + * @description: 容器配置,springboot打war包布署必须添加这个配置 为了打包springboot项目 + * @Param: SpringApplicationBuilder + */ + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { + return builder.sources(AdminClientTemperatureApplication.class); + } } \ No newline at end of file