java - @ConfigurationProperties 注解的警告

标签 java spring spring-boot

我可以通过@ConfigurationProperties注释看到以下警告

使用 @ConfigurationProperties 时,建议将“spring-boot-configuration-processor”添加到类路径中以生成配置元数据

一切正常。这意味着什么?

最佳答案

如果您向“spring-boot-configuration-processor”添加可选依赖项,您的模块将保存一个在编译时生成的元数据文件,其中包含有关您的属性的详细信息。然后 IDE 可以选择它来向您显示内容辅助/自动完成。 STS、Intellij IDEA 和 Netbeans 都有这样的支持。 它是一个注释处理器,可生成有关应用程序中使用 @ConfigurationProperties 注释的类的元数据。

更多信息请点击:http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#configuration-metadata

https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#configuration-metadata-annotation-processor

关于java - @ConfigurationProperties 注解的警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55721609/

相关文章:

java - 由于我的 SpringBoot 应用程序,Swagger UI 未显示,每个端点需要 2 个查询参数

java - 递归链表反转器

java - 更简洁的 Builder 模式?

java - 加载 spring camel 上下文时出错(类型不匹配)

java - 为什么说: CharacterStream classes are used to perform the input/output for the 16-bit Unicode characters?

java - Spring 启动+安全: No Access-Control-Allow-Origin header when setting allowed origins

spring - 是否有用于 Facelets 的 Spring Security 4.x 标签库

spring - 带有 HSQLDB 的 Hibernate 4.1 给出 'data exception: string data, right truncation'

spring - 从 Spring 的 rest Controller 同时支持 application/json 和 application/x-www-form-urlencoded

java - 循环时获取 "Neither BindingResult nor plain target object for bean name ' bean name' 作为请求属性可用