springboot application-prod.yaml配置不生效

我这两个配置文件,一个是单纯的application.yml,里面指定了profiles.active=prod

就是application-prod.yml文件

这里面有个配置是file-path: D:\A.xlsx,用这个配置打成了jar包运行了

然后把file-path改成了file-path: D:\B.xlsx,再打成jar包的时候,@Value取出来的一直是A,B的配置一直不生效,实在没办法了我把file-path改成file-path1就好了

敢问各位大佬这是怎么回事啊,难道jar包在电脑哪里还有缓存吗

application.yml

spring:
  application:
    name: aaa
  profiles:
    active: prod
eureka:
  client:
    service-url:
      defaultZone: http://localhost:8761/eureka/
  instance:
    prefer-ip-address: true

application-prod.yml

server:
  port: 8080
  name: aaa
spring:
  mail:
    excel:
      schedule:
        cron: 0 20 8 * * ?
      dm:
        file-path: D:\A.xlsx
        # file-path: D:\B.xlsx
    port: 25

  jpa:
    hibernate:
      primary-dialect: org.hibernate.dialect.SQLServer2012Dialect
      secondary-dialect: org.hibernate.dialect.MySQL5Dialect
    open-in-view: true
    show-sql: false
    database-platform:

mybatis:
  type-aliases-package: com.aaa.bbb.po.mybatis
  mapper-locations: classpath:generator/*.xml
  configuration.map-underscore-to-camel-case: true

logging:
  config: classpath:logback.xml
file:
  upload-path: D://temp-rainy//

 

可以把你的配置都贴出来看下