Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- conf/application.conf:
- db {
- default.driver=com.mysql.jdbc.Driver
- default.url="jdbc:mysql://127.0.0.1/project?characterEncoding=UTF-8"
- default.user=user
- default.password="password"
- default.jndiName=DefaultDS
- default.logSql=true
- }
- jpa.default=defaultPersistenceUnit
- //-----------------------------------------------------------------------
- build.sbt:
- libraryDependencies ++= Seq(
- javaJpa,
- "org.hibernate" % "hibernate-entitymanager" % "5.2.8.Final"
- )
- //-----------------------------------------------------------------------
- conf/META-INF/persistence.xml:
- <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="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
- <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
- <non-jta-data-source>DefaultDS</non-jta-data-source>
- <properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
- <property name="hibernate.hbm2ddl.auto" value="update"/>
- <property name="hibernate.show_sql" value="true"/>
- <property name="hibernate.format_sql" value="true"/>
- </properties>
- </persistence-unit>
- </persistence>
- //-----------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement