fllmoyu пре 4 година
родитељ
комит
4e1126b579
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8 1
      web/src/main/java/com/jpsoft/bus/SmartBusServerApplication.java

+ 8 - 1
web/src/main/java/com/jpsoft/bus/SmartBusServerApplication.java

@@ -3,6 +3,8 @@ package com.jpsoft.bus;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
@@ -12,10 +14,15 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 @EnableScheduling
 @EnableAsync
 @MapperScan("com.jpsoft.bus.**.dao")
-public class SmartBusServerApplication {
+public class SmartBusServerApplication extends SpringBootServletInitializer {
 
     public static void main(String[] args) {
         SpringApplication.run(SmartBusServerApplication.class, args);
     }
 
+
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
+        return builder.sources(SmartBusServerApplication.class);
+    }
 }