You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ki...@apache.org on 2020/10/12 11:46:03 UTC
[shardingsphere] branch master updated: modify spring boot Active
Profiles (#7754)
This is an automated email from the ASF dual-hosted git repository.
kimmking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 0cde205 modify spring boot Active Profiles (#7754)
0cde205 is described below
commit 0cde20523512263f930a585f2bc16440f12a27d2
Author: xiaoyu <54...@qq.com>
AuthorDate: Mon Oct 12 19:44:46 2020 +0800
modify spring boot Active Profiles (#7754)
---
.../xa/spring/boot/ExampleMainApplication.java | 2 --
.../src/main/resources/application.properties | 21 +++++++++++++++++++++
.../seata/spring/boot/ExampleMainApplication.java | 3 ---
.../src/main/resources/application.properties | 21 +++++++++++++++++++++
4 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-spring-boot-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/spring/boot/ExampleMainApplication.java b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-spring-boot-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/spring/boot/ExampleMainApplication.java
index 3416cca..0d10ebe 100644
--- a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-spring-boot-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/spring/boot/ExampleMainApplication.java
+++ b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-spring-boot-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/spring/boot/ExampleMainApplication.java
@@ -21,13 +21,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.Profile;
import javax.annotation.PostConstruct;
@SpringBootApplication
@Import(TransactionConfiguration.class)
-@Profile("sharding-databases-tables")
public class ExampleMainApplication {
@Autowired
diff --git a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-spring-boot-example/src/main/resources/application.properties b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-spring-boot-example/src/main/resources/application.properties
new file mode 100644
index 0000000..ed74ba2
--- /dev/null
+++ b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-spring-boot-example/src/main/resources/application.properties
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+spring.profiles.active=sharding-databases-tables
+#spring.profiles.active=sharding-databases
+#spring.profiles.active=sharding-tables
+
diff --git a/examples/shardingsphere-jdbc-example/transaction-example/transaction-base-seata-spring-boot-example/src/main/java/org/apache/shardingsphere/example/transaction/base/seata/spring/boot/ExampleMainApplication.java b/examples/shardingsphere-jdbc-example/transaction-example/transaction-base-seata-spring-boot-example/src/main/java/org/apache/shardingsphere/example/transaction/base/seata/spring/boot/ExampleMainApplication.java
index 5b417de..32f8804 100644
--- a/examples/shardingsphere-jdbc-example/transaction-example/transaction-base-seata-spring-boot-example/src/main/java/org/apache/shardingsphere/example/transaction/base/seata/spring/boot/ExampleMainApplication.java
+++ b/examples/shardingsphere-jdbc-example/transaction-example/transaction-base-seata-spring-boot-example/src/main/java/org/apache/shardingsphere/example/transaction/base/seata/spring/boot/ExampleMainApplication.java
@@ -17,12 +17,10 @@
package org.apache.shardingsphere.example.transaction.base.seata.spring.boot;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.Profile;
import javax.annotation.PostConstruct;
@@ -37,7 +35,6 @@ import javax.annotation.PostConstruct;
*/
@SpringBootApplication
@Import(TransactionConfiguration.class)
-@Profile("sharding-databases-tables")
public class ExampleMainApplication {
@Autowired
diff --git a/examples/shardingsphere-jdbc-example/transaction-example/transaction-base-seata-spring-boot-example/src/main/resources/application.properties b/examples/shardingsphere-jdbc-example/transaction-example/transaction-base-seata-spring-boot-example/src/main/resources/application.properties
new file mode 100644
index 0000000..ed74ba2
--- /dev/null
+++ b/examples/shardingsphere-jdbc-example/transaction-example/transaction-base-seata-spring-boot-example/src/main/resources/application.properties
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+spring.profiles.active=sharding-databases-tables
+#spring.profiles.active=sharding-databases
+#spring.profiles.active=sharding-tables
+