diff --git a/2.x/chapter1-4/src/main/java/com/didispace/chapter14/HelloController.java b/2.x/chapter1-4/src/main/java/com/didispace/chapter14/HelloController.java index d19b5ef6..084af5b8 100644 --- a/2.x/chapter1-4/src/main/java/com/didispace/chapter14/HelloController.java +++ b/2.x/chapter1-4/src/main/java/com/didispace/chapter14/HelloController.java @@ -1,4 +1,4 @@ -package com.didispace.chapter11; +package com.didispace.chapter14; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/2.x/chapter3-1/src/main/resources/application.properties b/2.x/chapter3-1/src/main/resources/application.properties index 66ff8fe4..44b3d10e 100644 --- a/2.x/chapter3-1/src/main/resources/application.properties +++ b/2.x/chapter3-1/src/main/resources/application.properties @@ -1,4 +1,4 @@ -spring.datasource.url=jdbc:mysql://localhost:3306/test +spring.datasource.url=jdbc:mysql://localhost:3306/test?useSSL=false&serverTimezone=UTC spring.datasource.username=root spring.datasource.password= spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver \ No newline at end of file diff --git a/2.x/chapter3-1/src/test/java/com/didispace/chapter31/Chapter31ApplicationTests.java b/2.x/chapter3-1/src/test/java/com/didispace/chapter31/Chapter31ApplicationTests.java index 2905f545..1756bb6c 100644 --- a/2.x/chapter3-1/src/test/java/com/didispace/chapter31/Chapter31ApplicationTests.java +++ b/2.x/chapter3-1/src/test/java/com/didispace/chapter31/Chapter31ApplicationTests.java @@ -36,7 +36,7 @@ public void setUp() { } @Test - public void test() throws Exception { + public void test() { // 插入5个用户 userSerivce.create("Tom", 10); userSerivce.create("Mike", 11); @@ -55,7 +55,7 @@ public void test() throws Exception { userSerivce.deleteByName("Tom"); userSerivce.deleteByName("Mike"); - // 查数据库,应该有5个用户 + // 查数据库,应该有3个用户 Assert.assertEquals(3, userSerivce.getAllUsers()); }