java - "is an unknown property": custom properties in Spring's application. 属性

标签 java eclipse spring

抱歉,如果这是一件微不足道的事情,我正在研究一个废弃的项目并尝试将自定义属性添加到项目 application.properties 文件中。

这些属性实际上工作正常(即它们在执行 @Value("${foo.config.someValue"}) 时被正确解析)但是 Eclipse 坚持告诉我这个:

enter image description here

按 Tab 键根本没有任何作用。

我怎样才能让它消失?我可以在某处定义自定义属性吗?或者这可能根本不是添加自定义配置属性的方法?

最佳答案

STS 3.5.4 ,您应该能够摆脱此警告,并通过在 @ConfigurationProperties bean 上使用 java-doc 自动生成 configuration meta-data 将其替换为有用的“悬停”文本.您应该能够使用 application.properties 或自 3.7.0 以来执行此操作, application.yml, (但到目前为止,我都无法使用它)。

关于java - "is an unknown property": custom properties in Spring's application. 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31857598/

相关文章:

eclipse - 在 Eclipse 中运行 Jason 应用程序

Spring JPA : The column name ** was not found in this ResultSet

java - 错误 : "java.sql.SQLSyntaxErrorException: Table ' db_example. 表'不存在”即使 Hibernate 说该表已创建

java - 干净的架构/MVP : Using different repositories for different models. 可以吗?

java - 在没有新对象实例的情况下使用 try-with-resources 是错误的形式吗?

Java - 动态加载类

java - 删除 switch 语句中的编辑

java - Eclipse - 我应该在导出 APK 之前清理项目吗?

c++ - Eclipse CDT : Symbol 'cout' could not be resolved

spring - 从单元测试中指定一个 spring bean xml 文件