持久性.xml对于Hibernate供应商
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了持久性.xml对于Hibernate供应商相关的知识,希望对你有一定的参考价值。
this goes under src/main/resource/META-INF/persistence.xml
<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="default"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <properties> <!-- Auto detect annotation model classes --> <property name="hibernate.archive.autodetection" value="class"/> <!-- Datasource --> <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/> <property name="hibernate.connection.username" value="root"/> <property name="hibernate.connection.password" value=""/> <property name="hibernate.connection.url" value="jdbc:mysql://localhost/myhibernatejpa_dev"/> </properties> </persistence-unit> </persistence>
以上是关于持久性.xml对于Hibernate供应商的主要内容,如果未能解决你的问题,请参考以下文章