forked from thinkgem/jeesite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
增加单元测试公共基类;Hibernate升级到4.2;Hibernate Validator升级到5.0.1
- Loading branch information
Showing
6 changed files
with
44 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/com/thinkgem/jeesite/common/test/SpringTransactionalContextTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.thinkgem.jeesite.common.test; | ||
|
||
import javax.sql.DataSource; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.test.context.ActiveProfiles; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests; | ||
|
||
@ActiveProfiles("production") | ||
@ContextConfiguration(locations = {"/applicationContext.xml", "/applicationContext-shiro.xml"}) | ||
public class SpringTransactionalContextTests extends AbstractTransactionalJUnit4SpringContextTests { | ||
|
||
protected DataSource dataSource; | ||
|
||
@Autowired | ||
public void setDataSource(DataSource dataSource) { | ||
super.setDataSource(dataSource); | ||
this.dataSource = dataSource; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters