Skip to content

Commit 2ddde4e

Browse files
Merge pull request #242 from shiyindaxiaojie/feature
Feature
2 parents 4ec656f + 8967149 commit 2ddde4e

32 files changed

Lines changed: 574 additions & 19 deletions

File tree

eden-components/eden-dependencies/pom.xml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,26 @@
528528
<artifactId>eden-curator-spring-boot-starter</artifactId>
529529
<version>0.0.1-SNAPSHOT</version>
530530
</dependency>
531+
<dependency>
532+
<groupId>io.github.shiyindaxiaojie</groupId>
533+
<artifactId>eden-data-crypto-spring-boot-starter</artifactId>
534+
<version>0.0.1-SNAPSHOT</version>
535+
</dependency>
536+
<dependency>
537+
<groupId>io.github.shiyindaxiaojie</groupId>
538+
<artifactId>eden-data-differ-spring-boot-starter</artifactId>
539+
<version>0.0.1-SNAPSHOT</version>
540+
</dependency>
541+
<dependency>
542+
<groupId>io.github.shiyindaxiaojie</groupId>
543+
<artifactId>eden-data-duplicate-spring-boot-starter</artifactId>
544+
<version>0.0.1-SNAPSHOT</version>
545+
</dependency>
546+
<dependency>
547+
<groupId>io.github.shiyindaxiaojie</groupId>
548+
<artifactId>eden-data-masker-spring-boot-starter</artifactId>
549+
<version>0.0.1-SNAPSHOT</version>
550+
</dependency>
531551
<dependency>
532552
<groupId>io.github.shiyindaxiaojie</groupId>
533553
<artifactId>eden-debezium-spring-boot-starter</artifactId>
@@ -703,12 +723,16 @@
703723
<artifactId>eden-rocketmq-spring-boot-starter</artifactId>
704724
<version>0.0.1-SNAPSHOT</version>
705725
</dependency>
726+
<dependency>
727+
<groupId>io.github.shiyindaxiaojie</groupId>
728+
<artifactId>eden-sensitive-word-spring-boot-starter</artifactId>
729+
<version>0.0.1-SNAPSHOT</version>
730+
</dependency>
706731
<dependency>
707732
<groupId>io.github.shiyindaxiaojie</groupId>
708733
<artifactId>eden-shardingsphere-spring-boot-starter</artifactId>
709734
<version>0.0.1-SNAPSHOT</version>
710735
</dependency>
711-
712736
<dependency>
713737
<groupId>io.github.shiyindaxiaojie</groupId>
714738
<artifactId>eden-swagger2-spring-boot-starter</artifactId>
@@ -736,22 +760,22 @@
736760
</dependency>
737761
<dependency>
738762
<groupId>io.github.shiyindaxiaojie</groupId>
739-
<artifactId>eden-undertow-spring-boot-starter</artifactId>
763+
<artifactId>eden-uid-generator-spring-boot-starter</artifactId>
740764
<version>0.0.1-SNAPSHOT</version>
741765
</dependency>
742766
<dependency>
743767
<groupId>io.github.shiyindaxiaojie</groupId>
744-
<artifactId>eden-uid-generator-spring-boot-starter</artifactId>
768+
<artifactId>eden-undertow-spring-boot-starter</artifactId>
745769
<version>0.0.1-SNAPSHOT</version>
746770
</dependency>
747771
<dependency>
748772
<groupId>io.github.shiyindaxiaojie</groupId>
749-
<artifactId>eden-xxljob-spring-boot-starter</artifactId>
773+
<artifactId>eden-xxljob2-spring-boot-starter</artifactId>
750774
<version>0.0.1-SNAPSHOT</version>
751775
</dependency>
752776
<dependency>
753777
<groupId>io.github.shiyindaxiaojie</groupId>
754-
<artifactId>eden-xxljob2-spring-boot-starter</artifactId>
778+
<artifactId>eden-xxljob-spring-boot-starter</artifactId>
755779
<version>0.0.1-SNAPSHOT</version>
756780
</dependency>
757781

eden-components/eden-solutions/eden-data-differ/src/main/java/org/ylzl/eden/data/differ/DataDiffer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
*/
2727
public interface DataDiffer {
2828

29+
/**
30+
* 获取工具名称
31+
*
32+
* @return 工具名称
33+
*/
34+
String getType();
35+
2936
/**
3037
* 获取实际比对工具
3138
*

eden-components/eden-solutions/eden-data-differ/src/main/java/org/ylzl/eden/data/differ/integration/javers/JaversDataDiffer.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ public class JaversDataDiffer implements DataDiffer {
3939

4040
private final Javers javers;
4141

42+
/**
43+
* 获取工具名称
44+
*
45+
* @return 工具名称
46+
*/
47+
@Override
48+
public String getType() {
49+
return "javers";
50+
}
51+
4252
/**
4353
* 获取实际比对工具
4454
*

eden-components/eden-solutions/eden-data-differ/src/main/java/org/ylzl/eden/data/differ/integration/objectdiffer/ObjectDifferDataDiffer.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ public class ObjectDifferDataDiffer implements DataDiffer {
3737

3838
private final ObjectDiffer objectDiffer;
3939

40+
/**
41+
* 获取工具名称
42+
*
43+
* @return 工具名称
44+
*/
45+
@Override
46+
public String getType() {
47+
return "java-object-diff";
48+
}
49+
4050
/**
4151
* 获取实际比对工具
4252
*
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2012-2019 the original author or authors.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
18+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/POM/4.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
22+
<modelVersion>4.0.0</modelVersion>
23+
<parent>
24+
<groupId>io.github.shiyindaxiaojie</groupId>
25+
<artifactId>eden-spring-boot-starters</artifactId>
26+
<version>0.0.1-SNAPSHOT</version>
27+
<relativePath>../pom.xml</relativePath>
28+
</parent>
29+
<artifactId>eden-data-crypto-spring-boot-starter</artifactId>
30+
<packaging>jar</packaging>
31+
<name>eden-data-crypto-spring-boot-starter</name>
32+
<description>Spring Boot Starter For Data Crypto</description>
33+
34+
<dependencies>
35+
<!-- 开发框架 -->
36+
<dependency>
37+
<groupId>io.github.shiyindaxiaojie</groupId>
38+
<artifactId>eden-spring-boot</artifactId>
39+
</dependency>
40+
41+
<!-- 开发组件 -->
42+
<dependency>
43+
<groupId>org.projectlombok</groupId>
44+
<artifactId>lombok</artifactId>
45+
<optional>true</optional>
46+
</dependency>
47+
48+
<!-- 通用组件 -->
49+
<dependency>
50+
<groupId>io.github.shiyindaxiaojie</groupId>
51+
<artifactId>eden-data-crypto</artifactId>
52+
</dependency>
53+
</dependencies>
54+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Auto Configure
2+
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3+
org.ylzl.eden.common.mail.spring.boot.autoconfigure.MailAutoConfiguration,\
4+
org.ylzl.eden.common.mail.spring.boot.autoconfigure.JavaMailAutoConfiguration
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file !.gitkeep
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file !.gitkeep
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2012-2019 the original author or authors.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
18+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xmlns="http://maven.apache.org/POM/4.0.0"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
22+
<modelVersion>4.0.0</modelVersion>
23+
<parent>
24+
<groupId>io.github.shiyindaxiaojie</groupId>
25+
<artifactId>eden-spring-boot-starters</artifactId>
26+
<version>0.0.1-SNAPSHOT</version>
27+
<relativePath>../pom.xml</relativePath>
28+
</parent>
29+
<artifactId>eden-data-differ-spring-boot-starter</artifactId>
30+
<packaging>jar</packaging>
31+
<name>eden-data-differ-spring-boot-starter</name>
32+
<description>Spring Boot Starter For Data Differ</description>
33+
34+
<dependencies>
35+
<!-- 开发框架 -->
36+
<dependency>
37+
<groupId>io.github.shiyindaxiaojie</groupId>
38+
<artifactId>eden-spring-boot</artifactId>
39+
</dependency>
40+
41+
<!-- 开发组件 -->
42+
<dependency>
43+
<groupId>org.projectlombok</groupId>
44+
<artifactId>lombok</artifactId>
45+
<optional>true</optional>
46+
</dependency>
47+
48+
<!-- 通用组件 -->
49+
<dependency>
50+
<groupId>io.github.shiyindaxiaojie</groupId>
51+
<artifactId>eden-data-differ</artifactId>
52+
</dependency>
53+
</dependencies>
54+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright 2012-2019 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.ylzl.eden.data.differ.spring.boot.autoconfigure;
18+
19+
import lombok.RequiredArgsConstructor;
20+
import lombok.extern.slf4j.Slf4j;
21+
import org.springframework.beans.factory.config.BeanDefinition;
22+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
23+
import org.springframework.boot.context.properties.EnableConfigurationProperties;
24+
import org.springframework.context.annotation.Bean;
25+
import org.springframework.context.annotation.Configuration;
26+
import org.springframework.context.annotation.Role;
27+
import org.ylzl.eden.data.differ.spring.boot.env.DataDifferProperties;
28+
import org.ylzl.eden.data.differ.spring.boot.support.DataDifferBeanFactory;
29+
30+
/**
31+
* 数据比对自动装配
32+
*
33+
* @author <a href="mailto:shiyindaxiaojie@gmail.com">gyl</a>
34+
* @since 2.4.13
35+
*/
36+
@ConditionalOnProperty(prefix = DataDifferProperties.PREFIX)
37+
@EnableConfigurationProperties(DataDifferProperties.class)
38+
@RequiredArgsConstructor
39+
@Slf4j
40+
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
41+
@Configuration(proxyBeanMethods = false)
42+
public class DataDifferAutoConfiguration {
43+
44+
private static final String AUTOWIRED_DATA_DIFFER_HELPER = "Autowired Data Differ Helper";
45+
46+
private final DataDifferProperties properties;
47+
48+
@Bean
49+
public DataDifferBeanFactory dataDifferBeanFactory() {
50+
log.debug(AUTOWIRED_DATA_DIFFER_HELPER);
51+
return new DataDifferBeanFactory(properties.getPrimary());
52+
}
53+
}

0 commit comments

Comments
 (0)