Jelajahi Sumber

打war包配置

chenw 6 tahun lalu
induk
melakukan
11babebe48

+ 8 - 0
bi-server/pom.xml

@@ -43,6 +43,14 @@
       <groupId>com.auth0</groupId>
       <artifactId>java-jwt</artifactId>
     </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-tomcat</artifactId>
+      <!--打包的时候可以不用包进去,别的设施会提供。事实上该依赖理论上可以参与编译,测试,运行等周期。
+          相当于compile,但是打包阶段做了exclude操作-->
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 
   <build>

+ 17 - 0
bi-server/src/main/java/com/usoftchina/bi/server/SpringbootStartApplication.java

@@ -0,0 +1,17 @@
+package com.usoftchina.bi.server;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+/**
+ * @Author chenwei
+ * @Date 2019-04-08
+ */
+public class SpringbootStartApplication extends SpringBootServletInitializer {
+
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder applicationBuilder){
+        return applicationBuilder.sources(Application.class);
+    }
+
+}