SpringBoot基础配置

属性配置

1、修改配置

例子:

(1)修改服务器端口

server.port=80;

(2)关闭运行日志图标(banner)

spring.main.banner-mode=off

(3)设置日志相关

logging.level.root=debug

 

SpringBoot内置属性查询

https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties

官方文档中参考文档第一项:Application Properties

 

2、SpringBoot中导入对应starter后,提供对应配置属性

3、书写SpringBoot配置采用关键字+提示形式书写(不用死记)

 

posted @ 2022-11-18 16:45  Linqylin  阅读(261)  评论(0编辑  收藏  举报