|
|
|
@ -6,6 +6,7 @@ import org.junit.jupiter.api.Test;
|
|
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@SpringBootTest
|
|
|
|
|
class SpringBootMybatisApplicationTests {
|
|
|
|
@ -14,9 +15,17 @@ class SpringBootMybatisApplicationTests {
|
|
|
|
|
private ArticleMapper articleMapper;
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void contextLoads() {
|
|
|
|
|
void testGetArticleById() {
|
|
|
|
|
Article brean = articleMapper.getArticleById(1);
|
|
|
|
|
System.out.println(brean);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void testGetAllArticle() {
|
|
|
|
|
List<Article> list = articleMapper.getAllArticle();
|
|
|
|
|
System.out.println(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|