Skip to content

Commit b5b48e2

Browse files
committed
Spring Boot 2.x基础教程:使用MyBatis访问MySQL
1 parent 1cf9b2a commit b5b48e2

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

2.1.x/chapter3-5/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
</properties>
2020

2121
<dependencies>
22-
<dependency>
23-
<groupId>org.springframework.boot</groupId>
24-
<artifactId>spring-boot-starter-web</artifactId>
25-
</dependency>
26-
2722
<dependency>
2823
<groupId>org.mybatis.spring.boot</groupId>
2924
<artifactId>mybatis-spring-boot-starter</artifactId>

2.1.x/chapter3-5/src/main/java/com/didispace/chapter35/Chapter35Application.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
5-
import org.springframework.web.bind.annotation.GetMapping;
6-
import org.springframework.web.bind.annotation.RestController;
75

86
@SpringBootApplication
97
public class Chapter35Application {

2.1.x/chapter3-5/src/test/java/com/didispace/chapter35/Chapter35ApplicationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
import org.springframework.boot.test.context.SpringBootTest;
1010
import org.springframework.test.annotation.Rollback;
1111
import org.springframework.test.context.junit4.SpringRunner;
12+
import org.springframework.transaction.annotation.Transactional;
1213

1314
import javax.sql.DataSource;
1415
import java.util.List;
1516

16-
@Slf4j
1717
@RunWith(SpringRunner.class)
1818
@SpringBootTest
19+
@Transactional
1920
public class Chapter35ApplicationTests {
2021

2122
@Autowired

0 commit comments

Comments
 (0)