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

发布时间:2020-07-28 04:26:41 作者:dahua012
来源:网络 阅读:140

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

本节深入介绍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

推荐阅读:
  1. 再见 Spring Boot 1.X,Spring Boot 2.X 走向舞台中心
  2. Spring Boot 2.X 实战教程(7)构建配置

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

spring boot 2.x 实战教程 spring boo bo

上一篇:SqlHelper 拿来主义--逐步完善

下一篇:EXCEL表格文字填充及冻结处理

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》