diff --git a/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-account/src/main/resources/application.properties b/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-account/src/main/resources/application.properties index 97225faa..246a01c1 100644 --- a/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-account/src/main/resources/application.properties +++ b/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-account/src/main/resources/application.properties @@ -3,6 +3,8 @@ server.port=0 jdbc.url=jdbc:mysql://127.0.0.1/fescar_demo jdbc.username=root jdbc.password=root + +fescar.enabled=true fescar.applicationId=dubbo-fescar-account fescar.txServiceGroup=my_test_tx_group diff --git a/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-order/src/main/resources/application.properties b/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-order/src/main/resources/application.properties index 0a5014f5..77d129bb 100644 --- a/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-order/src/main/resources/application.properties +++ b/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-order/src/main/resources/application.properties @@ -9,5 +9,6 @@ jdbc.url=jdbc:mysql://127.0.0.1/fescar_demo jdbc.username=root jdbc.password=root +fescar.enabled=true fescar.applicationId=dubbo-fescar-order fescar.txServiceGroup=my_test_tx_group \ No newline at end of file diff --git a/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-storage/src/main/resources/application.properties b/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-storage/src/main/resources/application.properties index 3068b9c1..854d30f9 100644 --- a/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-storage/src/main/resources/application.properties +++ b/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-storage/src/main/resources/application.properties @@ -9,6 +9,6 @@ jdbc.url=jdbc:mysql://127.0.0.1/fescar_demo jdbc.username=root jdbc.password=root - +fescar.enabled=true fescar.applicationId=dubbo-fescar-storage fescar.txServiceGroup=my_test_tx_group \ No newline at end of file diff --git a/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-web/src/main/resources/application.properties b/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-web/src/main/resources/application.properties index fbbc6c0e..84620549 100644 --- a/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-web/src/main/resources/application.properties +++ b/nutzboot-demo/nutzboot-demo-dubbo-fescar/nutzboot-demo-dubbo-fescar-web/src/main/resources/application.properties @@ -10,5 +10,6 @@ jdbc.url=jdbc:mysql://127.0.0.1/fescar_demo jdbc.username=root jdbc.password=root +fescar.enabled=true fescar.applicationId=dubbo-fescar-web fescar.txServiceGroup=my_test_tx_group \ No newline at end of file diff --git a/nutzboot-starter/nutzboot-starter-fescar/src/main/java/org/nutz/boot/starter/fescar/FescarStarter.java b/nutzboot-starter/nutzboot-starter-fescar/src/main/java/org/nutz/boot/starter/fescar/FescarStarter.java index de22e437..16462e44 100644 --- a/nutzboot-starter/nutzboot-starter-fescar/src/main/java/org/nutz/boot/starter/fescar/FescarStarter.java +++ b/nutzboot-starter/nutzboot-starter-fescar/src/main/java/org/nutz/boot/starter/fescar/FescarStarter.java @@ -20,6 +20,9 @@ public class FescarStarter implements ServerFace { protected static final String PRE = "fescar."; + @PropDoc(value = "fescar是否启用", defaultValue = "false", type = "boolean") + public static String PROP_ENABLED = PRE + "enabled"; + @PropDoc(value = "fescar应用id", need = true) public static String PROP_APPID = PRE + "applicationId"; @@ -46,7 +49,7 @@ public class FescarStarter implements ServerFace { } return; } - if (!conf.getBoolean("fescar.enable", true)) { + if (!conf.getBoolean(PROP_ENABLED, false)) { log.info("Global transaction is disabled."); return; }