在服务器上启动后,Spring启动会停止

时间:2016-07-15 15:20:35

标签: java linux spring spring-boot

当我尝试在服务器上部署jar文件时,它已成功部署,然后在Spring启动应用程序开始执行后执行startup.sh文件,但执行后的日志服务器不再响应。

[2016-07-15 11:01:38.714] boot - 14956  INFO [main] --- TomcatEmbeddedServletContainer: Tomcat started on port(s): 8084 (http)
[2016-07-15 11:01:38.723] boot - 14956  INFO [main] --- Application: Started Application in 64.717 seconds (JVM running for 67.138)
[2016-07-15 11:01:44.688] boot - 14956  INFO [Thread-4] --- AnnotationConfigEmbeddedWebApplicationContext: Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@64375c2a: startup date [Fri Jul 15 11:00:38 EDT 2016]; root of context hierarchy
[2016-07-15 11:01:44.692] boot - 14956  INFO [Thread-4] --- DefaultLifecycleProcessor: Stopping beans in phase 0
[2016-07-15 11:01:44.752] boot - 14956  INFO [Thread-4] --- AnnotationMBeanExporter: Unregistering JMX-exposed beans on shutdown
[2016-07-15 11:01:44.810] boot - 14956  INFO [Thread-4] --- LocalContainerEntityManagerFactoryBean: Closing JPA EntityManagerFactory for persistence unit 'default'

此处还附有截图。

enter image description here

请指南, 感谢。

1 个答案:

答案 0 :(得分:4)

如果您使用Maven,请将此添加到您的pom.xml

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

它应该有用。