> getDatasource() {
return datasource;
}
@@ -890,4 +903,38 @@ public class MybatisFlexProperties {
}
+ /**
+ * Seata 配置
+ *
+ * @author life
+ */
+ public static class SeataConfig{
+
+ /**
+ * 是否开启
+ */
+ private boolean enable = false;
+
+ /**
+ * 事务模式支持,只支持XA或者AT
+ */
+ private SeataMode seataMode = SeataMode.AT;
+
+ public boolean isEnable() {
+ return enable;
+ }
+
+ public void setEnable(boolean enable) {
+ this.enable = enable;
+ }
+
+ public SeataMode getSeataMode() {
+ return seataMode;
+ }
+
+ public void setSeataMode(SeataMode seataMode) {
+ this.seataMode = seataMode;
+ }
+ }
+
}
diff --git a/mybatis-flex-spring-boot-starter/src/main/java/com/mybatisflex/spring/boot/SeataMode.java b/mybatis-flex-spring-boot-starter/src/main/java/com/mybatisflex/spring/boot/SeataMode.java
new file mode 100644
index 00000000..b02af607
--- /dev/null
+++ b/mybatis-flex-spring-boot-starter/src/main/java/com/mybatisflex/spring/boot/SeataMode.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.mybatisflex.spring.boot;
+
+/**
+ * @author life
+ */
+public enum SeataMode {
+
+ XA,
+
+ AT
+}