From adc9ddd900f4c8b0743882e3a65e1f59b4b5f78c Mon Sep 17 00:00:00 2001 From: Xiong Neng Date: Sat, 15 Sep 2018 16:11:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90springboot-transaction?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- springboot-transaction/README.md | 4 ++++ springboot-transaction/src/main/resources/application.yml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/springboot-transaction/README.md b/springboot-transaction/README.md index 5474c2f..0d39456 100644 --- a/springboot-transaction/README.md +++ b/springboot-transaction/README.md @@ -2,6 +2,10 @@ 基于注解的声明式事务 +## 测试方法 + +启动应用后访问/errorUpdate和/errorUpdate2,对于出现异常的Service方法,数据库会回滚。 + ## 许可证 Copyright (c) 2018 Xiong Neng diff --git a/springboot-transaction/src/main/resources/application.yml b/springboot-transaction/src/main/resources/application.yml index 4aaf66b..c9b5fa0 100644 --- a/springboot-transaction/src/main/resources/application.yml +++ b/springboot-transaction/src/main/resources/application.yml @@ -15,7 +15,7 @@ spring: profiles: active: dev datasource: - url: jdbc:mysql://127.0.0.1:3306/test?useSSL=false&autoReconnect=true&tinyInt1isBit=false&useUnicode=true&characterEncoding=utf8 + url: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useSSL=false&autoReconnect=true&tinyInt1isBit=false&useUnicode=true&characterEncoding=utf8 username: root password: 123456 @@ -51,5 +51,5 @@ logging: ROOT: INFO com: xncoding: DEBUG - file: E:/logs/trans.log + file: D:/logs/trans.log