首页 > 编程语言 > 详细

Spring Boot 2.X 实战教程(10)构建系统

时间:2019-08-01 02:43:44      阅读:92      评论:0      收藏:0      [点我收藏+]
技术分享图片

本节深入介绍Spring Boot的详细信息。

  1. SpringApplication
    SpringApplication类提供了一个方便的方式来引导该从开始Spring应用程序main()的方法。

10.1启动失败
如果您的应用程序无法启动,例如,如果您在端口上启动Web应用程序8080并且该端口已在使用中,您应该会看到类似于以下消息的内容:


APPLICATION FAILED TO START


?

Description:

?

Embedded servlet container failed to start. Port 8080 was already in use.

?

Action:

?

Identify and stop the process that‘s listening on port 8080 or configure this application to listen on another port.

?

为此,需要为

org.springframework.boot.autoconfigure.logging.conditionEvaluationReportLoggingListener

启用debug属性或启用DEBUG日志记录。

例如,如果您使用运行应用程序java -jar,则可以debug按如下方式启用该属性:

$ java -jar myproject-0.0.1-SNAPSHOT.jar --debug

10.2自定义横幅
可以通过向banner.txt类路径添加文件或将spring.banner.location属性设置为此类文件的位置来更改启动时打印的横幅。

横幅可以在http://patorjk.com/software/taag/网站免费制作。

?

如有疑问,请观看视频:https://edu.51cto.com/course/19005.html

Spring Boot 2.X 实战教程(10)构建系统

原文:https://blog.51cto.com/14464197/2425129

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!