JDBC « cfg « JPA Q&A





1. Passing JDBC url from Maven to hibernate.cfg.xml    stackoverflow.com

I have a hibernate.cfg.xml with the JDBC Url configured thus:

<property name="hibernate.connection.url">jdbc:mysql://${server.hostname}:3306/dsm?zeroDateTimeBehavior=convertToNull&amp;jdbcCompliantTruncation=true&amp;autoReconnect=true</property>
Those & are required (instead of just &) in order to avoid the exception: The reference to entity "jdbcCompliantTruncation" must end ...

2. variables in hibernate.cfg.xml file    java-forums.org

...