diff --git a/spring-hibernate3/pom.xml b/spring-hibernate3/pom.xml index 59053be596..9f99d83a42 100644 --- a/spring-hibernate3/pom.xml +++ b/spring-hibernate3/pom.xml @@ -46,7 +46,13 @@ tomcat-dbcp ${tomcat-dbcp.version} - + + + com.h2database + h2 + ${h2.version} + + @@ -127,39 +133,52 @@ ${maven-surefire-plugin.version} - + **/*IntegrationTest.java - - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo-maven2-plugin.version} - - true - - jetty8x - embedded - - - - - - - 8082 - - - - - + + + integration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*LiveTest.java + + + **/*IntegrationTest.java + + + + + + + json + + + + + + + + 4.2.5.RELEASE @@ -170,6 +189,7 @@ 3.6.10.Final 5.1.38 7.0.47 + 1.4.191 1.7.13 diff --git a/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfig.java b/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfig.java index 15752165cc..fea76dfc70 100644 --- a/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfig.java +++ b/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfig.java @@ -21,7 +21,7 @@ import com.google.common.base.Preconditions; @Configuration @EnableTransactionManagement -@PropertySource({ "classpath:persistence-mysql.properties" }) +@PropertySource({ "classpath:persistence-h2.properties" }) @ComponentScan({ "org.baeldung.persistence.dao", "org.baeldung.persistence.service" }) public class PersistenceConfig { diff --git a/spring-hibernate3/src/main/resources/persistence-h2.properties b/spring-hibernate3/src/main/resources/persistence-h2.properties new file mode 100644 index 0000000000..d2fcd9545b --- /dev/null +++ b/spring-hibernate3/src/main/resources/persistence-h2.properties @@ -0,0 +1,10 @@ +# jdbc.X +jdbc.driverClassName=org.h2.Driver +jdbc.url=jdbc:h2:mem:spring_hibernate3_01;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE +jdbc.user=sa +jdbc.pass= + +# hibernate.X +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.show_sql=false +hibernate.hbm2ddl.auto=create-drop \ No newline at end of file