spring boot 启动后自动停止

spring boot 启动后不报错,自动停止:

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

2020-02-15 23:34:40.634  INFO 25351 --- [  restartedMain] com.battleonline.demo.DemoApplication    : Starting DemoApplication on abc-PC with PID 25351 (/home/abc/Desktop/battle/battle_java/target/classes started by abc in /home/abc/Desktop/xxx/xxxx_java)
2020-02-15 23:34:40.636  INFO 25351 --- [  restartedMain] com.battleonline.demo.DemoApplication    : No active profile set, falling back to default profiles: default
2020-02-15 23:34:40.680  INFO 25351 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-02-15 23:34:41.062  INFO 25351 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2020-02-15 23:34:41.064  INFO 25351 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2020-02-15 23:34:41.088  INFO 25351 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 13ms. Found 0 Redis repository interfaces.
2020-02-15 23:34:41.702  INFO 25351 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2020-02-15 23:34:41.724  INFO 25351 --- [  restartedMain] com.battleonline.demo.DemoApplication    : Started DemoApplication in 1.316 seconds (JVM running for 1.704)

Process finished with exit code 0

问题在于缺少依赖,在pom.xml里添加:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容