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 @@
-
+
+
@@ -194,6 +195,7 @@
+
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