Skip to content

Commit efcd95e

Browse files
committed
升级 Spring Boot 到 1.5.1
1 parent 1bc97d6 commit efcd95e

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Spring Boot 集成 MyBatis, 分页插件 PageHelper, 通用 Mapper
22

3-
- [Spring Boot 1.4.3.RELEASE](https://github.com/spring-projects/spring-boot)
3+
- [Spring Boot 1.5.1.RELEASE](https://github.com/spring-projects/spring-boot)
44
- [mybatis-spring-boot-starter 1.1.1](https://github.com/mybatis/spring-boot-starter)
55
- [mapper-spring-boot-starter 1.0.0](https://github.com/abel533/mapper-boot-starter)
66
- [pagehelper-spring-boot-starter 1.1.0](https://github.com/pagehelper/pagehelper-spring-boot)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>1.4.3.RELEASE</version>
14+
<version>1.5.1.RELEASE</version>
1515
</parent>
1616

1717
<properties>

src/main/java/tk/mybatis/springboot/Application.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import org.springframework.web.bind.annotation.RequestMapping;
88
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
99
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
10-
import tk.mybatis.springboot.util.MyMapper;
1110

1211
/**
1312
* @author liuzh
@@ -16,7 +15,7 @@
1615
@Controller
1716
@EnableWebMvc
1817
@SpringBootApplication
19-
@MapperScan(basePackages = "tk.mybatis.springboot.mapper", markerInterface = MyMapper.class)
18+
@MapperScan(basePackages = "tk.mybatis.springboot.mapper")
2019
public class Application extends WebMvcConfigurerAdapter {
2120

2221
public static void main(String[] args) {

src/test/java/tk/mybatis/springboot/mapper/MyBatis331Test.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.slf4j.Logger;
3131
import org.slf4j.LoggerFactory;
3232
import org.springframework.beans.factory.annotation.Autowired;
33-
import org.springframework.boot.test.SpringApplicationConfiguration;
33+
import org.springframework.boot.test.context.SpringBootTest;
3434
import org.springframework.test.annotation.Rollback;
3535
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
3636
import org.springframework.test.context.web.WebAppConfiguration;
@@ -48,7 +48,7 @@
4848
@RunWith(SpringJUnit4ClassRunner.class)
4949
@WebAppConfiguration
5050
@Transactional
51-
@SpringApplicationConfiguration(Application.class)
51+
@SpringBootTest(classes = Application.class)
5252
public class MyBatis331Test {
5353
private Logger logger = LoggerFactory.getLogger(getClass());
5454

@@ -70,7 +70,7 @@ public void testInsertList() {
7070
}
7171

7272
@Test
73-
public void testSelectById(){
73+
public void testSelectById() {
7474
City2 city2 = mapper.selectByCityId(1);
7575
logger.info(city2.toString());
7676
Assert.assertNotNull(city2);
@@ -79,9 +79,9 @@ public void testSelectById(){
7979
}
8080

8181
@Test
82-
public void testSelectAll(){
82+
public void testSelectAll() {
8383
List<City2> city2List = mapper.selectAll();
84-
for(City2 c2 : city2List){
84+
for (City2 c2 : city2List) {
8585
logger.info(c2.toString());
8686
Assert.assertNotNull(c2);
8787
Assert.assertNotNull(c2.getCityName());

0 commit comments

Comments
 (0)