This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 b57b515cdba Remove the encrypt examples and use the automatically
generated examples. (#21921)
b57b515cdba is described below
commit b57b515cdbaeb48d8725acaf56225f0a813f50bc
Author: Guocheng Tang <[email protected]>
AuthorDate: Sat Nov 5 21:14:25 2022 +0800
Remove the encrypt examples and use the automatically generated examples.
(#21921)
* Remove the mixed examples and use the automatically generated examples.
* merger master
* Remove the encrypt examples and use the automatically generated examples.
---
.../encrypt-raw-jdbc-example/pom.xml | 42 -----------
.../jdbc/EncryptRawJavaConfigurationExample.java | 43 ------------
.../jdbc/EncryptRawYamlConfigurationExample.java | 45 ------------
.../jdbc/config/EncryptDatabasesConfiguration.java | 56 ---------------
.../main/resources/META-INF/encrypt-databases.yaml | 45 ------------
.../src/main/resources/logback.xml | 34 ---------
.../encrypt-spring-boot-jpa-example/pom.xml | 50 -------------
.../boot/jpa/EncryptSpringBootJpaExample.java | 41 -----------
.../application-encrypt-databases.properties | 37 ----------
.../src/main/resources/application.properties | 22 ------
.../src/main/resources/logback.xml | 36 ----------
.../encrypt-spring-boot-mybatis-example/pom.xml | 50 -------------
.../mybatis/EncryptSpringBootMybatisExample.java | 41 -----------
.../src/main/resources/META-INF/mybatis-config.xml | 26 -------
.../application-encrypt-databases.properties | 37 ----------
.../src/main/resources/application.properties | 20 ------
.../src/main/resources/logback.xml | 36 ----------
.../encrypt-spring-namespace-jpa-example/pom.xml | 42 -----------
.../jpa/EncryptSpringNamespaceJpaExample.java | 36 ----------
.../META-INF/application-encrypt-databases.xml | 81 ----------------------
.../src/main/resources/logback.xml | 34 ---------
.../pom.xml | 42 -----------
.../EncryptSpringNamespaceMybatisExample.java | 36 ----------
.../META-INF/application-encrypt-databases.xml | 75 --------------------
.../src/main/resources/logback.xml | 34 ---------
.../single-feature-example/encrypt-example/pom.xml | 40 -----------
.../single-feature-example/pom.xml | 1 -
27 files changed, 1082 deletions(-)
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/pom.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/pom.xml
deleted file mode 100644
index b14043f8003..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>encrypt-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>encrypt-raw-jdbc-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-raw-jdbc</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/EncryptRawJavaConfigurationExample.java
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/EncryptRawJavaConfigurationExample.java
deleted file mode 100644
index 4728f9d69b1..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/EncryptRawJavaConfigurationExample.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.
- */
-
-/*
- * Please make sure primary replica data replication sync on MySQL is running
correctly. Otherwise this example will query empty data from replica.
- */
-
-package org.apache.shardingsphere.example.encrypt.raw.jdbc;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import
org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
-import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
-import
org.apache.shardingsphere.example.encrypt.raw.jdbc.config.EncryptDatabasesConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-
-public final class EncryptRawJavaConfigurationExample {
-
- public static void main(final String[] args) throws SQLException {
- DataSource dataSource = new
EncryptDatabasesConfiguration().getDataSource();
- ExampleExecuteTemplate.run(getExampleService(dataSource));
- }
-
- private static ExampleService getExampleService(final DataSource
dataSource) {
- return new UserServiceImpl(new UserRepositoryImpl(dataSource));
- }
-}
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/EncryptRawYamlConfigurationExample.java
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/EncryptRawYamlConfigurationExample.java
deleted file mode 100644
index 5d534347840..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/EncryptRawYamlConfigurationExample.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.shardingsphere.example.encrypt.raw.jdbc;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import
org.apache.shardingsphere.example.core.jdbc.repository.UserRepositoryImpl;
-import org.apache.shardingsphere.example.core.jdbc.service.UserServiceImpl;
-import
org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
-
-import javax.sql.DataSource;
-import java.io.File;
-import java.io.IOException;
-import java.sql.SQLException;
-
-public final class EncryptRawYamlConfigurationExample {
-
- public static void main(final String[] args) throws SQLException,
IOException {
- DataSource dataSource =
YamlShardingSphereDataSourceFactory.createDataSource(getFile());
- ExampleExecuteTemplate.run(getExampleService(dataSource));
- }
-
- private static File getFile() {
- return new
File(EncryptRawYamlConfigurationExample.class.getResource("/META-INF/encrypt-databases.yaml").getFile());
- }
-
- private static ExampleService getExampleService(final DataSource
dataSource) {
- return new UserServiceImpl(new UserRepositoryImpl(dataSource));
- }
-}
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/config/EncryptDatabasesConfiguration.java
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/config/EncryptDatabasesConfiguration.java
deleted file mode 100644
index 78ac314902e..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/raw/jdbc/config/EncryptDatabasesConfiguration.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.shardingsphere.example.encrypt.raw.jdbc.config;
-
-import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
-import
org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
-import
org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
-import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-
-import javax.sql.DataSource;
-import java.sql.SQLException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Properties;
-
-public final class EncryptDatabasesConfiguration implements
ExampleConfiguration {
-
- @Override
- public DataSource getDataSource() {
- Properties props = new Properties();
- props.setProperty("aes-key-value", "123456");
- EncryptColumnRuleConfiguration columnConfigAes = new
EncryptColumnRuleConfiguration("username", "username", "", "",
"username_plain", "name_encryptor", null);
- EncryptColumnRuleConfiguration columnConfigTest = new
EncryptColumnRuleConfiguration("pwd", "pwd", "assisted_query_pwd", "", "",
"pwd_encryptor", null);
- EncryptTableRuleConfiguration encryptTableRuleConfig = new
EncryptTableRuleConfiguration("t_user", Arrays.asList(columnConfigAes,
columnConfigTest), null);
- Map<String, AlgorithmConfiguration> encryptAlgorithmConfigs = new
LinkedHashMap<>(2, 1);
- encryptAlgorithmConfigs.put("name_encryptor", new
AlgorithmConfiguration("AES", props));
- encryptAlgorithmConfigs.put("pwd_encryptor", new
AlgorithmConfiguration("assistedTest", props));
- EncryptRuleConfiguration encryptRuleConfig = new
EncryptRuleConfiguration(Collections.singleton(encryptTableRuleConfig),
encryptAlgorithmConfigs);
- try {
- return
ShardingSphereDataSourceFactory.createDataSource(DataSourceUtil.createDataSource("demo_ds"),
Collections.singleton(encryptRuleConfig), props);
- } catch (final SQLException ex) {
- ex.printStackTrace();
- return null;
- }
- }
-}
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/encrypt-databases.yaml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/encrypt-databases.yaml
deleted file mode 100644
index e3069851e47..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/encrypt-databases.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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.
-#
-
-dataSources:
- unique_ds:
- dataSourceClassName: com.zaxxer.hikari.HikariDataSource
- driverClassName: com.mysql.jdbc.Driver
- jdbcUrl:
jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
- username: root
- password:
-
-rules:
-- !ENCRYPT
- tables:
- t_user:
- columns:
- username:
- plainColumn: username_plain
- cipherColumn: username
- encryptorName: name-encryptor
- pwd:
- cipherColumn: pwd
- assistedQueryColumn: assisted_query_pwd
- encryptorName: pwd_encryptor
- encryptors:
- name-encryptor:
- type: AES
- props:
- aes-key-value: 123456abc
- pwd_encryptor:
- type: assistedTest
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/logback.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/logback.xml
deleted file mode 100644
index 053716e53ac..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<configuration>
- <property name="log.context.name" value="encrypt-raw-jdbc-example" />
- <property name="log.charset" value="UTF-8" />
- <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger]
%msg %n" />
- <contextName>${log.context.name}</contextName>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder charset="${log.charset}">
- <pattern>${log.pattern}</pattern>
- </encoder>
- </appender>
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/pom.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/pom.xml
deleted file mode 100644
index e961ae17bf8..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>encrypt-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>encrypt-spring-boot-jpa-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-spring-jpa</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
-
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/boot/jpa/EncryptSpringBootJpaExample.java
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/boot/jpa/EncryptSpringBootJpaExample.java
deleted file mode 100644
index 15ff30d319e..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/boot/jpa/EncryptSpringBootJpaExample.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.shardingsphere.example.encrypt.spring.boot.jpa;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.domain.EntityScan;
-import
org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.annotation.ComponentScan;
-
-import java.sql.SQLException;
-
-@ComponentScan("org.apache.shardingsphere.example.core.jpa")
-@EntityScan(basePackages = "org.apache.shardingsphere.example.core.jpa.entity")
-@SpringBootApplication(exclude = JtaAutoConfiguration.class)
-public class EncryptSpringBootJpaExample {
-
- public static void main(String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext =
SpringApplication.run(EncryptSpringBootJpaExample.class, args)) {
-
ExampleExecuteTemplate.run(applicationContext.getBean(ExampleService.class));
- }
- }
-}
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/application-encrypt-databases.properties
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/application-encrypt-databases.properties
deleted file mode 100644
index e03ba151d58..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/application-encrypt-databases.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# 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.shardingsphere.datasource.names=ds
-
-spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.ds.username=root
-spring.shardingsphere.datasource.ds.password=
-
-spring.shardingsphere.rules.encrypt.encryptors.name-encryptor.type=AES
-spring.shardingsphere.rules.encrypt.encryptors.name-encryptor.props.aes-key-value=123456abc
-spring.shardingsphere.rules.encrypt.encryptors.pwd-encryptor.type=AES
-spring.shardingsphere.rules.encrypt.encryptors.pwd-encryptor.props.aes-key-value=123456abc
-
-spring.shardingsphere.rules.encrypt.tables.t_user.columns.username.cipher-column=username
-spring.shardingsphere.rules.encrypt.tables.t_user.columns.username.encryptor-name=name-encryptor
-spring.shardingsphere.rules.encrypt.tables.t_user.columns.pwd.cipher-column=pwd
-spring.shardingsphere.rules.encrypt.tables.t_user.columns.pwd.encryptor-name=pwd-encryptor
-
-spring.shardingsphere.props.query-with-cipher-column=true
-spring.shardingsphere.props.sql-show=true
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/application.properties
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/application.properties
deleted file mode 100644
index c1d415a8b0d..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# 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.jpa.properties.hibernate.hbm2ddl.auto=create-drop
-spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
-spring.jpa.properties.hibernate.show_sql=false
-
-spring.profiles.active=encrypt-databases
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/logback.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/logback.xml
deleted file mode 100644
index 8dd6239a654..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-jpa-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<configuration>
- <property name="log.context.name" value="encrypt-spring-boot-jpa-example"
/>
- <property name="log.charset" value="UTF-8" />
- <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger]
%msg %n" />
- <contextName>${log.context.name}</contextName>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder charset="${log.charset}">
- <pattern>${log.pattern}</pattern>
- </encoder>
- </appender>
- <logger name="org.springframework" level="WARN" />
- <logger name="com.zaxxer.hikari" level="WARN" />
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/pom.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/pom.xml
deleted file mode 100644
index 2155111a064..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>encrypt-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>encrypt-spring-boot-mybatis-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-spring-mybatis</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
-
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mybatis.spring.boot</groupId>
- <artifactId>mybatis-spring-boot-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/boot/mybatis/EncryptSpringBootMybatisExample.java
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/boot/mybatis/EncryptSpringBootMybatisExample.java
deleted file mode 100644
index 51d487286ce..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/boot/mybatis/EncryptSpringBootMybatisExample.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.shardingsphere.example.encrypt.spring.boot.mybatis;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import
org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.annotation.ComponentScan;
-
-import java.sql.SQLException;
-
-@ComponentScan("org.apache.shardingsphere.example.core.mybatis")
-@MapperScan(basePackages =
"org.apache.shardingsphere.example.core.mybatis.repository")
-@SpringBootApplication(exclude = JtaAutoConfiguration.class)
-public class EncryptSpringBootMybatisExample {
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext =
SpringApplication.run(EncryptSpringBootMybatisExample.class, args)) {
- ExampleExecuteTemplate.run(applicationContext.getBean("encrypt",
ExampleService.class));
- }
- }
-}
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml
deleted file mode 100644
index a24bcef7a6e..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/META-INF/mybatis-config.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ~ 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.
- -->
-
-<!DOCTYPE configuration
- PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-config.dtd">
-<configuration>
- <mappers>
- <mapper resource="META-INF/mappers/UserMapper.xml"/>
- </mappers>
-</configuration>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/application-encrypt-databases.properties
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/application-encrypt-databases.properties
deleted file mode 100644
index e03ba151d58..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/application-encrypt-databases.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# 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.shardingsphere.datasource.names=ds
-
-spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource
-spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver
-spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
-spring.shardingsphere.datasource.ds.username=root
-spring.shardingsphere.datasource.ds.password=
-
-spring.shardingsphere.rules.encrypt.encryptors.name-encryptor.type=AES
-spring.shardingsphere.rules.encrypt.encryptors.name-encryptor.props.aes-key-value=123456abc
-spring.shardingsphere.rules.encrypt.encryptors.pwd-encryptor.type=AES
-spring.shardingsphere.rules.encrypt.encryptors.pwd-encryptor.props.aes-key-value=123456abc
-
-spring.shardingsphere.rules.encrypt.tables.t_user.columns.username.cipher-column=username
-spring.shardingsphere.rules.encrypt.tables.t_user.columns.username.encryptor-name=name-encryptor
-spring.shardingsphere.rules.encrypt.tables.t_user.columns.pwd.cipher-column=pwd
-spring.shardingsphere.rules.encrypt.tables.t_user.columns.pwd.encryptor-name=pwd-encryptor
-
-spring.shardingsphere.props.query-with-cipher-column=true
-spring.shardingsphere.props.sql-show=true
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/application.properties
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/application.properties
deleted file mode 100644
index 1f8d8986317..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/application.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# 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.
-#
-
-mybatis.config-location=classpath:META-INF/mybatis-config.xml
-
-spring.profiles.active=encrypt-databases
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/logback.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/logback.xml
deleted file mode 100644
index 37183950ebc..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-boot-mybatis-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<configuration>
- <property name="log.context.name"
value="encrypt-spring-boot-mybatis-example" />
- <property name="log.charset" value="UTF-8" />
- <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger]
%msg %n" />
- <contextName>${log.context.name}</contextName>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder charset="${log.charset}">
- <pattern>${log.pattern}</pattern>
- </encoder>
- </appender>
- <logger name="org.springframework" level="WARN" />
- <logger name="com.zaxxer.hikari" level="WARN" />
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/pom.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/pom.xml
deleted file mode 100644
index f5d842fcbee..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>encrypt-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>encrypt-spring-namespace-jpa-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-spring-jpa</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core-spring-namespace</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/namespace/jpa/EncryptSpringNamespaceJpaExample.java
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/namespace/jpa/EncryptSpringNamespaceJpaExample.java
deleted file mode 100644
index e16a23267b1..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/namespace/jpa/EncryptSpringNamespaceJpaExample.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.shardingsphere.example.encrypt.spring.namespace.jpa;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.sql.SQLException;
-
-public class EncryptSpringNamespaceJpaExample {
-
- private static final String CONFIG_FILE =
"META-INF/application-encrypt-databases.xml";
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext = new
ClassPathXmlApplicationContext(CONFIG_FILE)) {
-
ExampleExecuteTemplate.run(applicationContext.getBean("encryptExample",
ExampleService.class));
- }
- }
-}
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/resources/META-INF/application-encrypt-databases.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/resources/META-INF/application-encrypt-databases.xml
deleted file mode 100644
index 8515f3b7d07..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/resources/META-INF/application-encrypt-databases.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:p="http://www.springframework.org/schema/p"
- xmlns:tx="http://www.springframework.org/schema/tx"
-
xmlns:shardingsphere="http://shardingsphere.apache.org/schema/shardingsphere/datasource"
-
xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
-
http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
-
http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/tx
-
http://www.springframework.org/schema/tx/spring-tx.xsd
-
http://shardingsphere.apache.org/schema/shardingsphere/datasource
-
http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
-
http://shardingsphere.apache.org/schema/shardingsphere/encrypt
-
http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
- ">
- <tx:annotation-driven/>
- <context:annotation-config/>
- <context:component-scan
base-package="org.apache.shardingsphere.example.core.jpa"/>
-
- <bean id="ds" class="com.zaxxer.hikari.HikariDataSource"
destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl"
value="jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8"/>
- <property name="username" value="root"/>
- <property name="password" value="root"/>
- </bean>
-
- <bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager"
p:entityManagerFactory-ref="entityManagerFactory"/>
-
- <bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
- <property name="dataSource" ref="encryptDataSource"/>
- <property name="jpaVendorAdapter">
- <bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
p:database="MYSQL"/>
- </property>
- <property name="packagesToScan"
value="org.apache.shardingsphere.example.core.jpa.entity"/>
- <property name="jpaProperties">
- <props>
- <prop
key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
- <prop key="hibernate.hbm2ddl.auto">create-drop</prop>
- <prop key="hibernate.show_sql">false</prop>
- </props>
- </property>
- </bean>
-
- <encrypt:encrypt-algorithm id="name_encryptor" type="AES">
- <props>
- <prop key="aes-key-value">123456</prop>
- </props>
- </encrypt:encrypt-algorithm>
-
- <encrypt:encrypt-algorithm id="pwd_encryptor" type="assistedTest"/>
-
- <encrypt:rule id="encryptRule">
- <encrypt:table name="t_user">
- <encrypt:column logic-column="username" cipher-column="username"
plain-column="username_plain" encrypt-algorithm-ref="name_encryptor"/>
- <encrypt:column logic-column="pwd" cipher-column="pwd"
assisted-query-column="assisted_query_pwd"
encrypt-algorithm-ref="pwd_encryptor"/>
- </encrypt:table>
- </encrypt:rule>
-
- <shardingsphere:data-source id="encryptDataSource" data-source-names="ds"
rule-refs="encryptRule"/>
-</beans>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/resources/logback.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/resources/logback.xml
deleted file mode 100644
index dcc8ef0be44..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-jpa-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<configuration>
- <property name="log.context.name"
value="encrypt-spring-namespace-jpa-example" />
- <property name="log.charset" value="UTF-8" />
- <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger]
%msg %n" />
- <contextName>${log.context.name}</contextName>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder charset="${log.charset}">
- <pattern>${log.pattern}</pattern>
- </encoder>
- </appender>
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/pom.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/pom.xml
deleted file mode 100644
index 71b5be4a432..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>encrypt-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>encrypt-spring-namespace-mybatis-example</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>example-spring-mybatis</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-jdbc-core-spring-namespace</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/namespace/mybatis/EncryptSpringNamespaceMybatisExample.java
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/namespace/mybatis/EncryptSpringNamespaceMybatisExample.java
deleted file mode 100644
index 71c1917a079..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/java/org/apache/shardingsphere/example/encrypt/spring/namespace/mybatis/EncryptSpringNamespaceMybatisExample.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.shardingsphere.example.encrypt.spring.namespace.mybatis;
-
-import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.sql.SQLException;
-
-public final class EncryptSpringNamespaceMybatisExample {
-
- private static final String CONFIG_FILE =
"META-INF/application-encrypt-databases.xml";
-
- public static void main(final String[] args) throws SQLException {
- try (ConfigurableApplicationContext applicationContext = new
ClassPathXmlApplicationContext(CONFIG_FILE)) {
- ExampleExecuteTemplate.run(applicationContext.getBean("encrypt",
ExampleService.class));
- }
- }
-}
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/resources/META-INF/application-encrypt-databases.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/resources/META-INF/application-encrypt-databases.xml
deleted file mode 100644
index ef653a38fcb..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/resources/META-INF/application-encrypt-databases.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xmlns:shardingsphere="http://shardingsphere.apache.org/schema/shardingsphere/datasource"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
-
xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
-
http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/tx
-
http://www.springframework.org/schema/tx/spring-tx.xsd
- http://www.springframework.org/schema/context
-
http://www.springframework.org/schema/context/spring-context.xsd
-
http://shardingsphere.apache.org/schema/shardingsphere/datasource
-
http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
-
http://shardingsphere.apache.org/schema/shardingsphere/encrypt
-
http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
- ">
- <context:component-scan
base-package="org.apache.shardingsphere.example.core.mybatis" />
-
- <bean id="ds" class="com.zaxxer.hikari.HikariDataSource"
destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="jdbcUrl"
value="jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- </bean>
-
- <encrypt:encrypt-algorithm id="name_encryptor" type="AES">
- <props>
- <prop key="aes-key-value">123456</prop>
- </props>
- </encrypt:encrypt-algorithm>
- <encrypt:encrypt-algorithm id="pwd_encryptor" type="assistedTest" />
-
- <encrypt:rule id="encryptRule">
- <encrypt:table name="t_user">
- <encrypt:column logic-column="username" cipher-column="username"
plain-column="username_plain" encrypt-algorithm-ref="name_encryptor" />
- <encrypt:column logic-column="pwd" cipher-column="pwd"
assisted-query-column="assisted_query_pwd"
encrypt-algorithm-ref="pwd_encryptor" />
- </encrypt:table>
- </encrypt:rule>
-
- <shardingsphere:data-source id="encryptDataSource" data-source-names="ds"
rule-refs="encryptRule" />
-
- <bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="encryptDataSource" />
- </bean>
- <tx:annotation-driven />
-
- <bean id="sqlSessionFactory"
class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="encryptDataSource"/>
- <property name="mapperLocations"
value="classpath*:META-INF/mappers/*.xml"/>
- </bean>
-
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage"
value="org.apache.shardingsphere.example.core.mybatis.repository"/>
- <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
- </bean>
-</beans>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/resources/logback.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/resources/logback.xml
deleted file mode 100644
index 8238d125c80..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/encrypt-spring-namespace-mybatis-example/src/main/resources/logback.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<configuration>
- <property name="log.context.name"
value="encrypt-spring-namespace-mybatis-example" />
- <property name="log.charset" value="UTF-8" />
- <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger]
%msg %n" />
- <contextName>${log.context.name}</contextName>
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder charset="${log.charset}">
- <pattern>${log.pattern}</pattern>
- </encoder>
- </appender>
- <root>
- <level value="INFO" />
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/pom.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/pom.xml
deleted file mode 100644
index 9752ceecd78..00000000000
---
a/examples/shardingsphere-jdbc-example/single-feature-example/encrypt-example/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shardingsphere.example</groupId>
- <artifactId>single-feature-example</artifactId>
- <version>${revision}</version>
- </parent>
- <artifactId>encrypt-example</artifactId>
- <name>${project.artifactId}</name>
-
- <packaging>pom</packaging>
-
- <modules>
- <module>encrypt-raw-jdbc-example</module>
- <module>encrypt-spring-boot-mybatis-example</module>
- <module>encrypt-spring-boot-jpa-example</module>
- <module>encrypt-spring-namespace-mybatis-example</module>
- <module>encrypt-spring-namespace-jpa-example</module>
- </modules>
-</project>
diff --git
a/examples/shardingsphere-jdbc-example/single-feature-example/pom.xml
b/examples/shardingsphere-jdbc-example/single-feature-example/pom.xml
index 6ea9e4260c7..610ea869d55 100644
--- a/examples/shardingsphere-jdbc-example/single-feature-example/pom.xml
+++ b/examples/shardingsphere-jdbc-example/single-feature-example/pom.xml
@@ -31,7 +31,6 @@
<modules>
<module>cluster-mode-example</module>
- <module>encrypt-example</module>
<module>extension-example</module>
<module>shadow-example</module>
<module>sharding-example</module>