我编写了简单的Spring Boot应用程序,添加了从spring教程复制的pom并构建了jar文件。在Windows应用程序启动正常,但当我在Linux上打开jar(CentOS Linux版本7.2.1511)应用冻结:
...something
2016-04-20 12:10:33.535 INFO 25587 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2016-04-20 12:10:33.543 INFO 25587 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-04-20 12:10:33.544 INFO 25587 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-04-20 12:10:33.544 INFO 25587 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-04-20 12:10:33.544 INFO 25587 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
大约需要7-8分钟才能继续。 我在Windows 7上有热点,在centos上有openjdk。 (如果重要的话)
Linux: java -version
openjdk version "1.8.0_77"
OpenJDK Runtime Environment (build 1.8.0_77-b03)
OpenJDK 64-Bit Server VM (build 25.77-b03, mixed mode)
Windows: java -version
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)
你们有什么想法是什么原因?提前谢谢..
答案 0 :(得分:4)
在Atlassian网站上找到的解决方法(不仅仅是那里)
替代方法是使用参数运行java:
StopWatch