Springboot应用程序无法在现有的Tomcat上完全启动

时间:2019-08-13 20:08:20

标签: java spring-boot tomcat

我有一个运行正常的springboot应用程序,它在Java 1.8中构建

我遵循springboot文档进行创建战争,并将其部署在Tomcat服务器中。

我在本地的IntelliJ中成功启动并测试了该应用程序:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.6.RELEASE)

2019-08-13 14:44:07.801  INFO 10824 --- [on(3)-127.0.0.1] com.oaa.cos.web.Application         : Starting Application v0.0.33-SNAPSHOT on NBL000197 with PID 10824 (C:\Users\10067726\Documents\apache-tomcat-9.0.22\webapps\cosw\WEB-INF\classes started by 10067726 in C:\Users\10067726\Documents\apache-tomcat-9.0.22\bin)
2019-08-13 14:44:07.841  INFO 10824 --- [on(3)-127.0.0.1] com.oaa.cos.web.Application         : No active profile set, falling back to default profiles: default
2019-08-13 14:44:14.017  INFO 10824 --- [on(3)-127.0.0.1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 5885 ms
13-Aug-2019 14:44:18.011 AVERTISSEMENT [RMI TCP Connection(3)-127.0.0.1] javax.xml.soap.FactoryFinder.find Using deprecated META-INF/services mechanism with non-standard property: javax.xml.soap.MetaFactory. Property javax.xml.soap.SAAJMetaFactory should be used instead.
2019-08-13 14:44:26.385  INFO 10824 --- [on(3)-127.0.0.1] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-08-13 14:44:27.240  INFO 10824 --- [on(3)-127.0.0.1] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index
2019-08-13 14:44:27.687  INFO 10824 --- [on(3)-127.0.0.1] com.oaa.cos.web.Application         : Started Application in 23.395 seconds (JVM running for 49.022)

我想将战争部署在已经可以进行其他战争的现有服务器实例中的现有服务器上。

启动实例时,它似乎在结束之前就停止了...

它永远不会结束,并且应用程序不会响应:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.6.RELEASE)

2019-08-13 14:53:34.993  INFO 11239 --- [           main] com.oaa.cos.web.Application         : Starting Application v0.0.33-SNAPSHT on dfrlmasoatc01.int.com with PID 11239 (/home1/tomcat9-multiharden/instances/default/webapps/EdgeCustomerOfferStorageWeb/WEB-INFclasses started by tomcat9 in /)
2019-08-13 14:53:35.005  INFO 11239 --- [           main] com.oaa.cos.web.Application         : No active profile set, falling backto default profiles: default
2019-08-13 14:53:36.659  INFO 11239 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialzation completed in 1591 ms

我已经检查了以下几点:

  • 我的应用程序扩展了SpringBootServletInitializer
  • 我在提供的入门tomcat依赖项中
  • 该战争的名称为“ EdgeCustomerOfferStorageWeb.war”,实例端口为10080,因此我使用:http://server:10080/EdgeCustomerOfferStorageWeb/ 它不响应,永远不会结束加载。 Servlet是3. +,因此不需要web.xml

我怎么知道此步骤之后发生了什么以及为什么我的应用程序没有真正部署? 如何访问tomcat管理器界面? 您是否真的认为可以部署该应用程序,并且日志不完整可能使我在这里弄错了?

1 个答案:

答案 0 :(得分:0)

我找到了问题。 将日志级别放入我的实例的setenv.sh中: -Dlogging.level.org.springframework =调试

我看到应用程序在等待特定的bean创建。 就我而言,该bean实例化了一个wsdl url的soap客户。 网址不正确,因此Bean无法连接到它。

但是我不明白一件事:为什么tomcat没有默认超时或错误?为何以前可能部署过的同一场战争无法正常进行? Tomcat阻止实例中的每个应用程序,而其中一个无法部署?