From 2c71a23d0c76f9b49f7d486b2c6254534c619feb Mon Sep 17 00:00:00 2001 From: mengld Date: Sat, 25 Sep 2021 17:19:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Chapter1-4=E7=9A=84HelloController=E5=8C=85?= =?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/didispace/chapter14/HelloController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From e5365c048b021a367a431027d3cbe5756cb582d8 Mon Sep 17 00:00:00 2001 From: "Arthur.Meng" Date: Fri, 1 Oct 2021 13:05:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Chapter1-4=E7=9A=84HelloController=E5=8C=85?= =?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2.x/chapter3-1/src/main/resources/application.properties | 2 +- .../com/didispace/chapter31/Chapter31ApplicationTests.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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()); }