Commit 75914104450ececf904f2ed4874b71ea719716f4
1 parent
ec7d95db
update
Showing
1 changed file
with
9 additions
and
0 deletions
src/main/java/com/cnlive/shenhe/ShenheApplication.java
| ... | ... | @@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory; |
| 10 | 10 | import org.springframework.beans.factory.annotation.Value; |
| 11 | 11 | import org.springframework.boot.ApplicationRunner; |
| 12 | 12 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 13 | +import org.springframework.boot.builder.SpringApplicationBuilder; | |
| 13 | 14 | import org.springframework.boot.web.servlet.FilterRegistrationBean; |
| 14 | 15 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
| 15 | 16 | import org.springframework.context.annotation.Bean; |
| ... | ... | @@ -38,6 +39,14 @@ public class ShenheApplication extends SpringBootServletInitializer { |
| 38 | 39 | //登出 |
| 39 | 40 | private static final String SERVICE_LOGINOUT = "http://test.shen.cnlive.com:82/users/logout"; |
| 40 | 41 | |
| 42 | + public static void main(String[] args) { | |
| 43 | +// SpringApplication.run(ShenheApplication.class, args); | |
| 44 | + SpringApplicationBuilder builder = new SpringApplicationBuilder(ShenheApplication.class); | |
| 45 | + builder.headless(true).run(args); | |
| 46 | + // 设置Headless模式,linux系统下 | |
| 47 | + System.setProperty("java.awt.headless", "true"); | |
| 48 | + } | |
| 49 | + | |
| 41 | 50 | |
| 42 | 51 | /** |
| 43 | 52 | * 用于实现单点登出功能 | ... | ... |