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
欢迎指正:haizi2014@qq.com
原文地址:https://www.cnblogs.com/hcfan/p/9840497.html