Loading sharding-jdbc-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/table/raw/jdbc/YamlConfigurationExample.java +1 −3 Original line number Diff line number Diff line Loading @@ -24,12 +24,10 @@ import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlEncryptDataSourceFact import javax.sql.DataSource; import java.io.File; import java.io.IOException; import java.sql.SQLException; public class YamlConfigurationExample { public static void main(final String[] args) throws SQLException, IOException { public static void main(final String[] args) { DataSource dataSource = YamlEncryptDataSourceFactory.createDataSource(getFile()); CommonService userService = getUserService(dataSource); userService.initEnvironment(); Loading sharding-jdbc-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/sharding-databases.yaml +14 −15 Original line number Diff line number Diff line dataSources: ds_0: !!com.zaxxer.hikari.HikariDataSource dataSource: !!com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 username: root password: ds_1: !!com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 username: root password: shardingRule: broadcastTables: - t_country encryptRule: encryptors: name_encryptror: type: aes qualifiedColumns: t_user.name props: sql.show: false aes.key.value: 123456 pwd_encryptror: type: assistedTest qualifiedColumns: t_user.pwd assistedQueryColumns: t_user.assisted_query_pwd Loading
sharding-jdbc-example/encrypt-example/encrypt-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/encrypt/table/raw/jdbc/YamlConfigurationExample.java +1 −3 Original line number Diff line number Diff line Loading @@ -24,12 +24,10 @@ import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlEncryptDataSourceFact import javax.sql.DataSource; import java.io.File; import java.io.IOException; import java.sql.SQLException; public class YamlConfigurationExample { public static void main(final String[] args) throws SQLException, IOException { public static void main(final String[] args) { DataSource dataSource = YamlEncryptDataSourceFactory.createDataSource(getFile()); CommonService userService = getUserService(dataSource); userService.initEnvironment(); Loading
sharding-jdbc-example/encrypt-example/encrypt-raw-jdbc-example/src/main/resources/META-INF/sharding-databases.yaml +14 −15 Original line number Diff line number Diff line dataSources: ds_0: !!com.zaxxer.hikari.HikariDataSource dataSource: !!com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 username: root password: ds_1: !!com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 username: root password: shardingRule: broadcastTables: - t_country encryptRule: encryptors: name_encryptror: type: aes qualifiedColumns: t_user.name props: sql.show: false aes.key.value: 123456 pwd_encryptror: type: assistedTest qualifiedColumns: t_user.pwd assistedQueryColumns: t_user.assisted_query_pwd