You cannot use placeholders or replacement variables in persistence.xml
like you are trying to do. The properties you pass to JpaPersistModule
are an atlernative to defining <property>
elements in persistence.xml
.
For example instead of having this line in persitence.xml
:
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
You can define the same property inside of your *.properties
file:
javax.persistence.jdbc.driver=com.mysql.jdbc.Driver
So you should remove this invalid line:
<property name="javax.persistence.jdbc.user" value="${hibernate.username}" />
and add an entry like this in your properties file:
javax.persistence.jdbc.user=my_username