springBoot yml 和 properties

加载顺序不一致,application.yml 在前,application.properties 在后。

yml 文件内容

server:
  port: 8081
spring:
  redis:
    database: 10
    host: 192.168.9.73
    port: 6379
  application:
    name: demo_01
logging:
  level:
    root: info
    com.cloud: debug
  file: /logs/${spring.application.name}.log

猜你喜欢

转载自www.cnblogs.com/hcfan/p/9840497.html