File tree Expand file tree Collapse file tree 4 files changed +49
-23
lines changed
java/com/goeswhere/frameworkgame/blogapp/dao Expand file tree Collapse file tree 4 files changed +49
-23
lines changed Original file line number Diff line number Diff line change 142
142
<version >1.4</version >
143
143
</dependency >
144
144
<dependency >
145
- <groupId >org.hsqldb </groupId >
146
- <artifactId >hsqldb </artifactId >
147
- <version >2.2.7 </version >
145
+ <groupId >org.apache.derby </groupId >
146
+ <artifactId >derby </artifactId >
147
+ <version >10.8.2.2 </version >
148
148
</dependency >
149
149
</dependencies >
150
150
<build >
154
154
<groupId >org.codehaus.mojo</groupId >
155
155
<artifactId >hibernate3-maven-plugin</artifactId >
156
156
<version >2.2</version >
157
- <configuration >
158
- <components >
159
- <component >
160
- <name >hbm2ddl</name >
161
- <implementation >annotationconfiguration</implementation >
162
- </component >
163
- </components >
164
- <componentProperties >
165
- <export >true</export >
166
- <jdk5 >true</jdk5 >
167
- <drop >true</drop >
168
- <create >true</create >
169
- <haltonerror >false</haltonerror >
170
- <autocommit >false</autocommit >
171
- <format >true</format >
172
- </componentProperties >
173
- </configuration >
157
+ <executions >
158
+ <execution >
159
+ <phase >generate-sources</phase >
160
+ <goals >
161
+ <goal >hbm2java</goal >
162
+ </goals >
163
+ <inherited >false</inherited >
164
+ <configuration >
165
+ <components >
166
+ <component >
167
+ <name >hbm2ddl</name >
168
+ <implementation >annotationconfiguration</implementation >
169
+ </component >
170
+ </components >
171
+ <componentProperties >
172
+ <export >true</export >
173
+ <jdk5 >true</jdk5 >
174
+ <drop >true</drop >
175
+ <create >true</create >
176
+ <haltonerror >false</haltonerror >
177
+ <autocommit >false</autocommit >
178
+ <format >true</format >
179
+ </componentProperties >
180
+ </configuration >
181
+ </execution >
182
+ </executions >
183
+
174
184
</plugin >
175
185
</plugins >
176
186
</build >
Original file line number Diff line number Diff line change
1
+ package com .goeswhere .frameworkgame .blogapp .dao ;
2
+
3
+ public class PostDao {
4
+
5
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!DOCTYPE hibernate-configuration PUBLIC " //Hibernate/Hibernate Configuration DTD 3.0//EN"
3
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
4
+ <hibernate-configuration >
5
+ <session-factory >
6
+ <mapping class =" com.goeswhere.frameworkgame.blogapp.domain.Post" />
7
+ <mapping class =" com.goeswhere.frameworkgame.blogapp.domain.Comment" />
8
+ <mapping class =" com.goeswhere.frameworkgame.blogapp.domain.Category" />
9
+ </session-factory >
10
+ </hibernate-configuration >
11
+
Original file line number Diff line number Diff line change 49
49
<tx : annotation-driven transaction-manager =" transactionManager" />
50
50
51
51
<bean id =" dataSource" class =" org.apache.commons.dbcp.BasicDataSource" destroy-method =" close" >
52
- <property name =" driverClassName" value =" org.hsqldb.jdbcDriver " />
53
- <property name =" url" value =" jdbc:hsqldb:hsql:mem: blogapp" />
52
+ <property name =" driverClassName" value =" org.apache.derby.jdbc.EmbeddedDriver " />
53
+ <property name =" url" value =" jdbc:derby: blogapp;create=true " />
54
54
<property name =" username" value =" sa" />
55
55
<property name =" password" value =" " />
56
56
</bean >
59
59
<property name =" dataSource" ref =" dataSource" />
60
60
<property name =" jpaVendorAdapter" >
61
61
<bean class =" org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" >
62
- <property name =" databasePlatform" value =" org.hibernate.dialect.HSQLDialect " />
62
+ <property name =" databasePlatform" value =" org.hibernate.dialect.DerbyDialect " />
63
63
<property name =" showSql" value =" true" />
64
64
<property name =" generateDdl" value =" true" />
65
65
</bean >
You can’t perform that action at this time.
0 commit comments