• 请不要在回答技术问题时复制粘贴 AI 生成的内容
nutting
V2EX  ›  程序员

springboot 这几个配置文件的优先级是啥

  •  
  •   nutting · Oct 25, 2021 · 1087 views
    This topic created in 1674 days ago, the information mentioned may be changed or developed.
    1 、application.properties
    2 、jvm -Dspring.profiles.active=xxx 所对应的 application-xxx.properties
    3 、1 里面又写了 spring.profiles.active=yyy 对应的 application-yyy.properties
    4 、1 里面又写了 spring.profiles.include=zzz 对应的 application-zzz.properties

    上述同时存在的情况
    Kimen
        1
    Kimen  
       Oct 25, 2021
    2 > 1
    2 相当于是使用外部命令修改了 1 中的 spring.profiles.active 的值
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1247 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 17:35 · PVG 01:35 · LAX 10:35 · JFK 13:35
    ♥ Do have faith in what you're doing.