1,在项目的“src/main/resources/META-INF/”下新建"additional-spring-configuration-metadata.json"文件,并在其中声明配置属性的元数据

{
  "properties": [
    {
      "name": "cn.coreqi",
      "type": "java.lang.String",
      "description": "测试配置属性元数据"
    }
  ]
}

2,在application.yml or application.properties 中使用

为SpringBoot声明配置属性的元数据

相关文章:

  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2021-09-24
  • 2021-08-07
  • 2021-12-14
  • 2022-12-23
相关资源
相似解决方案