1.application.yml
1.端口与全局访问前缀
server:
port: 8081
servlet:
context-path: /qianzhui
2.spring项目名、json设置全局Date格式
spring:
application:
name: 123
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
3.spring nacos配置
spring:
cloud:
nacos:
discovery:
server-addr: 192.168.23.130:8848
4.spring 日志配置
logging:
pattern:
file:
console:
## 2.bootstrap.yml
### 1.连接nacos中的配置文件的项目名以及配置中心
```yaml
spring:
application:
name: testProject
cloud:
nacos:
config:
server-addr: 192.168.23.130:8848
file-extension: yml
namespace: 805e5b5a-8930-4c9d-a3e6-f3d8cbe113e0
group: prod
标签:spring,bootstrap,nacos,server,application,yml
From: https://www.cnblogs.com/blanset/p/16834552.html