在我的項目中,使用了EncryptablePropertySourcesPlaceholderConfigurer,然後爲其父「PropertiesLoaderSupport」的'Resource [] locations'屬性分配了每個我想要加載的屬性文件。我想這是我不會遇到任何錯誤的原因。
例如:
<bean id="frameworkPropertyPlaceholderConfigurer"
class="org.jasypt.spring31.properties.EncryptablePropertySourcesPlaceholderConfigurer">
<constructor-arg ref="stringEncryptor" />
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="locations">
<list>
<bean parent="frameworkConfigResourceFactoryBean">
<property name="resourceName" value="framework-config.properties" />
</bean>
<bean ................> </bean>
</list>
</property>
</bean>
而且在database-config.properties:
database.driver.class=com.mysql.jdbc.Driver
database.connection.url=${database.connection.url}
database.username=root
database.password=${database.password}
而且在filter.properties:
database.connection.url=jdbc:mysql://localhost:3306/MySQLDBName?rewriteBatchedStatements=true
database.password=root
的Java?還是其他一些技術?請添加合適的語言/技術標籤 –
您談論哪種技術? –
我正在使用java,spring .. – Nani