I'm working in on spring boot project ( with maven) I have a file application.properties for config like this:
jdbc.username=postgres
jdbc.password=40love
In persistence.xml file instead of using the username and password like this :
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL81Dialect" />
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/postgres" />
<property name="javax.persistence.jdbc.user" value="${env.jdbc.username}" />
<property name="javax.persistence.jdbc.password" value="${env.jdbc.password}" />
</properties>
But it cannot replace username in persistence.xml. Is it posible replace that? Thanks!