2016-01-21 60 views
0

这个问题与spring没有关系,但是使用STS工具套件或者使用spring eclipse IDE。鉴于类的以下声明Spring STS - 无法解析属性

@Configuration() 
@Import({ WebSharedConfig.class, SpringSecurityConfig.class }) 
@ComponentScan({ "com.finovera.web", "com.finovera.platformServices","com.finovera.authentication" }) 
@PropertySources(value = { @PropertySource({ "${FINOVERA_PROPERTIES}" }), 
@PropertySource(value = { "${STATIC_OVERRIDE_PROPERTIES}", }, ignoreResourceNotFound = true) }) 
@Scope("singleton") 
@EnableTransactionManagement 
public class CabinetConfig extends WebMvcConfigurationSupport { 
} 

我看到以下异常的STS插件(org.springframework.ide.eclipse.beans.core)作为属性名称传递给

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.finovera.web.config.CabinetConfig]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'FINOVERA_PROPERTIES' in string value "${FINOVERA_PROPERTIES}" 
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181) 
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:321) 

错误很简单应用程序启动时的JVM。应用程序运行时间代码工作正常,但STS不能。由于主配置扫描失败,很多功能丢失。评论出房源注解,一切正常。

如何将属性值传递给STS或说服它忽略PropertySources注释?

回答

0

我认为这是当前实施的限制。请针对:​​提交增强请求,我们可以尝试解决此问题,以用于STS和Spring IDE的下一个版本。

+0

感谢Martin,我昨天记录了一个错误STS-4303 - 但将它记录为一个错误 – user871199

+0

完美。看见了。谢谢!!! –

相关问题