首页 > 编程语言 > 详细

springboot单元测试相关依赖

时间:2021-09-02 13:05:21      阅读:19      评论:0      收藏:0      [点我收藏+]
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>

package com.sdt;

import com.sdt.mapper.UserCertMapper;
import org.springframework.beans.factory.annotation.Autowired;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class SignAndVerifyManagerApplicationTests {

@Autowired
private UserCertMapper userCertMapper;

@Test
public void contextLoads() {
int keyId = userCertMapper.selectKeyId("sfdjfdjfsdjfsdfjdkfjsdjffk231231231231231213123123123fdsfsfdsfsdf2");
log.info("keyId=={}", keyId);
}

}

springboot单元测试相关依赖

原文:https://www.cnblogs.com/java-lzy/p/15218160.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!