2016-01-21 64 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

完美。看見了。謝謝!!! –

相關問題