version up spring to 3. 0.5
@@ -61,8 +61,8 @@ | ||
61 | 61 | </dependency> |
62 | 62 | <dependency> |
63 | 63 | <groupId>org.springframework</groupId> |
64 | - <artifactId>spring-webmvc-struts</artifactId> | |
65 | - <version>2.5.1</version> | |
64 | + <artifactId>spring-struts</artifactId> | |
65 | + <version>${spring.version}</version> | |
66 | 66 | </dependency> |
67 | 67 | <!-- masme --> |
68 | 68 | <dependency> |
@@ -43,8 +43,8 @@ | ||
43 | 43 | </dependency> |
44 | 44 | <dependency> |
45 | 45 | <groupId>org.springframework</groupId> |
46 | - <artifactId>spring-webmvc-struts</artifactId> | |
47 | - <version>2.5.1</version> | |
46 | + <artifactId>spring-struts</artifactId> | |
47 | + <version>${spring.version}</version> | |
48 | 48 | </dependency> |
49 | 49 | <!-- masme --> |
50 | 50 | <dependency> |
@@ -8,29 +8,20 @@ | ||
8 | 8 | import jp.sourceforge.masme.test.entity.CustomerWork; |
9 | 9 | |
10 | 10 | import org.hibernate.SessionFactory; |
11 | -import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests; | |
11 | +import org.springframework.beans.factory.annotation.Autowired; | |
12 | +import org.springframework.test.context.ContextConfiguration; | |
13 | +import org.springframework.test.context.junit38.AbstractTransactionalJUnit38SpringContextTests; | |
12 | 14 | |
13 | -public class MaintenanceTargetDaoTest extends | |
14 | - AbstractTransactionalDataSourceSpringContextTests { | |
15 | +@ContextConfiguration(locations={"/jp/sourceforge/masme/dao/MaintenanceTargetDaoTest.xml"}) | |
16 | +public class MaintenanceTargetDaoTest extends AbstractTransactionalJUnit38SpringContextTests { | |
15 | 17 | |
18 | + @Autowired | |
16 | 19 | private MaintenanceTargetDaoImpl dao; |
17 | 20 | private Class targetClass = CustomerWork.class; |
21 | + @Autowired | |
18 | 22 | private SessionFactory sessionFactory; |
19 | 23 | |
20 | - @Override | |
21 | - protected String getConfigPath() { | |
22 | - return "/jp/sourceforge/masme/dao/MaintenanceTargetDaoTest.xml"; | |
23 | - } | |
24 | 24 | |
25 | - public void setSessionFactory(SessionFactory sessionFactory) { | |
26 | - this.sessionFactory = sessionFactory; | |
27 | - } | |
28 | - | |
29 | - @Override | |
30 | - protected void onSetUpInTransaction() throws Exception { | |
31 | - super.onSetUpInTransaction(); | |
32 | - } | |
33 | - | |
34 | 25 | public void testLoadAll() { |
35 | 26 | CompanyWork c = createCompanyWork("1", "toyota"); |
36 | 27 | dao.save(c); |
@@ -50,10 +41,6 @@ | ||
50 | 41 | dao.loadEditAll(targetClass); |
51 | 42 | } |
52 | 43 | |
53 | - public void setMaintenanceTargetDaoImpl(MaintenanceTargetDaoImpl dao) { | |
54 | - this.dao = dao; | |
55 | - } | |
56 | - | |
57 | 44 | public static CustomerWork createCustomerWork(String id, String name, |
58 | 45 | CompanyWork companyWork) { |
59 | 46 | CustomerWork work = new CustomerWork(); |
@@ -22,6 +22,8 @@ | ||
22 | 22 | <compile.source>1.5</compile.source> |
23 | 23 | <compile.target>1.5</compile.target> |
24 | 24 | <masme.version>0.3</masme.version> |
25 | + <spring.version>3.0.5.RELEASE</spring.version> | |
26 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
25 | 27 | </properties> |
26 | 28 | |
27 | 29 | <repositories> |
@@ -177,13 +179,23 @@ | ||
177 | 179 | <!-- spring --> |
178 | 180 | <dependency> |
179 | 181 | <groupId>org.springframework</groupId> |
180 | - <artifactId>spring</artifactId> | |
181 | - <version>2.5.1</version> | |
182 | + <artifactId>spring-core</artifactId> | |
183 | + <version>${spring.version}</version> | |
182 | 184 | </dependency> |
183 | 185 | <dependency> |
184 | 186 | <groupId>org.springframework</groupId> |
187 | + <artifactId>spring-context</artifactId> | |
188 | + <version>${spring.version}</version> | |
189 | + </dependency> | |
190 | + <dependency> | |
191 | + <groupId>org.springframework</groupId> | |
192 | + <artifactId>spring-orm</artifactId> | |
193 | + <version>${spring.version}</version> | |
194 | + </dependency> | |
195 | + <dependency> | |
196 | + <groupId>org.springframework</groupId> | |
185 | 197 | <artifactId>spring-test</artifactId> |
186 | - <version>2.5.1</version> | |
198 | + <version>${spring.version}</version> | |
187 | 199 | <scope>test</scope> |
188 | 200 | </dependency> |
189 | 201 |