replace mysql with derby db (#546)
* non transient data access exception examples * change to derby db * change to in memory derby db
This commit is contained in:
		
							parent
							
								
									0c8ba0bb44
								
							
						
					
					
						commit
						135adf81b1
					
				| @ -135,6 +135,27 @@ | ||||
|         	<artifactId>el-api</artifactId> | ||||
|         	<version>2.2</version> | ||||
|         </dependency> | ||||
| 
 | ||||
|         <dependency> | ||||
|         	<groupId>org.apache.derby</groupId> | ||||
|         	<artifactId>derby</artifactId> | ||||
|         	<version>10.12.1.1</version> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|         	<groupId>org.apache.derby</groupId> | ||||
|         	<artifactId>derbyclient</artifactId> | ||||
|         	<version>10.12.1.1</version> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|         	<groupId>org.apache.derby</groupId> | ||||
|         	<artifactId>derbynet</artifactId> | ||||
|         	<version>10.12.1.1</version> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|         	<groupId>org.apache.derby</groupId> | ||||
|         	<artifactId>derbytools</artifactId> | ||||
|         	<version>10.12.1.1</version> | ||||
|         </dependency> | ||||
|     </dependencies> | ||||
| 
 | ||||
|     <build> | ||||
|  | ||||
| @ -20,7 +20,7 @@ import com.google.common.base.Preconditions; | ||||
| 
 | ||||
| @Configuration | ||||
| @EnableTransactionManagement | ||||
| @PropertySource({ "classpath:persistence-mysql.properties" }) | ||||
| @PropertySource({ "classpath:persistence-derby.properties" }) | ||||
| @ComponentScan({ "org.baeldung.persistence" }) | ||||
| public class Cause1NonTransientConfig { | ||||
| 
 | ||||
|  | ||||
| @ -20,7 +20,7 @@ import com.google.common.base.Preconditions; | ||||
| 
 | ||||
| @Configuration | ||||
| @EnableTransactionManagement | ||||
| @PropertySource({ "classpath:persistence-mysql.properties" }) | ||||
| @PropertySource({ "classpath:persistence-derby.properties" }) | ||||
| @ComponentScan({ "org.baeldung.persistence" }) | ||||
| public class Cause4NonTransientConfig { | ||||
| 
 | ||||
| @ -72,5 +72,4 @@ public class Cause4NonTransientConfig { | ||||
|         // hibernateProperties.setProperty("hibernate.globally_quoted_identifiers", "true"); | ||||
|         return hibernateProperties; | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -0,0 +1,10 @@ | ||||
| # jdbc.X | ||||
| jdbc.driverClassName=org.apache.derby.jdbc.EmbeddedDriver | ||||
| jdbc.url=jdbc:derby:memory:spring_exceptions;create=true | ||||
| jdbc.user=tutorialuser | ||||
| jdbc.pass=tutorialpass | ||||
| 
 | ||||
| # hibernate.X | ||||
| hibernate.dialect=org.hibernate.dialect.DerbyDialect | ||||
| hibernate.show_sql=false | ||||
| hibernate.hbm2ddl.auto=create | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user