未验证 提交 5e24ee97 编写于 作者: L Liang Zhang 提交者: GitHub

Refactor encrypt java API package structure (#5922)

* refactor package of org.apache.shardingsphere.encrypt.api.config

* refactor EncryptColumnRuleConfiguration

* update doc
上级 eb845d79
......@@ -11,12 +11,37 @@ weight = 3
| *名称* | *数据类型* | *说明* |
| --------------------- | ------------------------------------------- | ------------ |
| tables (+) | Collection\<EncryptTableRuleConfiguration\> | 加密表规则列表 |
| encryptStrategies (+) | Collection\<EncryptStrategyConfiguration\> | 加解密策略列表 |
| tables (+) | Collection\<EncryptTableRuleConfiguration\> | 加密表规则列表 |
## 加密表规则配置
类名称:org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration
可配置属性:
| *名称* | *数据类型* | *说明* |
| ----------- | -------------------------------------------- | ------------ |
| name | String | 表名称 |
| columns (+) | Collection\<EncryptColumnRuleConfiguration\> | 加密列规则列表 |
### 加密列规则配置
类名称:org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration
可配置属性:
| *名称* | *数据类型* | *说明* |
| ----------------------- | -------- | ------------- |
| logicColumn | String | 逻辑列名称 |
| cipherColumn | String | 密文列名称 |
| assistedQueryColumn (?) | String | 查询辅助列名称 |
| plainColumn (?) | String | 原文列名称 |
| encryptStrategyName | String | 加密策略名称 |
## 加解密策略配置
类名称:org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration
类名称:org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration
可配置属性:
......@@ -53,28 +78,3 @@ Apache ShardingSphere 内置的加解密算法实现类包括:
| *名称* | *数据类型* | *说明* |
| ------------- | --------- | ------------- |
| rc4.key.value | String | RC4 使用的 KEY |
## 加密表规则配置
类名称:org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration
可配置属性:
| *名称* | *数据类型* | *说明* |
| ----------- | -------------------------------------------- | --------- |
| name | String | 表名称 |
| columns (+) | Collection\<EncryptColumnRuleConfiguration\> | 加密列列表 |
### 加密列规则配置
类名称:org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration
可配置属性:
| *名称* | *数据类型* | *说明* |
| ----------------------- | -------- | ------------- |
| name | String | 逻辑列名称 |
| plainColumn (?) | String | 原文列名称 |
| cipherColumn | String | 密文列名称 |
| assistedQueryColumn (?) | String | 查询辅助列名称 |
| encryptStrategyName | String | 加密策略名称 |
......@@ -11,12 +11,37 @@ Attributes:
| *Name* | *DataType* | *Description* |
| --------------------- | ------------------------------------------- | ------------------- |
| tables (+) | Collection\<EncryptTableRuleConfiguration\> | Encrypt table rules |
| encryptStrategies (+) | Collection\<EncryptStrategyConfiguration\> | Encrypt strategies |
| tables (+) | Collection\<EncryptTableRuleConfiguration\> | Encrypt table rules |
## Encrypt Table Rule Configuration
Class name: org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration
Attributes:
| *Name* | *DataType* | *Description* |
| ----------- | -------------------------------------------- | -------------------- |
| name | String | Table name |
| columns (+) | Collection\<EncryptColumnRuleConfiguration\> | Encrypt column rules |
### Encrypt Column Rule Configuration
Class name: org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration
Attributes:
| *Name* | *DataType* | *Description* |
| ----------------------- | ---------- | -------------------------- |
| logicColumn | String | Logic column name |
| cipherColumn | String | Cipher column name |
| assistedQueryColumn (?) | String | Assisted query column name |
| plainColumn (?) | String | Plain column name |
| encryptStrategyName | String | Encrypt strategy name |
## Encrypt Strategy Configuration
Class name: org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration
Class name: org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration
Attributes:
......@@ -52,29 +77,4 @@ Attributes:
| *Name* | *DataType* | *Description* |
| ------------- | ---------- | ------------- |
| rc4.key.value | String | RC4 KEY |
## Encrypt Table Rule Configuration
Class name: org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration
Attributes:
| *Name* | *DataType* | *Description* |
| ----------- | -------------------------------------------- | --------------- |
| name | String | Table name |
| columns (+) | Collection\<EncryptColumnRuleConfiguration\> | Encrypt columns |
### Encrypt Column Rule Configuration
Class name: org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration
Attributes:
| *Name* | *DataType* | *Description* |
| ----------------------- | ---------- | -------------------------- |
| name | String | Logic column name |
| plainColumn (?) | String | Plain column name |
| cipherColumn | String | Cipher column name |
| assistedQueryColumn (?) | String | Assisted query column name |
| encryptStrategyName | String | Encrypt strategy name |
| rc4.key.value | String | RC4 KEY |
\ No newline at end of file
......@@ -18,10 +18,10 @@
package org.apache.shardingsphere.example.orchestration.raw.jdbc.config.local;
import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingSphereDataSourceFactory;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
import org.apache.shardingsphere.orchestration.center.config.CenterConfiguration;
......@@ -55,7 +55,7 @@ public final class LocalEncryptConfiguration implements ExampleConfiguration {
Properties properties = new Properties();
properties.setProperty("aes.key.value", "123456");
EncryptStrategyConfiguration aesRuleConfiguration = new EncryptStrategyConfiguration("status_encrypt_strategy", "aes", properties);
EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("status", "", "status", "", "status_encrypt_strategy");
EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("status", "status", "", "", "status_encrypt_strategy");
EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration("t_order", Collections.singleton(columnConfigAes));
return new EncryptRuleConfiguration(Collections.singleton(aesRuleConfiguration), Collections.singleton(tableConfig));
}
......
......@@ -18,10 +18,10 @@
package org.apache.shardingsphere.example.encrypt.table.raw.jdbc.config;
import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
......@@ -40,8 +40,8 @@ public final class EncryptDatabasesConfiguration implements ExampleConfiguration
Properties properties = new Properties();
properties.setProperty("aes.key.value", "123456");
properties.setProperty("query.with.cipher.column", "true");
EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("user_name", "user_name_plain", "user_name", "", "name_encrypt_strategy");
EncryptColumnRuleConfiguration columnConfigTest = new EncryptColumnRuleConfiguration("pwd", "", "pwd", "assisted_query_pwd", "pwd_encrypt_strategy");
EncryptColumnRuleConfiguration columnConfigAes = new EncryptColumnRuleConfiguration("user_name", "user_name", "", "user_name_plain", "name_encrypt_strategy");
EncryptColumnRuleConfiguration columnConfigTest = new EncryptColumnRuleConfiguration("pwd", "pwd", "assisted_query_pwd", "", "pwd_encrypt_strategy");
EncryptTableRuleConfiguration tableConfig = new EncryptTableRuleConfiguration("t_user", Arrays.asList(columnConfigAes, columnConfigTest));
Collection<EncryptStrategyConfiguration> encryptStrategyConfigurations = new LinkedList<>();
encryptStrategyConfigurations.add(new EncryptStrategyConfiguration("name_encrypt_strategy", "aes", properties));
......
......@@ -25,11 +25,11 @@ dataSources:
rules:
- !ENCRYPT
encryptStrategies:
name_encryptror:
name_encrypt_strategy:
type: aes
props:
aes.key.value: 123456
pwd_encryptror:
pwd_encrypt_strategy:
type: assistedTest
tables:
t_user:
......@@ -37,11 +37,11 @@ rules:
user_name:
plainColumn: user_name_plain
cipherColumn: user_name
encryptStrategyName: name_encryptror
encryptStrategyName: name_encrypt_strategy
pwd:
cipherColumn: pwd
assistedQueryColumn: assisted_query_pwd
encryptStrategyName: pwd_encryptror
encryptStrategyName: pwd_encrypt_strategy
props:
query.with.cipher.column: true
......@@ -18,10 +18,10 @@
package org.apache.shardingsphere.example.shadow.table.raw.jdbc.config;
import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
import org.apache.shardingsphere.shadow.api.config.ShadowRuleConfiguration;
......@@ -55,8 +55,8 @@ public final class EncryptShadowDatabasesConfiguration implements ExampleConfigu
Collection<EncryptStrategyConfiguration> result = new LinkedList<>();
Properties properties = new Properties();
properties.setProperty("aes.key.value", "123456");
EncryptStrategyConfiguration nameEncryptStrategyConfiguration = new EncryptStrategyConfiguration("name_encryptror", "aes", properties);
EncryptStrategyConfiguration pwdEncryptStrategyConfiguration = new EncryptStrategyConfiguration("pwd_encryptror", "assistedTest", null);
EncryptStrategyConfiguration nameEncryptStrategyConfiguration = new EncryptStrategyConfiguration("name_encrypt_strategy", "aes", properties);
EncryptStrategyConfiguration pwdEncryptStrategyConfiguration = new EncryptStrategyConfiguration("pwd_encrypt_strategy", "assistedTest", null);
result.add(nameEncryptStrategyConfiguration);
result.add(pwdEncryptStrategyConfiguration);
return result;
......@@ -65,8 +65,8 @@ public final class EncryptShadowDatabasesConfiguration implements ExampleConfigu
private Collection<EncryptTableRuleConfiguration> getEncryptTableRuleConfigurations() {
Collection<EncryptTableRuleConfiguration> result = new LinkedList<>();
Collection<EncryptColumnRuleConfiguration> columns = new LinkedList<>();
columns.add(new EncryptColumnRuleConfiguration("user_name", "user_name_plain", "user_name", "", "name_encryptror"));
columns.add(new EncryptColumnRuleConfiguration("pwd", "", "pwd", "assisted_query_pwd", "pwd_encryptror"));
columns.add(new EncryptColumnRuleConfiguration("user_name", "user_name", "", "user_name_plain", "name_encrypt_strategy"));
columns.add(new EncryptColumnRuleConfiguration("pwd", "pwd", "assisted_query_pwd", "", "pwd_encrypt_strategy"));
result.add(new EncryptTableRuleConfiguration("t_user", columns));
return result;
}
......
......@@ -35,11 +35,11 @@ rules:
- !ENCRYPT
encryptStrategies:
name_encryptror:
name_encrypt_strategy:
type: aes
props:
aes.key.value: 123456
pwd_encryptror:
pwd_encrypt_strategy:
type: assistedTest
tables:
t_user:
......@@ -47,11 +47,11 @@ rules:
user_name:
plainColumn: user_name_plain
cipherColumn: user_name
encryptStrategyName: name_encryptror
encryptStrategyName: name_encrypt_strategy
pwd:
cipherColumn: pwd
assistedQueryColumn: assisted_query_pwd
encryptStrategyName: pwd_encryptror
encryptStrategyName: pwd_encrypt_strategy
props:
query.with.cipher.column: true
......
......@@ -19,7 +19,7 @@ package org.apache.shardingsphere.orchestration.core.configcenter;
import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.masterslave.api.config.MasterSlaveRuleConfiguration;
import org.apache.shardingsphere.orchestration.center.ConfigCenterRepository;
import org.apache.shardingsphere.orchestration.core.configuration.YamlDataSourceConfiguration;
......
......@@ -19,7 +19,7 @@ package org.apache.shardingsphere.orchestration.core.configcenter.listener;
import lombok.SneakyThrows;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.masterslave.api.config.MasterSlaveRuleConfiguration;
import org.apache.shardingsphere.orchestration.center.ConfigCenterRepository;
......
......@@ -19,6 +19,8 @@ package org.apache.shardingsphere.encrypt.api.config;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import java.util.Collection;
......
......@@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.shardingsphere.encrypt.api.config;
package org.apache.shardingsphere.encrypt.api.config.rule;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
......@@ -27,13 +27,13 @@ import lombok.RequiredArgsConstructor;
@Getter
public final class EncryptColumnRuleConfiguration {
private final String name;
private final String plainColumn;
private final String logicColumn;
private final String cipherColumn;
private final String assistedQueryColumn;
private final String plainColumn;
private final String encryptStrategyName;
}
......@@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.shardingsphere.encrypt.api.config;
package org.apache.shardingsphere.encrypt.api.config.strategy;
import lombok.Getter;
import org.apache.shardingsphere.infra.config.TypedSPIConfiguration;
......
......@@ -17,6 +17,7 @@
package org.apache.shardingsphere.encrypt.api.config;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.junit.Test;
import java.util.Properties;
......
......@@ -19,10 +19,10 @@ package org.apache.shardingsphere.encrypt.rule;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.strategy.spi.EncryptAlgorithm;
import org.apache.shardingsphere.encrypt.strategy.spi.QueryAssistedEncryptAlgorithm;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
......
......@@ -18,8 +18,8 @@
package org.apache.shardingsphere.encrypt.rule;
import com.google.common.collect.Maps;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
import java.util.Collection;
......@@ -39,7 +39,7 @@ public final class EncryptTable {
public EncryptTable(final EncryptTableRuleConfiguration config) {
columns = new LinkedHashMap<>(config.getColumns().size());
for (EncryptColumnRuleConfiguration each : config.getColumns()) {
columns.put(each.getName(), new EncryptColumn(each.getCipherColumn(), each.getAssistedQueryColumn(), each.getPlainColumn(), each.getEncryptStrategyName()));
columns.put(each.getLogicColumn(), new EncryptColumn(each.getCipherColumn(), each.getAssistedQueryColumn(), each.getPlainColumn(), each.getEncryptStrategyName()));
}
}
......
......@@ -28,13 +28,13 @@ import org.apache.shardingsphere.infra.yaml.config.YamlConfiguration;
@Setter
public final class YamlEncryptColumnRuleConfiguration implements YamlConfiguration {
private String logicName;
private String plainColumn;
private String logicColumn;
private String cipherColumn;
private String assistedQueryColumn;
private String plainColumn;
private String encryptStrategyName;
}
......@@ -17,7 +17,7 @@
package org.apache.shardingsphere.encrypt.yaml.swapper;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptColumnRuleConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper;
......@@ -38,7 +38,7 @@ public final class EncryptColumnRuleConfigurationYamlSwapper implements YamlSwap
@Override
public EncryptColumnRuleConfiguration swap(final YamlEncryptColumnRuleConfiguration yamlConfiguration) {
return new EncryptColumnRuleConfiguration(yamlConfiguration.getLogicName(),
yamlConfiguration.getPlainColumn(), yamlConfiguration.getCipherColumn(), yamlConfiguration.getAssistedQueryColumn(), yamlConfiguration.getEncryptStrategyName());
return new EncryptColumnRuleConfiguration(yamlConfiguration.getLogicColumn(),
yamlConfiguration.getCipherColumn(), yamlConfiguration.getAssistedQueryColumn(), yamlConfiguration.getPlainColumn(), yamlConfiguration.getEncryptStrategyName());
}
}
......@@ -18,8 +18,8 @@
package org.apache.shardingsphere.encrypt.yaml.swapper;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.constant.EncryptOrder;
import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptTableRuleConfiguration;
......
......@@ -17,7 +17,7 @@
package org.apache.shardingsphere.encrypt.yaml.swapper;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptStrategyConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper;
......
......@@ -17,8 +17,8 @@
package org.apache.shardingsphere.encrypt.yaml.swapper;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptTableRuleConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper;
......@@ -38,7 +38,7 @@ public final class EncryptTableRuleConfigurationYamlSwapper implements YamlSwapp
public YamlEncryptTableRuleConfiguration swap(final EncryptTableRuleConfiguration data) {
YamlEncryptTableRuleConfiguration result = new YamlEncryptTableRuleConfiguration();
for (EncryptColumnRuleConfiguration each : data.getColumns()) {
result.getColumns().put(each.getName(), encryptColumnRuleConfigurationYamlSwapper.swap(each));
result.getColumns().put(each.getLogicColumn(), encryptColumnRuleConfigurationYamlSwapper.swap(each));
}
return result;
}
......@@ -48,7 +48,7 @@ public final class EncryptTableRuleConfigurationYamlSwapper implements YamlSwapp
Collection<EncryptColumnRuleConfiguration> columns = new LinkedList<>();
for (Entry<String, YamlEncryptColumnRuleConfiguration> entry : yamlConfiguration.getColumns().entrySet()) {
YamlEncryptColumnRuleConfiguration yamlEncryptColumnRuleConfiguration = entry.getValue();
yamlEncryptColumnRuleConfiguration.setLogicName(entry.getKey());
yamlEncryptColumnRuleConfiguration.setLogicColumn(entry.getKey());
columns.add(encryptColumnRuleConfigurationYamlSwapper.swap(yamlEncryptColumnRuleConfiguration));
}
return new EncryptTableRuleConfiguration(yamlConfiguration.getName(), columns);
......
......@@ -18,10 +18,10 @@
package org.apache.shardingsphere.encrypt.log;
import lombok.SneakyThrows;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.infra.log.ConfigurationLogger;
import org.junit.Before;
import org.junit.Test;
......
......@@ -17,10 +17,10 @@
package org.apache.shardingsphere.encrypt.rule;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.junit.Before;
import org.junit.Test;
......
......@@ -17,8 +17,8 @@
package org.apache.shardingsphere.encrypt.rule;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
import org.junit.Before;
import org.junit.Test;
......
......@@ -17,10 +17,10 @@
package org.apache.shardingsphere.encrypt.spring.namespace.parser;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.spring.namespace.tag.EncryptRuleBeanDefinitionTag;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
......
......@@ -22,7 +22,7 @@ import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
import org.apache.shardingsphere.driver.orchestration.internal.datasource.OrchestrationShardingSphereDataSource;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.spring.boot.orchestration.util.EmbedTestingServer;
import org.junit.BeforeClass;
import org.junit.Test;
......
......@@ -21,7 +21,7 @@ import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
import org.apache.shardingsphere.driver.orchestration.internal.datasource.OrchestrationShardingSphereDataSource;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.spring.boot.orchestration.registry.TestCenterRepository;
import org.apache.shardingsphere.spring.boot.orchestration.util.EmbedTestingServer;
import org.junit.BeforeClass;
......
......@@ -18,10 +18,10 @@
package org.apache.shardingsphere.spring.namespace.orchestration;
import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
import org.apache.shardingsphere.encrypt.api.config.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptColumnRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.EncryptStrategyConfiguration;
import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import org.apache.shardingsphere.encrypt.api.config.strategy.EncryptStrategyConfiguration;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey;
import org.apache.shardingsphere.spring.namespace.orchestration.util.EmbedTestingServer;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册