Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion 2.x/chapter3-1/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -55,7 +55,7 @@ public void test() throws Exception {
userSerivce.deleteByName("Tom");
userSerivce.deleteByName("Mike");

// 查数据库,应该有5个用户
// 查数据库,应该有3个用户
Assert.assertEquals(3, userSerivce.getAllUsers());

}
Expand Down