How can I configure persistence.xml for production? My question specifically concerns the definition of parameters such as user, password and bank url, for example.
I would like to not include this data directly in the file, but in an environment variable, for example.
However, it can be any other approach, except overwriting the file settings via the entity manager factory as was said in these questions 1 e 2
This restriction exists because my EntityManager
is injected via @PersistenceContext
. This even generated a comment
I'm using a JavaEE application with JAX-RS, Hibernate JPA and Spring MVC