首页 > 解决方案 > 为什么 Intellij 会向我显示有关我的弹簧配置文件的警告?

问题描述

我已经开始尝试使用 Spring 配置文件,从那时起,我偶尔会在一些文件顶部收到警告(我认为这是一个警告?),我注意到这些文件不受 Spring 管理 在此处输入图像描述

我已经用谷歌搜索了,但我没有找到任何信息,我看到了什么“什么”,为什么我在某些文件中看到它而不是在其他文件中,以及如何处理它。

如果有帮助,这是我的 application-properties.yml:

spring:
  datasource:
    password: root
    username: root
    url: jdbc:mysql://localhost:3306/chatt?serverTimezone=UTC
  jpa:
    hibernate.ddl-auto: update
    properties:
      hibernate:
        dialect: org.hibernate.dialect.MySQL8Dialect
  profiles:
    active:
      - dev

标签: springintellij-idea

解决方案


这不是警告,而是通过顶部编辑器面板在活动配置文件之间切换的功能,它记录在 IntelliJ IDEA 帮助中

更改活动配置文件


推荐阅读