Browse Source

shardingsphere jiajiemi

pull/2/head
马府强 2 years ago
parent
commit
0d7e48c3b1
  1. 27
      shardingspherejamijiemi/.gitignore
  2. 92
      shardingspherejamijiemi/fanfu-web.iml
  3. 140
      shardingspherejamijiemi/pom.xml
  4. 23
      shardingspherejamijiemi/src/main/java/com/woniu/WoNiuApplication.java
  5. 122
      shardingspherejamijiemi/src/main/java/com/woniu/service/config/MyShardingEncryptor.java
  6. 47
      shardingspherejamijiemi/src/main/java/com/woniu/service/controller/OrderController.java
  7. 134
      shardingspherejamijiemi/src/main/java/com/woniu/service/entity/Order.java
  8. 39
      shardingspherejamijiemi/src/main/java/com/woniu/service/enums/ResponseCodeEnum.java
  9. 45
      shardingspherejamijiemi/src/main/java/com/woniu/service/generator/CodeGenerator.java
  10. 15
      shardingspherejamijiemi/src/main/java/com/woniu/service/mapper/OrderMapper.java
  11. 16
      shardingspherejamijiemi/src/main/java/com/woniu/service/service/IOrderService.java
  12. 20
      shardingspherejamijiemi/src/main/java/com/woniu/service/service/impl/OrderServiceImpl.java
  13. 89
      shardingspherejamijiemi/src/main/java/com/woniu/service/util/ResultEntity.java
  14. 1
      shardingspherejamijiemi/src/main/resources/META-INF/services/org.apache.shardingsphere.encrypt.strategy.spi.Encryptor
  15. 14
      shardingspherejamijiemi/src/main/resources/application.properties
  16. 58
      shardingspherejamijiemi/src/main/resources/application.yml
  17. 9
      shardingspherejamijiemi/src/main/resources/logback-spring.xml
  18. 22
      shardingspherejamijiemi/src/main/resources/sql.sql
  19. 24
      shardingspherejamijiemi/src/test/java/com/woniu/TestA.java
  20. 173
      shardingspherejamijiemi/woniu-web.iml

27
shardingspherejamijiemi/.gitignore

@ -0,0 +1,27 @@
# Created by .ignore support plugin (hsz.mobi)
### Java template
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/.idea/
/target/

92
shardingspherejamijiemi/fanfu-web.iml

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
<facet type="web" name="Web">
<configuration>
<webroots />
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.43" level="project" />
<orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.43" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.13.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.3.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.16.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.3.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.20" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.20" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.13.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.18" level="project" />
</component>
</module>

140
shardingspherejamijiemi/pom.xml

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.9.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.ayi</groupId>
<artifactId>woniu-web</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>woniou-web</name>
<description>create by woniu</description>
<packaging>jar</packaging>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.0-jre</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- spring web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- sharding-jdbc -->
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
<version>4.1.1</version>
</dependency>
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.1</version>
</dependency>
<!-- 代码生成器 mybatisPlus自带的生成器 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.5.1</version>
</dependency>
<!-- freemarker模板生成器 引入代码生成器需要 -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.31</version>
</dependency>
<!-- swagger 因为mybatisPlus代码生成器会自带swagger的注解 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency>
<!-- 启动后加载配置文件 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!-- lombok 简化实体类管理工具-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- fastjson 解析json用到,也可以换成自己喜欢用的 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.79</version>
</dependency>
<!-- 测试 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

23
shardingspherejamijiemi/src/main/java/com/woniu/WoNiuApplication.java

@ -0,0 +1,23 @@
package com.woniu;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@Slf4j
@MapperScan("com.woniu.service.mapper")
public class WoNiuApplication {
public static void main(String[] args) {
SpringApplication.run(WoNiuApplication.class, args);
log.info("test_info");
log.error("test_error");
log.warn("test_warn");
}
}

122
shardingspherejamijiemi/src/main/java/com/woniu/service/config/MyShardingEncryptor.java

@ -0,0 +1,122 @@
package com.woniu.service.config;
import com.google.common.base.Preconditions;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.StringUtils;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.shardingsphere.encrypt.strategy.impl.AESEncryptor;
import org.apache.shardingsphere.encrypt.strategy.spi.Encryptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Properties;
/**
* <p>
*
* </p>
*
* @author woniu公众号程序员蜗牛g
* @since 2023-03-30
*/
@Configuration
public class MyShardingEncryptor implements Encryptor {
private final Logger log = LoggerFactory.getLogger(MyShardingEncryptor.class);
// AES KEY
private static final String AES_KEY = "aes.key.value";
private Properties properties = new Properties();
public MyShardingEncryptor(){
}
@Override
public void init() {
}
@Override
public String encrypt(Object plaintext) {
try {
byte[] result = this.getCipher(1).doFinal(StringUtils.getBytesUtf8(String.valueOf(plaintext)));
log.debug("[MyShardingEncryptor]>>>> 加密: {}", Base64.encodeBase64String(result));
return Base64.encodeBase64String(result);
} catch (Exception ex) {
log.error("[MyShardingEncryptor]>>>> 加密异常:", ex);
}
return null;
}
@Override
public Object decrypt(String ciphertext) {
try {
if (null == ciphertext) {
return null;
} else {
byte[] result = this.getCipher(2).doFinal(Base64.decodeBase64(ciphertext));
log.debug("[MyShardingEncryptor]>>>> 解密: {}", new String(result));
return new String(result);
}
} catch (Exception ex) {
log.error("[MyShardingEncryptor]>>>> 解密异常:", ex);
}
return null;
}
@Override
public String getType() {
return "mySharding"; // 和yml配置一致
}
@Override
public Properties getProperties() {
return this.properties;
}
@Override
public void setProperties(Properties properties) {
this.properties = properties;
}
/**
* 加解密算法
* @param decryptMode 1-加密2-解密还有其他类型可以点进去看源码
*/
private Cipher getCipher(int decryptMode) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException {
Preconditions.checkArgument(this.properties.containsKey("aes.key.value"), "No available secret key for `%s`.",
AESEncryptor.class.getName());
Cipher result = Cipher.getInstance("AES");
result.init(decryptMode, new SecretKeySpec(this.createSecretKey(), "AES"));
return result;
}
/**
* 创建密钥规则根据自己需要定义
* -- PS: 生产环境规范要求不能打印出密钥相关日志以免发生意外泄露情况
*/
private byte[] createSecretKey() {
// yml中配置的原始密钥
String oldKey = this.properties.get("aes.key.value").toString();
Preconditions.checkArgument(null != oldKey, String.format("%s can not be null.", "aes.key.value"));
/*
* 将原始密钥和自定义的盐一起再次加密生成新的密钥返回.
* 注意因为我们用的AES加解密方式最终密钥必须16位否则AES会报错
* 而application.yml中配置的aes.key.value是10位字符组合所以这里才substring(0,5)否则最终没有返回16位会抛AES异常可以自己试验下
*/
String secretKey = DigestUtils.sha1Hex(oldKey + AES_KEY).toUpperCase().substring(0, 5) + "!" + oldKey;
// 密钥打印在上线前一定要删掉,避免泄露引起安全事故。
log.debug("[MyShardingEncryptor]>>>> 密钥: {}", secretKey);
return secretKey.getBytes();
}
}

47
shardingspherejamijiemi/src/main/java/com/woniu/service/controller/OrderController.java

@ -0,0 +1,47 @@
package com.woniu.service.controller;
import com.alibaba.fastjson.JSONObject;
import com.woniu.service.entity.Order;
import com.woniu.service.service.IOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* SpringBoot+ShardingSphere实现数据库字段加密存储和解密返回
*/
@RestController
@RequestMapping("/order")
@Slf4j
public class OrderController {
@Autowired
private IOrderService orderService;
/**
* 查询订单
*/
@GetMapping("/list")
public ResponseEntity<List<Order>> list() {
return ResponseEntity.ok().body(orderService.list());
}
/**
* 插入订单
*/
@PostMapping("/save")
public ResponseEntity<List<Order>> save(@RequestBody Order order) {
order.setCreatedAt(new Date());
order.setUpdatedAt(new Date());
boolean ret = orderService.save(order);
return ret ? ResponseEntity.ok().body(orderService.list())
: ResponseEntity.badRequest().body(new ArrayList<>());
}
}

134
shardingspherejamijiemi/src/main/java/com/woniu/service/entity/Order.java

@ -0,0 +1,134 @@
package com.woniu.service.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* <p>
*
* </p>
*
* @author woniu公众号程序员蜗牛g
* @since 2023-03-30
*/
@TableName("tb_order")
@ApiModel(value = "Order对象", description = "")
public class Order implements Serializable {
private static final long serialVersionUID = 2132123l;
@ApiModelProperty("主键id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("订单号")
private String orderId;
@ApiModelProperty("用户姓名")
private String name;
@ApiModelProperty("身份证号")
private String idCard;
@ApiModelProperty("订单类型,1-挂号,2-门诊,3-住院。")
private String orderType;
@ApiModelProperty("订单状态,0-待支付,1-支付成功,2-支付失败。")
private String orderStatus;
@ApiModelProperty("订单金额")
private String amount;
@ApiModelProperty("创建时间")
private Date createdAt;
@ApiModelProperty("更新时间")
private Date updatedAt;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
public String getOrderType() {
return orderType;
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
@Override
public String toString() {
return "Order{" +
"id=" + id +
", orderId=" + orderId +
", name=" + name +
", idCard=" + idCard +
", orderType=" + orderType +
", orderStatus=" + orderStatus +
", amount=" + amount +
", createdAt=" + createdAt +
", updatedAt=" + updatedAt +
"}";
}
}

39
shardingspherejamijiemi/src/main/java/com/woniu/service/enums/ResponseCodeEnum.java

@ -0,0 +1,39 @@
package com.woniu.service.enums;
/**
* <p>
* 状态枚举类
* </p>
*
* @author 公众号程序员蜗牛g
*/
public enum ResponseCodeEnum {
SUCCESS(0, "0", "成功"),
FAIL (-1, "-1", "失败"),
PARAMETER_ERROR(1,"1","参数错误"),
ERROR(500, "500", "错误");
private final int id;
private final String code;
private final String label;
ResponseCodeEnum(final int id, final String code, final String label) {
this.id = id;
this.code = code;
this.label = label;
}
public int getId() {
return id;
}
public String getCode() {
return code;
}
public String getLabel() {
return label;
}
}

45
shardingspherejamijiemi/src/main/java/com/woniu/service/generator/CodeGenerator.java

@ -0,0 +1,45 @@
package com.woniu.service.generator;
import com.baomidou.mybatisplus.generator.FastAutoGenerator;
import com.baomidou.mybatisplus.generator.config.OutputFile;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import java.util.Collections;
/**
* <p>
* 状态枚举类
* </p>
*
* @author 公众号程序员蜗牛g
*/
public class CodeGenerator {
private static final String url = "jdbc:mysql://localhost:3306/encrypt_demo?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&useSSL=false";
private static final String username = "root";
private static final String password = "123456";
private static final String outputDir = "D:\\workspace\\workspace_blog\\encrypt-demo\\src\\main\\java"; // entity、mapper、service、controller生成的目录地址,换成自己项目的。
private static final String xmlOutputDir = "D:\\workspace\\workspace_blog\\encrypt-demo\\src\\main\\resources\\mapper"; // xxMapper.xml生成的目录地址,换成自己项目的。
public static void main(String[] args) {
FastAutoGenerator.create(url, username, password)
.globalConfig(builder -> {
builder.author("福隆苑居士,公众号:【Java分享客栈】") // 设置作者
.enableSwagger() // 开启 swagger 模式
.fileOverride() // 覆盖已生成文件
.outputDir(outputDir); // 指定输出目录
})
.packageConfig(builder -> {
builder.parent("com.example.encrypt") // 设置父包名,和自己项目的父包名一致即可。
.moduleName("") // 设置父包模块名,为空就会直接生成在父包名目录下。
.pathInfo(Collections.singletonMap(OutputFile.mapperXml, xmlOutputDir)); // 设置mapperXml生成路径
})
.strategyConfig(builder -> {
builder.addInclude("tb_order") // 设置需要生成的表名,多个用逗号隔开。
.addTablePrefix("t_", "tb_", "c_"); // 设置过滤表前缀,多个用逗号隔开。
})
.templateEngine(new FreemarkerTemplateEngine()) // 使用Freemarker引擎模板,默认的是Velocity引擎模板
.execute();
}
}

15
shardingspherejamijiemi/src/main/java/com/woniu/service/mapper/OrderMapper.java

@ -0,0 +1,15 @@
package com.woniu.service.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.service.entity.Order;
/**
* <p>
* 状态枚举类
* </p>
*
* @author 公众号程序员蜗牛g
*/
public interface OrderMapper extends BaseMapper<Order> {
}

16
shardingspherejamijiemi/src/main/java/com/woniu/service/service/IOrderService.java

@ -0,0 +1,16 @@
package com.woniu.service.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.service.entity.Order;
/**
* <p>
* 状态枚举类
* </p>
*
* @author 公众号程序员蜗牛g
*/
public interface IOrderService extends IService<Order> {
}

20
shardingspherejamijiemi/src/main/java/com/woniu/service/service/impl/OrderServiceImpl.java

@ -0,0 +1,20 @@
package com.woniu.service.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.service.entity.Order;
import com.woniu.service.mapper.OrderMapper;
import com.woniu.service.service.IOrderService;
import org.springframework.stereotype.Service;
/**
* <p>
* 状态枚举类
* </p>
*
* @author 公众号程序员蜗牛g
*/
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {
}

89
shardingspherejamijiemi/src/main/java/com/woniu/service/util/ResultEntity.java

@ -0,0 +1,89 @@
package com.woniu.service.util;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.woniu.service.enums.ResponseCodeEnum;
/**
* <p>
* 状态枚举类
* </p>
*
* @author 公众号程序员蜗牛g
*/
public class ResultEntity<T> {
private String code;
private String msg;
private T data;
public ResultEntity(){}
public ResultEntity(String code, String msg){
this.code = code;
this.msg = msg;
}
public ResultEntity(String code, String msg, T data){
this.code = code;
this.msg = msg;
this.data = data;
}
@JsonIgnore
public boolean isSuccess() {
return ResponseCodeEnum.SUCCESS.getCode().equals(this.getCode());
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public static ResultEntity fail(String code, String msg) {
return new ResultEntity(code, msg);
}
public static <T> ResultEntity fail(String code, String msg, T data) {
return new ResultEntity(code, msg, data);
}
public static ResultEntity ok(String code, String msg) {
return new ResultEntity(code, msg);
}
public static <T> ResultEntity ok(String code, String msg, T data) {
return new ResultEntity(code, msg, data);
}
public static ResultEntity ok(String msg) {
return new ResultEntity(ResponseCodeEnum.SUCCESS.getCode(), msg);
}
public static <T> ResultEntity ok(String msg, T data) {
return new ResultEntity(ResponseCodeEnum.SUCCESS.getCode(), msg, data);
}
public static ResultEntity fail(String msg) {
return new ResultEntity(ResponseCodeEnum.FAIL.getCode(), msg);
}
}

1
shardingspherejamijiemi/src/main/resources/META-INF/services/org.apache.shardingsphere.encrypt.strategy.spi.Encryptor

@ -0,0 +1 @@
com.woniu.service.config.MyShardingEncryptor

14
shardingspherejamijiemi/src/main/resources/application.properties

@ -0,0 +1,14 @@
#mybatis.config-location=classpath:/mybatis-config.xml
#context.initializer.classes
#context.initializer.classes=com.fanfu.config.MyApplicationContextInitializer
#server.port=8088
#mybatis-plus.mapper-locations=classpath*:/mapper/*.xml
#
#
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#spring.datasource.username=root
#spring.datasource.password=123456
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

58
shardingspherejamijiemi/src/main/resources/application.yml

@ -0,0 +1,58 @@
server:
port: 8888
# 数据源
spring:
shardingsphere:
props:
sql:
show: false
query:
with:
cipher:
column: true # 查询是否使用密文列
datasource:
name: master
master:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&useSSL=false
username: root
password: 123456
initial-size: 20
max-active: 200
min-idle: 10
max-wait: 60000
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 20
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1
test-while-idle: true
test-on-borrow: false
test-on-return: false
filter:
stat:
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
# 加密配置
encrypt:
encryptors:
my_encryptor:
type: mySharding # 声明加密处理器的类型,自定义。
props:
aes.key.value: won13579@# # 加密处理器创建密钥会用到,10个数字英文字母组合,自定义。
# 需要加密哪张表中的哪些字段,每个字段使用哪个加密处理器,这里的my_encryptor就是上面配置的处理器名称。
tables:
tb_order:
columns:
id_card:
cipherColumn: id_card
encryptor: my_encryptor
name:
cipherColumn: name
encryptor: my_encryptor

9
shardingspherejamijiemi/src/main/resources/logback-spring.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="TRACE" />
<logger name="com.woniu.service" level="DEBUG" />
</configuration>

22
shardingspherejamijiemi/src/main/resources/sql.sql

@ -0,0 +1,22 @@
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tb_order
-- ----------------------------
DROP TABLE IF EXISTS `tb_order`;
CREATE TABLE `tb_order` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
`order_id` varchar(50) DEFAULT NULL COMMENT '订单号',
`name` varchar(100) DEFAULT NULL COMMENT '用户姓名',
`id_card` varchar(100) DEFAULT NULL COMMENT '身份证号',
`order_type` char(5) DEFAULT NULL COMMENT '订单类型,1-挂号,2-门诊,3-住院。',
`order_status` char(5) DEFAULT NULL COMMENT '订单状态,0-待支付,1-支付成功,2-支付失败。',
`amount` varchar(20) DEFAULT NULL COMMENT '订单金额',
`created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;
-- ----------------------------
-- Records of tb_order
-- ----------------------------
INSERT INTO `tb_order` VALUES ('5', 'wx2202210122003344763267816', '3qxlE2jBqAM+wkPYM2Drgg==', 'MPLHKUIwav77Ad+9xe+O9olTwNArU7thbEmljIkKtxY=', '1', '0', '15', '2022-02-21 09:23:45', '2022-02-21 09:23:45');

24
shardingspherejamijiemi/src/test/java/com/woniu/TestA.java

@ -0,0 +1,24 @@
//package com.woniu;
//
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//
//@SpringBootTest
//@RunWith(SpringRunner.class)
//public class TestA {
//
//
// @Autowired
// private OrderService orderService;
//
//
// @Test
// public void placeOrder() {
// OrderReqVO orderReqVO = new OrderReqVO();
// orderService.saveOrder(orderReqVO);
// }
//}

173
shardingspherejamijiemi/woniu-web.iml

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
<facet type="web" name="Web">
<configuration>
<webroots />
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.43" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.43" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.13.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.3.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.3.3" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.20" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.20" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.13.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:30.0-jre" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:3.5.0" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.18" level="project" />
<orderEntry type="library" name="Maven: org.assertj:assertj-core:3.16.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.1.7.Final" level="project" />
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-jdbc-spring-boot-starter:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-spring-boot-util:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-core-common:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-common:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-spi:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-binder:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-core-api:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:encrypt-core-api:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:encrypt-core-common:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.groovy:groovy:indy:2.4.5" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-transaction-spring:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-transaction-core:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-jdbc-core:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-pluggable:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-route:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-rewrite-engine:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-executor:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-merge:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-sql92:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-engine:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-spi:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-statement:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
<orderEntry type="library" name="Maven: org.antlr:antlr4-runtime:4.7.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-mysql:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-postgresql:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-oracle:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shardingsphere-sql-parser-sqlserver:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-core-route:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:master-slave-core-route:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-core-rewrite:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:encrypt-core-rewrite:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:shadow-core-rewrite:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-core-execute:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:sharding-core-merge:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shardingsphere:encrypt-core-merge:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.23" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.1" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.1" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.1" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.1" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.1" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.3" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.9" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-generator:3.5.1" level="project" />
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.31" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.4" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.79" level="project" />
</component>
</module>
Loading…
Cancel
Save