2016-05-13 69 views
0

我有一個名爲'finman'的Spring項目。Spring:使用systemEnvironment變量找到具有屬性的文件夾

The directory structure

正如你可以在圖像上看到屬性的文件夾(名爲「配置」)是在同一級別爲「SRC」。所以,我需要找到使用

systemEnvironment['FINMAN_ROOT'] 

的代碼片段從「彈簧mvc.xml」負責該資源包的位置該路徑:

<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource" 
     p:cacheSeconds="60" 
     p:defaultEncoding="UTF-8"> 
    <property name="basenames" value="file:///#{systemEnvironment['FINMAN_ROOT']}/config/messages/app"/> 
</bean> 

的問題是,我不知道如何設置該變量。

回答

相關問題