korzystam jednak z jasypt, ale mi to w ogole nie dziala... integruje ze springiem:
Kopiuj
<bean id="environmentVariablesConfiguration"
class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
<property name="algorithm" value="PBEWithMD5AndDES" />
<property name="password" value="ALA" /> //tak na razie :P
</bean>
<bean id="configurationEncryptor"
class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
<property name="config" ref="environmentVariablesConfiguration" />
</bean>
<bean id="propertyConfigurer"
class="org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer">
<constructor-arg ref="configurationEncryptor" />
<property name="locations">
<list>
<value>classpath:conf/main.properties</value>
<value>classpath:conf/addition.properties</value>
</list>
</property>
</bean>
<bean id="myProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:conf/main.properties</value>
<value>classpath:conf/addition.properties</value>
</list>
</property>
</bean>
</beans>
zaszyfrowalem recznie w konsoli wszystkie hasla i wprowadzilem do properties z odpowiednm prefiksem.
Rozumiem, ze odwolania do hasel z innych properties, jasypt zalatwi automatycznie ?
W jednej klasie potrzebuje hasel, to wstrzykuje sobie - propertyConfigurer (na bank porpawnie wstrzyknelo) i mam wrazenie ze raz dziala, a raz nie...
czy o czyms zapomnialem ?