0

My Java Servlet application currently has the database connection parameters hard-coded in the persistence.xml file like this:

<properties>
  <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/XXX?useEncoding=true&amp;characterEncoding=UTF-8"/>
  <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
  <property name="javax.persistence.jdbc.user" value="XXX"/>
  <property name="javax.persistence.jdbc.password" value="XXX"/>
  <property name="eclipselink.ddl-generation" value="create-tables"/>
</properties>

I'd like to move those out to a separate configuration file so that users can change them on their own. What's the way to do that?

geschema
  • 2,464
  • 4
  • 30
  • 41

0 Answers0