I am new here, I used this site to look for answers for a long time, but this is the first time I would like to ask a question. I want to deploy my Spring (not Spring Boot) application using Heroku. I found a very nice tutorial (https://github.com/Abdallah-Abdelazim/yt-heroku-demo/blob/master/README.txt), but it only shows how to do that with a Spring Boot application. His application.properties file looks like this:
spring.datasource.url=${JDBC_DATABASE_URL}
spring.datasource.username=${JDBC_DATABASE_USERNAME}
spring.datasource.password=${JDBC_DATABASE_PASSWORD}
spring.jpa.show-sql=false
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=create
I think that what I should do is to edit my persistence.xml accordingly. I did something like this, but it didn't work:
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="passwordsPersistenceUnit">
<properties>
<property name="javax.persistence.jdbc.url"
value="${JDBC_DATABASE_URL}"/>
<property name="javax.persistence.jdbc.user" value="${JDBC_DATABASE_USERNAME}"/>
<property name="javax.persistence.jdbc.password" value="${JDBC_DATABASE_PASSWORD}"/>
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
<property name="hibernate.enable_lazy_load_no_trans" value="true"/>
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.hbm2ddl.auto" value="update" />
</properties>
</persistence-unit>
</persistence>
How can I change it to make it work? Thank you very much in advance.