I need to modify hibernate.cfg.x ml with encrypted password by running my own java class.
when I run my java class the above hibernate.cfg.x ml file property "connection.pas sword" needs to be modified with encrypted password. Modified xml file will be like below
Advance thanks to help me in solving my problem any one..
Code:
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="dialect">
org.hibernate.dialect.MySQLDialect
</property> <property name="connection.url">
jdbc:mysql://localhost:3306/dbname
</property> <property name="connection.username">user</property> <property name="connection.password">user123</property> <property name="connection.driver_class">
com.mysql.jdbc.Driver
</property> <property name="myeclipse.connection.profile">
driver
</property> </session-factory> </hibernate-configuration>
Code:
<hibernate-configuration> <session-factory>
........
........
<property name="connection.username">user</property> <property name="connection.password">
abdl#56$!+-xdESQ@_%fE
</property>
........
........
</session-factory> </hibernate-configuration>