From 650c41c10bceff436a536745fd6abea37fc072d8 Mon Sep 17 00:00:00 2001 From: life <13122192336@163.com> Date: Mon, 7 Aug 2023 18:25:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BC=BA=E5=B0=91=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis-flex-spring-boot-seata/pom.xml | 155 ++++++++++++++++++ ...MybatisFlexSpringBootSeataApplication.java | 15 ++ ...isFlexSpringBootSeataApplicationTests.java | 13 ++ .../src/main/resources/application.yml | 28 ++-- 4 files changed, 197 insertions(+), 14 deletions(-) create mode 100644 mybatis-flex-test/mybatis-flex-spring-boot-seata/pom.xml create mode 100644 mybatis-flex-test/mybatis-flex-spring-boot-seata/src/main/java/com/mybatisfle/test/mybatisflexspringbootseata/MybatisFlexSpringBootSeataApplication.java create mode 100644 mybatis-flex-test/mybatis-flex-spring-boot-seata/src/test/java/com/mybatisfle/test/mybatisflexspringbootseata/MybatisFlexSpringBootSeataApplicationTests.java diff --git a/mybatis-flex-test/mybatis-flex-spring-boot-seata/pom.xml b/mybatis-flex-test/mybatis-flex-spring-boot-seata/pom.xml new file mode 100644 index 00000000..6e1055b1 --- /dev/null +++ b/mybatis-flex-test/mybatis-flex-spring-boot-seata/pom.xml @@ -0,0 +1,155 @@ + + + 4.0.0 + + mybatis-flex-test + com.mybatis-flex + 1.5.6 + + com.mybatisfle.test + mybatis-flex-spring-boot-seata + 0.0.1-SNAPSHOT + mybatis-flex-spring-boot-seata + mybatis-flex-spring-boot-seata + + 1.8 + + + + com.mybatis-flex + mybatis-flex-spring-boot-starter + ${mybatis-flex.version} + + + + com.mybatis-flex + mybatis-flex-codegen + 1.5.6 + + + + org.springframework.boot + spring-boot-starter-web + + + + com.alibaba.fastjson2 + fastjson2 + 2.0.32 + + + + com.alibaba + druid-spring-boot-starter + 1.2.18 + + + + + + + + + + + + + + + org.springframework.boot + spring-boot-starter-data-jdbc + + + + com.mysql + mysql-connector-j + + + + + + + + + + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.projectlombok + lombok + RELEASE + compile + + + + io.seata + seata-spring-boot-starter + 1.7.0 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + + + + diff --git a/mybatis-flex-test/mybatis-flex-spring-boot-seata/src/main/java/com/mybatisfle/test/mybatisflexspringbootseata/MybatisFlexSpringBootSeataApplication.java b/mybatis-flex-test/mybatis-flex-spring-boot-seata/src/main/java/com/mybatisfle/test/mybatisflexspringbootseata/MybatisFlexSpringBootSeataApplication.java new file mode 100644 index 00000000..142a5773 --- /dev/null +++ b/mybatis-flex-test/mybatis-flex-spring-boot-seata/src/main/java/com/mybatisfle/test/mybatisflexspringbootseata/MybatisFlexSpringBootSeataApplication.java @@ -0,0 +1,15 @@ +package com.mybatisfle.test.mybatisflexspringbootseata; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@MapperScan("com.mybatisfle.test.mybatisflexspringbootseata") +@SpringBootApplication +public class MybatisFlexSpringBootSeataApplication { + + public static void main(String[] args) { + SpringApplication.run(MybatisFlexSpringBootSeataApplication.class, args); + } + +} diff --git a/mybatis-flex-test/mybatis-flex-spring-boot-seata/src/test/java/com/mybatisfle/test/mybatisflexspringbootseata/MybatisFlexSpringBootSeataApplicationTests.java b/mybatis-flex-test/mybatis-flex-spring-boot-seata/src/test/java/com/mybatisfle/test/mybatisflexspringbootseata/MybatisFlexSpringBootSeataApplicationTests.java new file mode 100644 index 00000000..f763ac31 --- /dev/null +++ b/mybatis-flex-test/mybatis-flex-spring-boot-seata/src/test/java/com/mybatisfle/test/mybatisflexspringbootseata/MybatisFlexSpringBootSeataApplicationTests.java @@ -0,0 +1,13 @@ +package com.mybatisfle.test.mybatisflexspringbootseata; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class MybatisFlexSpringBootSeataApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/resources/application.yml b/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/resources/application.yml index 36c7ddb6..4dca4a42 100644 --- a/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/resources/application.yml +++ b/mybatis-flex-test/mybatis-flex-spring-boot-test/src/main/resources/application.yml @@ -3,11 +3,11 @@ spring: # h2: # console: # enabled: true - datasource: -# driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/flex_test - username: root - password: 123456 +# datasource: +## driver-class-name: com.mysql.cj.jdbc.Driver +# url: jdbc:mysql://localhost:3306/flex_test +# username: root +# password: 131496 # driver-class-name: # datasource: # driver-class-name: org.h2.Driver @@ -37,12 +37,12 @@ mybatis-flex: # username: root # password: 12345678 #mybatis-flex: -# datasource: -# ds1: -# url: jdbc:mysql://127.0.0.1:3306/db -# username: root -# password: 123456 -# ds2: -# url: jdbc:mysql://127.0.0.1:3306/db2 -# username: root -# password: 123456 + datasource: + ds3333: + url: jdbc:mysql://127.0.0.1:3306/flex_test + username: root + password: 131496 + ds2: + url: jdbc:mysql://127.0.0.1:3306/flex_test1 + username: root + password: 131496