From c24e9222a3e95efdfaee9118122a3a59cb173406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=80=E6=BA=90=E6=B5=B7=E5=93=A5?= Date: Thu, 22 Jun 2023 13:50:31 +0800 Subject: [PATCH] update additional-spring-configuration-metadata.json --- ...additional-spring-configuration-metadata.json | 16 ++++++++++++++++ .../src/main/resources/application.yml | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/mybatis-flex-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/mybatis-flex-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 6c661404..a8ab3477 100644 --- a/mybatis-flex-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/mybatis-flex-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -43,6 +43,22 @@ "name": "mybatis-flex.global-config.deleted-value-of-logic-delete", "description": "逻辑删除已删除值标记", "type": "java.lang.Object" + }, + { + "name": "mybatis-flex.global-config.key-config.value", + "description": "使用的 ID 生成器名称 或者 Sequence 执行的 SQL 内容", + "type": "java.lang.String" + }, + { + "defaultValue": true, + "name": "mybatis-flex.global-config.key-config.before", + "description": "是否在数据插入之前执行,只在非自增上配置有效", + "type": "java.lang.Boolean" + }, + { + "name": "mybatis-flex.global-config.key-config.key-type", + "description": "ID 生成策略", + "type": "com.mybatisflex.annotation.KeyType" } ] } 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 dcb9cfa2..6f71d53e 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 @@ -8,6 +8,7 @@ spring: url: jdbc:mysql://localhost:3306/flex_test username: root password: 12345678 + driver-class-name: # sql: # init: # schema-locations: classpath:schema.sql @@ -17,6 +18,11 @@ mybatis-flex: - classpath*:/mapper/*.xml global-config: print-banner: false + key-config: + key-type: generator + value: uuid + configuration: + use-generated-keys: true # datasource: # data-center: # url: jdbc:mysql://localhost:3306/flex_test