package com.tj.unit;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.transaction.TransactionConfiguration;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSON;
import com.tj.domain.test;
import com.tj.service.ITestService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring-mybatis.xml"})
@Transactional
public class testmybatis{
private static Logger logger = Logger.getLogger(testmybatis.class);
@Resource
private ITestService testService ;
@Test
//@Rollback(false)
public void mytest()
{
test t1 = new test();
t1.setName("login12");
testService.insert(t1);
logger.info(JSON.toJSONString(t1));
//throw new RuntimeException("编号已经存在");
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
spring+springMVC+mybatis+maven+junit+mysql
共38个文件
xml:8个
class:6个
java:6个
需积分: 9 7 下载量 164 浏览量
2017-06-06
13:26:25
上传
评论
收藏 106KB RAR 举报
温馨提示
spring+springMVC+mybatis+maven+junit+mysql
资源推荐
资源详情
资源评论
收起资源包目录
Tj_App.rar (38个子文件)
mysql.png 87KB
Tj_App
.project 2KB
logs
ssm.log 367KB
.mymetadata 291B
src
spring-mybatis.xml 4KB
com
tj
service
ITestService.java 179B
serviceImpl
TestServiceImpl.java 510B
domain
test.java 326B
controller
TestController.java 985B
dao
testMapper.java 200B
unit
testmybatis.java 1KB
mapping
testMapper.xml 1021B
spring-mvc.xml 3KB
jdbc.properties 280B
log4j.properties 925B
target
test-classes
WebRoot
WEB-INF
jsp
test.jsp 238B
classes
spring-mybatis.xml 4KB
com
tj
service
ITestService.class 163B
serviceImpl
TestServiceImpl.class 757B
domain
test.class 844B
controller
TestController.class 2KB
dao
testMapper.class 234B
unit
testmybatis.class 1KB
mapping
testMapper.xml 1021B
spring-mvc.xml 3KB
jdbc.properties 280B
log4j.properties 925B
lib
web.xml 2KB
index.jsp 238B
META-INF
MANIFEST.MF 36B
.myeclipse
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.maven.ide.eclipse.prefs 271B
org.eclipse.jdt.core.prefs 274B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.core.resources.prefs 163B
.jsdtscope 500B
pom.xml 6KB
.classpath 442B
共 38 条
- 1
资源评论
liu415527116
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功