File tree Expand file tree Collapse file tree 3 files changed +42
-7
lines changed
src/test/java/tk/mybatis/springboot/test Expand file tree Collapse file tree 3 files changed +42
-7
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,19 @@ GitHub项目:https://github.com/mybatis-book/book
21
21
<dependency >
22
22
<groupId >org.mybatis.spring.boot</groupId >
23
23
<artifactId >mybatis-spring-boot-starter</artifactId >
24
- <version >1.1 .1</version >
24
+ <version >1.3 .1</version >
25
25
</dependency >
26
26
<!-- mapper-->
27
27
<dependency >
28
28
<groupId >tk.mybatis</groupId >
29
29
<artifactId >mapper-spring-boot-starter</artifactId >
30
- <version >1.1.1 </version >
30
+ <version >1.1.4 </version >
31
31
</dependency >
32
32
<!-- pagehelper-->
33
33
<dependency >
34
34
<groupId >com.github.pagehelper</groupId >
35
35
<artifactId >pagehelper-spring-boot-starter</artifactId >
36
- <version >1.1 .1</version >
36
+ <version >1.2 .1</version >
37
37
</dependency >
38
38
```
39
39
## Spring DevTools 配置
Original file line number Diff line number Diff line change 78
78
<dependency >
79
79
<groupId >org.mybatis.spring.boot</groupId >
80
80
<artifactId >mybatis-spring-boot-starter</artifactId >
81
- <version >1.3.0 </version >
81
+ <version >RELEASE </version >
82
82
</dependency >
83
83
<!-- mapper-->
84
84
<dependency >
85
85
<groupId >tk.mybatis</groupId >
86
86
<artifactId >mapper-spring-boot-starter</artifactId >
87
- <version >1.1.4 </version >
87
+ <version >RELEASE </version >
88
88
</dependency >
89
89
<!-- pagehelper-->
90
90
<dependency >
91
91
<groupId >com.github.pagehelper</groupId >
92
92
<artifactId >pagehelper-spring-boot-starter</artifactId >
93
- <version >1.1.3 </version >
93
+ <version >RELEASE </version >
94
94
</dependency >
95
95
96
96
<dependency >
102
102
<dependency >
103
103
<groupId >com.alibaba</groupId >
104
104
<artifactId >druid-spring-boot-starter</artifactId >
105
- <version >1.1.0 </version >
105
+ <version >RELEASE </version >
106
106
</dependency >
107
107
108
108
</dependencies >
Original file line number Diff line number Diff line change
1
+ package tk .mybatis .springboot .test ;
2
+
3
+ import org .junit .Test ;
4
+ import org .junit .runner .RunWith ;
5
+ import org .springframework .beans .factory .annotation .Autowired ;
6
+ import org .springframework .boot .test .context .SpringBootTest ;
7
+ import org .springframework .context .annotation .Import ;
8
+ import org .springframework .test .context .junit4 .SpringRunner ;
9
+ import tk .mybatis .springboot .Application ;
10
+ import tk .mybatis .springboot .model .Country ;
11
+ import tk .mybatis .springboot .service .CountryService ;
12
+
13
+ import java .util .List ;
14
+
15
+ /**
16
+ * @author liuzh
17
+ * @since 2017/9/2.
18
+ */
19
+ @ RunWith (SpringRunner .class )
20
+ @ SpringBootTest
21
+ @ Import (Application .class )
22
+ public class CountryServiceTest {
23
+
24
+ @ Autowired
25
+ private CountryService countryService ;
26
+
27
+ @ Test
28
+ public void test () {
29
+ Country country = new Country ();
30
+ List <Country > all = countryService .getAll (country );
31
+ for (Country c : all ) {
32
+ System .out .println (c .getCountryname ());
33
+ }
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments