diff --git a/changeCommit.sh b/changeCommit.sh
deleted file mode 100755
index a20834c7..00000000
--- a/changeCommit.sh
+++ /dev/null
@@ -1,10 +0,0 @@
- # changeCommit.sh
- git filter-branch --commit-filter '
- if [ "$GIT_AUTHOR_EMAIL" = "" ];
- then
- GIT_AUTHOR_NAME="程序员小富";
- GIT_AUTHOR_EMAIL="515361725@qq.com";
- git commit-tree "$@";
- else
- git commit-tree "$@";
- fi' HEAD
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 798f221b..d6dfc5ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.bootspring-boot-starter-parent
- 2.7.6
+ 2.0.5.RELEASEcom.notebookSpringboot-Notebook
@@ -14,10 +14,23 @@
pom
-
- springboot101
-
- shardingsphere101
+ springboot-sharding-jdbc
+ springboot-work-flowable
+ springboot-redisson-lock
+ springboot-rabbitmq-confirm
+ springboot-mqtt-messagepush
+ springboot-aop-redis-lua
+ springboot-aop-unifiedlog
+ springboot-database-doc
+ springboot-delayqueue
+ springboot-douyin-watermark
+ springboot-global-formatting
+ springboot-sharding-jdbc
+ springboot-erupt
+ springboot-jasypt
+ springboot-magic-api
+ springboot-detect-faces
+ springboot-shardingsphere
@@ -25,52 +38,59 @@
+
org.springframework.boot
- spring-boot-starter
+ spring-boot-starter-thymeleaf
- org.apache.commons
- commons-lang3
- 3.7
+ org.springframework.boot
+ spring-boot-starter
-
org.springframework.bootspring-boot-starter-web
-
- com.mysql
- mysql-connector-j
- 8.0.32
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
-
-
- org.projectlombok
- lombok
- true
+ org.apache.commons
+ commons-lang3
+ 3.7
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
+ org.projectlombok
+ lombok
+ 1.16.18
+ provided
-
com.alibabafastjson1.2.83
-
+
+ mysql
+ mysql-connector-java
+ runtime
+
+
+ org.springframework.boot
+ spring-boot-starter-amqp
+
-
@@ -79,4 +99,5 @@
+
diff --git a/shardingsphere101/README.md b/shardingsphere101/README.md
deleted file mode 100644
index 5d43c57c..00000000
--- a/shardingsphere101/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-本项目的主要内容:
-
-1、默认的分库分表策略
-2、广播表
-3、绑定表的使用
\ No newline at end of file
diff --git a/shardingsphere101/pom.xml b/shardingsphere101/pom.xml
deleted file mode 100644
index 936df99d..00000000
--- a/shardingsphere101/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
- 4.0.0
-
- com.notebook
- Springboot-Notebook
- 0.0.1-SNAPSHOT
-
-
- com.shardingsphere101
- shardingsphere101
- 0.0.1-SNAPSHOT
- shardingsphere101
- pom
-
-
- 8
- 5.2.0
- 3.5.3.1
- 8.2.0
-
-
-
-
- shardingsphere-2fastcode
- shardingsphere-default-strategy
-
- shardingsphere-autocreate-table
-
- shardingsphere-algorithms
-
- shardingsphere-sequence-algorithm
-
-
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
- ${mybatis.plus.version}
-
-
-
-
- com.mysql
- mysql-connector-j
- ${mysql.connector.version}
-
-
-
-
- org.apache.shardingsphere
- shardingsphere-jdbc-core-spring-boot-starter
- ${shardingsphere.version}
-
-
-
-
diff --git a/shardingsphere101/shardingsphere-2fastcode/.gitignore b/shardingsphere101/shardingsphere-2fastcode/.gitignore
deleted file mode 100644
index 3d0452a4..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/.gitignore
+++ /dev/null
@@ -1,35 +0,0 @@
-HELP.md
-target/
-!.mvn/wrapper/maven-wrapper.jar
-!**/src/main/**/target/
-!**/src/test/**/target/
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
-build/
-!**/src/main/**/build/
-!**/src/test/**/build/
-
-### VS Code ###
-.vscode/
-!/.mvn/
-!/.idea/!/.mvn/
diff --git a/shardingsphere101/shardingsphere-2fastcode/README.md b/shardingsphere101/shardingsphere-2fastcode/README.md
deleted file mode 100644
index 31f2a64e..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-### 本案例对应的文章教程
-
-[SpringBoot 2 种方式快速实现分库分表,轻松拿捏!](http://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247504158&idx=1&sn=37bdbb8de72068a95602a16f5451cd98&chksm=9b8641e3acf1c8f5508bbc52dba2e304ca465440800caac465a6e7509579ff2c3b088ab17b9d&token=755618913&lang=zh_CN#rd)
-
diff --git a/shardingsphere101/shardingsphere-2fastcode/pom.xml b/shardingsphere101/shardingsphere-2fastcode/pom.xml
deleted file mode 100644
index 379520bf..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
- 4.0.0
-
- com.shardingsphere101
- shardingsphere101
- 0.0.1-SNAPSHOT
-
- shardingsphere-2fastcode
- 0.0.1-SNAPSHOT
- shardingsphere-2fastcode
-
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
-
-
diff --git a/shardingsphere101/shardingsphere-2fastcode/sql/CreateTable.sql b/shardingsphere101/shardingsphere-2fastcode/sql/CreateTable.sql
deleted file mode 100644
index a3a71e96..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/sql/CreateTable.sql
+++ /dev/null
@@ -1,29 +0,0 @@
-CREATE TABLE `t_order_0` (
- `order_id` bigint NOT NULL,
- `create_time` datetime DEFAULT NULL,
- PRIMARY KEY (`order_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
-CREATE TABLE `t_order_1` (
- `order_id` bigint NOT NULL,
- `create_time` datetime DEFAULT NULL,
- PRIMARY KEY (`order_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
-CREATE TABLE `t_order_2` (
- `order_id` bigint NOT NULL,
- `create_time` datetime DEFAULT NULL,
- PRIMARY KEY (`order_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
-
-
-CREATE TABLE `t_user` (
- `id` bigint NOT NULL AUTO_INCREMENT,
- `u_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
- `u_age` int DEFAULT NULL,
- `u_address` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
- `create_time` datetime DEFAULT NULL,
- `date_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/Application.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/Application.java
deleted file mode 100644
index a113699c..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/Application.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.shardingsphere_101;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class Application {
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/conf/ShardingConfiguration.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/conf/ShardingConfiguration.java
deleted file mode 100644
index 14330559..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/conf/ShardingConfiguration.java
+++ /dev/null
@@ -1,95 +0,0 @@
-//package com.shardingsphere_101.conf;
-//
-//import com.zaxxer.hikari.HikariDataSource;
-//import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-//import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//
-//import javax.sql.DataSource;
-//import java.sql.SQLException;
-//import java.util.*;
-//
-///**
-// * 公众号:程序员小富
-// */
-//@Configuration
-//public class ShardingConfiguration {
-//
-// /**
-// * 配置分片数据源
-// * 公众号:程序员小富
-// */
-// @Bean
-// public DataSource getShardingDataSource() throws SQLException {
-// Map dataSourceMap = new HashMap<>();
-// dataSourceMap.put("db0", dataSource0());
-// dataSourceMap.put("db1", dataSource1());
-//
-// // 分片rules规则配置
-// ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
-//
-// shardingRuleConfig.setBroadcastTables(Collections.singletonList("t_city_dict"));
-// shardingRuleConfig.setShardingAlgorithms(getShardingAlgorithms());
-// // 配置 t_order 表分片规则
-// ShardingTableRuleConfiguration orderTableRuleConfig = new ShardingTableRuleConfiguration("t_order", "db${0..1}.t_order_${0..2}");
-// orderTableRuleConfig.setTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "table-inline"));
-// orderTableRuleConfig.setDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "database-inline"));
-// shardingRuleConfig.getTables().add(orderTableRuleConfig);
-//
-// // 是否在控制台输出解析改造后真实执行的 SQL
-// Properties properties = new Properties();
-// properties.setProperty("sql-show", "true");
-// // 创建 ShardingSphere 数据源
-// return ShardingSphereDataSourceFactory.createDataSource(dataSourceMap, Collections.singleton(shardingRuleConfig), properties);
-// }
-//
-// /**
-// * 配置数据源1
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource0() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/shardingsphere-db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置数据源2
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource1() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/shardingsphere-db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置分片算法
-// * 公众号:程序员小富
-// */
-// private Map getShardingAlgorithms() {
-// Map shardingAlgorithms = new LinkedHashMap<>();
-//
-// // 自定义分库算法
-// Properties databaseAlgorithms = new Properties();
-// databaseAlgorithms.setProperty("algorithm-expression", "db$->{order_id % 2}");
-// shardingAlgorithms.put("database-inline", new AlgorithmConfiguration("INLINE", databaseAlgorithms));
-//
-// // 自定义分表算法
-// Properties tableAlgorithms = new Properties();
-// tableAlgorithms.setProperty("algorithm-expression", "t_order_$->{order_id % 3}");
-// shardingAlgorithms.put("table-inline", new AlgorithmConfiguration("INLINE", tableAlgorithms));
-//
-// return shardingAlgorithms;
-// }
-//}
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/controller/OrderController.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/controller/OrderController.java
deleted file mode 100644
index f11c19b8..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/controller/OrderController.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.shardingsphere_101.controller;
-
-import com.shardingsphere_101.entity.Order;
-import com.shardingsphere_101.service.OrderService;
-import org.springframework.data.domain.Page;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import java.util.List;
-
-/**
- * 订单 API
- *
- * @author Jiahai
- */
-@RestController
-@RequestMapping("/order")
-public class OrderController {
- @Resource
- private OrderService orderService;
-
- /**
- * 新增
- *
- * @return Order
- */
- @PostMapping
- public Order save() {
- return orderService.save();
- }
-
- /**
- * 删除
- *
- * @param orderId 订单ID
- */
- @DeleteMapping("/{orderId}")
- public void delete(@PathVariable Long orderId) {
- orderService.delete(orderId);
- }
-
- /**
- * 修改
- *
- * @param orderId 订单ID
- */
- @PutMapping
- public void update(Long orderId) {
- orderService.update(orderId);
- }
-
- /**
- * 根据主键ID查询
- *
- * @param orderId 订单ID
- * @return Order
- */
- @GetMapping("/{orderId}")
- public Order findById(@PathVariable Long orderId) {
- return orderService.findById(orderId);
- }
-
- /**
- * 列表查询(根据主键ID顺序)
- *
- * @return List
- */
- @GetMapping("/list")
- public List list() {
- return orderService.list();
- }
-
- /**
- * 分页查询(根据主键ID逆序)
- *
- * @param page 当前页
- * @param size 每页条数
- * @return Page
- */
- @GetMapping("/page/{page}/{size}")
- public Page page(@PathVariable int page, @PathVariable int size) {
- return orderService.page(page, size);
- }
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/entity/Order.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/entity/Order.java
deleted file mode 100644
index 2d5ba087..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/entity/Order.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.shardingsphere_101.entity;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 订单实体类
- *
- * @author Jiahai
- */
-@Accessors(chain = true)
-@Entity
-@Table(name = "t_order")
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class Order implements Serializable {
- /**
- * 订单ID
- */
- @Id
- private Long orderId;
-
- /**
- * 创建时间
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
- private Date createTime;
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/entity/User.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/entity/User.java
deleted file mode 100644
index f771de05..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/entity/User.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.shardingsphere_101.entity;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-
-@Accessors(chain = true)
-@Entity
-@Table(name = "t_user")
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class User implements Serializable {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Long id;
-
- private String uName;
-
- private Integer uAge;
-
- private String uAddress;
-
- private Date createTime;
-
- private Date dateTime;
-}
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/repository/OrderRepository.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/repository/OrderRepository.java
deleted file mode 100644
index afffc7a5..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/repository/OrderRepository.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.shardingsphere_101.repository;
-
-import com.shardingsphere_101.entity.Order;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-public interface OrderRepository extends JpaRepository {
-}
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/repository/UserRepository.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/repository/UserRepository.java
deleted file mode 100644
index e7ee4a95..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/repository/UserRepository.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.shardingsphere_101.repository;
-
-import com.shardingsphere_101.entity.User;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-public interface UserRepository extends JpaRepository {
-}
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/service/OrderService.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/service/OrderService.java
deleted file mode 100644
index dd1c93ea..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/service/OrderService.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.shardingsphere_101.service;
-
-import com.shardingsphere_101.entity.Order;
-import org.springframework.data.domain.Page;
-
-import java.util.List;
-
-/**
- * 订单业务层接口
- *
- * @author Jiahai
- */
-public interface OrderService {
- /**
- * 新增(测试数据)
- *
- * @return
- */
- Order save();
-
- /**
- * 根据ID删除
- *
- * @param orderId
- */
- void delete(Long orderId);
-
- /**
- * 更新(创建时间)
- *
- * @param orderId
- */
- void update(Long orderId);
-
- /**
- * 根据主键查询
- *
- * @param orderId 订单ID
- * @return
- */
- Order findById(Long orderId);
-
- /**
- * 列表查询(根据主键ID顺序)
- *
- * @return
- */
- List list();
-
- /**
- * 分页查询(根据主键ID逆序)
- *
- * @param page 当前页
- * @param size 每页条数
- * @return
- */
- Page page(int page, int size);
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/service/impl/OrderServiceImpl.java b/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/service/impl/OrderServiceImpl.java
deleted file mode 100644
index 78d9af87..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/java/com/shardingsphere_101/service/impl/OrderServiceImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.shardingsphere_101.service.impl;
-
-import com.shardingsphere_101.entity.Order;
-import com.shardingsphere_101.repository.OrderRepository;
-import com.shardingsphere_101.service.OrderService;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Sort;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-import java.util.Date;
-import java.util.List;
-import java.util.stream.LongStream;
-
-/**
- * 订单业务层接口实现类
- *
- * @author Jiahai
- */
-@Service
-public class OrderServiceImpl implements OrderService {
- @Resource
- private OrderRepository orderRepository;
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public Order save() {
- // 新增订单ID从1~10的测试数据
- LongStream.range(1, 11).forEach(value -> orderRepository.save(new Order(value, new Date())));
- return null;
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void delete(Long orderId) {
- orderRepository.deleteById(orderId);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void update(Long orderId) {
- orderRepository.findById(orderId).orElseThrow(() -> new RuntimeException("ID不存在")).setCreateTime(new Date());
- }
-
- @Override
- public Order findById(Long orderId) {
- return orderRepository.findById(orderId).orElseThrow(() -> new RuntimeException("ID不存在"));
- }
-
- @Override
- public List list() {
- return orderRepository.findAll(Sort.by(Sort.Direction.ASC, "orderId"));
- }
-
- @Override
- public Page page(int page, int size) {
- PageRequest pageRequest = PageRequest.of(page - 1, size, Sort.by(Sort.Direction.DESC, "orderId"));
- return this.orderRepository.findAll(pageRequest);
- }
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/main/resources/application.yml b/shardingsphere101/shardingsphere-2fastcode/src/main/resources/application.yml
deleted file mode 100644
index 1bcd1eb2..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/main/resources/application.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-server:
- port: 6770
-
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db2 , db1 , db0
- db0:
- # 数据库连接池类名称
- type: com.zaxxer.hikari.HikariDataSource
- # 数据库驱动类名
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/shardingsphere-db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- # 数据库连接池类名称
- type: com.zaxxer.hikari.HikariDataSource
- # 数据库驱动类名
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/shardingsphere-db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db2:
- # 数据库连接池类名称
- type: com.zaxxer.hikari.HikariDataSource
- # 数据库驱动类名
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/shardingsphere-db2?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
-
- # 规则配置
- rules:
- sharding:
- # 设置默认数据源
- default-data-source-name: db1
- # 分片算法配置
- sharding-algorithms:
- database-inline:
- # 分片算法类型
- type: INLINE
- props:
- # 分片算法的行表达式
- algorithm-expression: db$->{order_id % 2}
- table-inline:
- # 分片算法类型
- type: INLINE
- props:
- # 分片算法的行表达式
- algorithm-expression: t_order_$->{order_id % 3}
- # 分布式序列算法配置
- key-generators:
- snowflake:
- # 分布式序列算法(雪花算法:SNOWFLAKE; UUID:UUID)(注:UUID没有props配置)
- type: SNOWFLAKE
- # 分布式序列算法属性配置
- props:
- # 工作机器唯一标识
- worker-id: 1
- tables:
- # 逻辑表名称
- t_order:
- # 行表达式标识符可以使用 ${...} 或 $->{...},但前者与 Spring 本身的属性文件占位符冲突,因此在 Spring 环境中使用行表达式标识符建议使用 $->{...}
- actual-data-nodes: db$->{0..1}.t_order_$->{0..3}
- # 分库策略
- database-strategy:
- standard:
- # 分片列名称
- sharding-column: order_id
- # 分片算法名称
- sharding-algorithm-name: database-inline
- # 分表策略
- table-strategy:
- standard:
- # 分片列名称
- sharding-column: order_id
- # 分片算法名称
- sharding-algorithm-name: table-inline
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-2fastcode/src/test/java/com/shardingsphere_101/ShardingSphereApplicationTests.java b/shardingsphere101/shardingsphere-2fastcode/src/test/java/com/shardingsphere_101/ShardingSphereApplicationTests.java
deleted file mode 100644
index 222798d4..00000000
--- a/shardingsphere101/shardingsphere-2fastcode/src/test/java/com/shardingsphere_101/ShardingSphereApplicationTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.shardingsphere_101;
-
-import com.shardingsphere_101.entity.User;
-import com.shardingsphere_101.repository.UserRepository;
-import com.shardingsphere_101.service.OrderService;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import javax.annotation.Resource;
-import java.util.Date;
-
-@SpringBootTest
-class ShardingSphereApplicationTests {
-
- @Resource
- private OrderService orderService;
-
- @Resource
- private UserRepository userRepository;
-
- /**
- * 插入 t_order 数据验证简单的分库分表示例
- */
- @Test
- void saveOrderSharding() {
- orderService.save();
- }
-
- /**
- * t_user 未做分库分表的表,插入数据验证示例
- */
- @Test
- void saveDefaultUserSharding() {
- User user = new User();
- user.setUName("公众号:程序员小富");
- user.setUAge(12);
- user.setUAddress("宇宙商场");
- user.setCreateTime(new Date());
- user.setDateTime(new Date());
- userRepository.save(user);
- }
-}
diff --git a/shardingsphere101/shardingsphere-algorithms/README.md b/shardingsphere101/shardingsphere-algorithms/README.md
deleted file mode 100644
index 16e1b11b..00000000
--- a/shardingsphere101/shardingsphere-algorithms/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-### 本案例对应的文章教程
-
-[一口气搞懂分库分表 12 种分片算法,大厂都在用](https://mp.weixin.qq.com/s/HAoCXGoGCbDt9ZaWCu-qIw)
-
diff --git a/shardingsphere101/shardingsphere-algorithms/pom.xml b/shardingsphere101/shardingsphere-algorithms/pom.xml
deleted file mode 100644
index db0bfbd2..00000000
--- a/shardingsphere101/shardingsphere-algorithms/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
- 4.0.0
-
- com.shardingsphere101
- shardingsphere101
- 0.0.1-SNAPSHOT
-
- shardingsphere-algorithms
- 0.0.1-SNAPSHOT
- shardingsphere-algorithms
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
-
-
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/AlgorithmsApplication.java b/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/AlgorithmsApplication.java
deleted file mode 100644
index 66459f23..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/AlgorithmsApplication.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.shardingsphere_101;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class AlgorithmsApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(AlgorithmsApplication.class, args);
- }
-
-}
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderComplexCustomAlgorithm.java b/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderComplexCustomAlgorithm.java
deleted file mode 100644
index 9c3b820b..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderComplexCustomAlgorithm.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.shardingsphere_101.algorithm;
-
-import com.alibaba.fastjson.JSON;
-import com.google.common.collect.Range;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardingAlgorithm;
-import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardingValue;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * 自定义复合分片算法
- *
- * @author 公众号:程序员小富
- * @date 2024/03/22 11:02
- */
-@Slf4j
-public class OrderComplexCustomAlgorithm implements ComplexKeysShardingAlgorithm {
-
- /**
- * 复合分片算法进入,支持>,>=, <=,<,=,IN 和 BETWEEN AND 等操作符
- *
- * @param availableTargetNames 所有分片表的集合
- * @param complexKeysShardingValue 多个分片健的值,并SQL中解析出来的分片值
- */
- @Override
- public Collection doSharding(Collection availableTargetNames,
- ComplexKeysShardingValue complexKeysShardingValue) {
-
- /**
- * 分库策略使用时:availableTargetNames 参数数据为分片库的集合 ["db0","db1"]
- * 分表策略使用时:availableTargetNames 参数数据为分片库的集合 ["t_order_0","t_order_1","t_order_2"]
- */
- log.info("进入复合分片:complex availableTargetNames:{}", JSON.toJSONString(availableTargetNames));
-
- // 多分片健和其对应的分片健范围值
- Map> columnNameAndRangeValuesMap = complexKeysShardingValue.getColumnNameAndRangeValuesMap();
- log.info("进入复合分片:columnNameAndRangeValuesMap:{}", JSON.toJSONString(columnNameAndRangeValuesMap));
-
- columnNameAndRangeValuesMap.forEach((columnName, range) -> {
- range.lowerEndpoint();
- range.upperEndpoint();
- // 分片健
- log.info("进入复合分片:columnName:{}", columnName);
- // 分片健范围值
- log.info("进入复合分片:range:{}", JSON.toJSONString(range));
- });
-
- // 多分片健和其对应的分片健值
- Map> columnNameAndShardingValuesMap = complexKeysShardingValue.getColumnNameAndShardingValuesMap();
- log.info("进入复合分片:columnNameAndShardingValuesMap:{}", JSON.toJSONString(columnNameAndShardingValuesMap));
- columnNameAndShardingValuesMap.forEach((columnName, shardingValues) -> {
- // 分片健
- log.info("进入复合分片:columnName:{}", columnName);
- // 分片健值
- log.info("进入复合分片:shardingValues:{}", JSON.toJSONString(shardingValues));
- });
-
- return null;
- }
-
- @Override
- public Properties getProps() {
-
- Properties props = new Properties();
- // 设置算法所需的配置信息
- props.setProperty("key1", "value1");
- props.setProperty("key2", "value2");
- return props;
- }
-
- /**
- * 初始化配置
- *
- * @param properties
- */
- @Override
- public void init(Properties properties) {
- Object prop = properties.get("aaaaaa");
- log.info("自定义配置信息:{}", JSON.toJSONString(prop));
- }
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderHintCustomAlgorithm.java b/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderHintCustomAlgorithm.java
deleted file mode 100644
index c4414cda..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderHintCustomAlgorithm.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.shardingsphere_101.algorithm;
-
-import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.sharding.api.sharding.hint.HintShardingAlgorithm;
-import org.apache.shardingsphere.sharding.api.sharding.hint.HintShardingValue;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Properties;
-
-/**
- * 自定义强制路由分片算法
- *
- * @author 公众号:程序员小富
- * @date 2024/03/22 11:02
- */
-@Slf4j
-public class OrderHintCustomAlgorithm implements HintShardingAlgorithm {
-
- @Override
- public Collection doSharding(Collection availableTargetNames, HintShardingValue hintShardingValue) {
-
- /**
- * 获取到设置的分表或者分库的分片值
- * 指定分表时的分片值 hintManager.addTableShardingValue("t_order",2L);
- * 指定分库时的分片值 hintManager.addDatabaseShardingValue("t_order", 100L);
- */
- Collection values = hintShardingValue.getValues();
- Collection result = new ArrayList<>();
- // 从所有分片表中得到合适的分片表
- for (String each : availableTargetNames) {
- for (Long value : values) {
- Long mod = value % availableTargetNames.size();
- if (each.endsWith(String.valueOf(mod))) {
- result.add(each);
- }
- }
- }
- return result;
- }
-
- @Override
- public Properties getProps() {
- return null;
- }
-
- @Override
- public void init(Properties properties) {
-
- }
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderStandardCustomAlgorithm.java b/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderStandardCustomAlgorithm.java
deleted file mode 100644
index a7e4e817..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/algorithm/OrderStandardCustomAlgorithm.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package com.shardingsphere_101.algorithm;
-
-import com.alibaba.fastjson.JSON;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Properties;
-
-/**
- * 自定义标准分片算法
- *
- * @author 公众号:程序员小富
- * @date 2024/03/22 11:02
- */
-@Slf4j
-public class OrderStandardCustomAlgorithm implements StandardShardingAlgorithm {
-
- /**
- * 精准分片进入 sql中有 = 和 in 等操作符会执行
- *
- * @param availableTargetNames 所有分片表的集合
- * @param preciseShardingValue 分片健的值,SQL中解析出来的分片值
- */
- @Override
- public String doSharding(Collection availableTargetNames,
- PreciseShardingValue preciseShardingValue) {
- /**
- * 分库策略使用时:availableTargetNames 参数数据为分片库的集合 ["db0","db1"]
- * 分表策略使用时:availableTargetNames 参数数据为分片库的集合 ["t_order_0","t_order_1","t_order_2"]
- */
- log.info("进入精准分片 precise availableTargetNames:{}", JSON.toJSONString(availableTargetNames));
-
- /**
- * 分库策略使用时: shardingValue 参数数据:{"columnName":"order_id","dataNodeInfo":{"paddingChar":"0","prefix":"db","suffixMinLength":1},"logicTableName":"t_order","value":1}
- * 分表策略使用时: shardingValue 参数数据:{"columnName":"order_id","dataNodeInfo":{"paddingChar":"0","prefix":"t_order_","suffixMinLength":1},"logicTableName":"t_order","value":1}
- */
- log.info("进入精准分片 preciseShardingValue:{}", JSON.toJSONString(preciseShardingValue));
- int tableSize = availableTargetNames.size();
- // 真实表的前缀
- String tablePrefix = preciseShardingValue.getDataNodeInfo().getPrefix();
- // 分片健的值
- long orderId = preciseShardingValue.getValue();
- // 对分片健取模后确定位置
- long mod = orderId % tableSize;
- return tablePrefix + mod;
- }
-
- /**
- * 范围分片进入 sql中有 between 和 < > 等操作符会执行
- *
- * @param availableTargetNames 所有分片表的集合
- * @param rangeShardingValue 分片健的值,SQL中解析出来的分片值
- * @return
- */
- @Override
- public Collection doSharding(Collection availableTargetNames,
- RangeShardingValue rangeShardingValue) {
- /**
- * 分库策略使用时:availableTargetNames 参数数据为分片库的集合 ["db0","db1"]
- * 分表策略使用时:availableTargetNames 参数数据为分片库的集合 ["t_order_0","t_order_1","t_order_2"]
- */
- log.info("进入范围分片:range availableTargetNames:{}", JSON.toJSONString(availableTargetNames));
-
-
- /**
- * 分库策略使用时 shardingValue 参数数据:{"columnName":"order_id","dataNodeInfo":{"paddingChar":"0","prefix":"db","suffixMinLength":1},"logicTableName":"t_order","valueRange":{"empty":false}}
- * 分表策略使用时 shardingValue 参数数据:{"columnName":"order_id","dataNodeInfo":{"paddingChar":"0","prefix":"t_order_","suffixMinLength":1},"logicTableName":"t_order","valueRange":{"empty":false}}
- */
- log.info("进入范围分片:rangeShardingValue:{}", JSON.toJSONString(rangeShardingValue));
-
- Properties props = getProps();
- log.info("进入范围分片:rangeShardingValue props:{}", JSON.toJSONString(props));
- // 分片健值的上下边界
-// Range valueRange = rangeShardingValue.getValueRange();
-// Long lower = valueRange.lowerEndpoint();
-// // 分片健值的上边界
-// Long upper = valueRange.upperEndpoint();
-// // 真实表的前缀
-// String tablePrefix = rangeShardingValue.getDataNodeInfo().getPrefix();
-// if (lower != null && upper != null) {
-// // 分片健的值
-// long orderId = upper - lower;
-// // 对分片健取模后确定位置
-// long mod = orderId % availableTargetNames.size();
-// return Arrays.asList(tablePrefix + mod);
-// }
- //
- return Collections.singletonList("t_order_0");
- }
-
- @Override
- public Properties getProps() {
- Properties props = new Properties();
- // 设置算法所需的配置信息
- props.setProperty("key1", "value1");
- props.setProperty("key2", "value2");
- return props;
- }
-
- /**
- * 初始化配置
- *
- * @param properties
- */
- @Override
- public void init(Properties properties) {
- Object prop = properties.get("cccccc");
- log.info("自定义配置信息:{}", JSON.toJSONString(prop));
- }
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java b/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java
deleted file mode 100644
index 33736b75..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java
+++ /dev/null
@@ -1,96 +0,0 @@
-//package com.shardingsphere_101.config;
-//
-//import com.zaxxer.hikari.HikariDataSource;
-//import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-//import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//
-//import javax.sql.DataSource;
-//import java.sql.SQLException;
-//import java.util.*;
-//
-///**
-// * 公众号:程序员小富
-// */
-//@Configuration
-//public class ShardingConfiguration {
-//
-// /**
-// * 配置分片数据源
-// * 公众号:程序员小富
-// */
-// @Bean
-// public DataSource getShardingDataSource() throws SQLException {
-// Map dataSourceMap = new HashMap<>();
-// dataSourceMap.put("db0", dataSource0());
-// dataSourceMap.put("db1", dataSource1());
-//
-// // 分片rules规则配置
-// ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
-//
-// // 分片算法
-// shardingRuleConfig.setShardingAlgorithms(getShardingAlgorithms());
-// // 配置 t_order 表分片规则
-// ShardingTableRuleConfiguration orderTableRuleConfig = new ShardingTableRuleConfiguration("t_order", "db${0..1}.t_order_${1..1000}");
-// orderTableRuleConfig.setTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "t_order_table_algorithms"));
-// orderTableRuleConfig.setDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "t_order_database_algorithms"));
-// shardingRuleConfig.getTables().add(orderTableRuleConfig);
-//
-// // 是否在控制台输出解析改造后真实执行的 SQL
-// Properties properties = new Properties();
-// properties.setProperty("sql-show", "true");
-//
-// // 创建 ShardingSphere 数据源
-// return ShardingSphereDataSourceFactory.createDataSource(dataSourceMap, Collections.singleton(shardingRuleConfig), properties);
-// }
-//
-// /**
-// * 配置数据源1
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource0() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置数据源2
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource1() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置分片算法
-// * 公众号:程序员小富
-// */
-// private Map getShardingAlgorithms() {
-// Map shardingAlgorithms = new LinkedHashMap<>();
-//
-// // 自定义分库算法
-// Properties databaseAlgorithms = new Properties();
-// databaseAlgorithms.setProperty("algorithm-expression", "db$->{order_id % 2}");
-// shardingAlgorithms.put("t_order_database_algorithms", new AlgorithmConfiguration("INLINE", databaseAlgorithms));
-//
-// // 自定义分表算法
-// Properties tableAlgorithms = new Properties();
-// tableAlgorithms.setProperty("algorithm-expression", "db$->{order_id % 1000}");
-// shardingAlgorithms.put("t_order_table_algorithms", new AlgorithmConfiguration("INLINE", tableAlgorithms));
-//
-// return shardingAlgorithms;
-// }
-//}
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/controller/PingController.java b/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/controller/PingController.java
deleted file mode 100644
index f60d3ffc..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/controller/PingController.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.shardingsphere_101.controller;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class PingController {
-
- @RequestMapping("/ping")
- public String ping() {
- return "pong";
- }
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/dao/OrderMapper.java b/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/dao/OrderMapper.java
deleted file mode 100644
index 06f066e4..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/dao/OrderMapper.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.shardingsphere_101.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.shardingsphere_101.entity.OrderPo;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface OrderMapper extends BaseMapper {
-
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/entity/OrderPo.java b/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/entity/OrderPo.java
deleted file mode 100644
index ef9fdcde..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/java/com/shardingsphere_101/entity/OrderPo.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.shardingsphere_101.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 订单实体类
- */
-@Data
-@TableName("t_order")
-public class OrderPo {
-
- private Long Id;
- private Long orderId;
- private Long userId;
- private String orderNumber;
- private Long customerId;
- private Date orderDate;
- private BigDecimal totalAmount;
- private String intervalValue;
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-complex-line.yml b/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-complex-line.yml
deleted file mode 100644
index 6e8a550f..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-complex-line.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db0 , db1
- # 名称与上边 names 保持一致
- db0:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- # 具体规则配置
- rules:
- sharding:
- # 自动分片表规则配置
-# auto-tables:
-# t_order:
-# actual-data-sources: db$->{0..1}
-# sharding-strategy:
-# standard:
-# sharding-column: order_id
-# sharding-algorithm-name: t_order_database_complex_inline_algorithms
- # 分片算法定义
- sharding-algorithms:
- t_order_database_complex_inline_algorithms:
- type: complex_inline
- props:
- sharding-columns: order_id, user_id # 分片列名称,多个列用逗号分隔。
- algorithm-expression: db$->{(order_id + user_id) % 2} # 分片算法的行表达式
- allow-range-query-with-inline-sharding: false # 是否允许范围查询。注意:范围查询会无视分片策略,进行全路由,默认 false
- t_order_table_complex_inline:
- type: COMPLEX_INLINE
- props:
- sharding-columns: order_id, user_id # 分片列名称,多个列用逗号分隔。
- algorithm-expression: t_order_$->{ (order_id + user_id) % 3 } # 分片算法的行表达式
- allow-range-query-with-inline-sharding: false # 是否允许范围查询。注意:范围查询会无视分片策略,进行全路由,默认 false
- # 分布式序列算法配置
- key-generators:
- t_order_snowflake:
- # 分布式序列算法(雪花算法:SNOWFLAKE; UUID:UUID)(注:UUID没有props配置)
- type: SNOWFLAKE
- # 分布式序列算法属性配置
- props:
- # 工作机器唯一标识
- worker-id: 1
- tables:
- # 逻辑表名称
- t_order:
- # 数据节点:数据库.分片表
- actual-data-nodes: db$->{0..1}.t_order_${0..2}
- # 分库策略
- database-strategy:
- complex:
- shardingColumns: order_id, user_id
- sharding-algorithm-name: t_order_database_complex_inline_algorithms
- # 分表策略
- table-strategy:
- complex:
- shardingColumns: order_id, user_id
- sharding-algorithm-name: t_order_table_complex_inline
- keyGenerateStrategy:
- column: id
- keyGeneratorName: t_order_snowflake
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-custom-standard.yml b/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-custom-standard.yml
deleted file mode 100644
index 3456b59f..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-custom-standard.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db0 , db1
- # 名称与上边 names 保持一致
- db0:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- # 具体规则配置
- rules:
- sharding:
- # 自动分片表规则配置
- # auto-tables:
- # t_order:
- # actual-data-sources: db$->{0..1}
- # sharding-strategy:
- # standard:
- # sharding-column: order_id
- # sharding-algorithm-name: t_order_table_cosid_mod
- # 分片算法定义
- sharding-algorithms:
- # 12、自定义 STANDARD 标准算法
- t_order_standard_custom_algorithm:
- type: CLASS_BASED
- props:
- # 分片策略
- strategy: standard
- # 分片算法类
- algorithmClassName: com.shardingsphere_101.algorithm.OrderStandardCustomAlgorithm
- # 自定义属性
- prop:
- aaaaaa: 123456
- bbbbbb: 654321
-
- # 分布式序列算法配置
- key-generators:
- t_order_snowflake:
- # 分布式序列算法(雪花算法:SNOWFLAKE; UUID:UUID)(注:UUID没有props配置)
- type: SNOWFLAKE
- # 分布式序列算法属性配置
- props:
- # 工作机器唯一标识
- worker-id: 1
- tables:
- # 逻辑表名称
- t_order:
- # 数据节点:数据库.分片表
- actual-data-nodes: db$->{0..1}.t_order_${0..2}
- # 分库策略
- database-strategy:
- standard:
- sharding-column: order_id
- sharding-algorithm-name: t_order_database_mod
- # 分表策略
- table-strategy:
- standard:
- sharding-column: order_id
- sharding-algorithm-name: t_order_standard_custom_algorithm
- keyGenerateStrategy:
- column: id
- keyGeneratorName: t_order_snowflake
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-hint-inline.yml b/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-hint-inline.yml
deleted file mode 100644
index 83965e57..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-hint-inline.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db0 , db1
- # 名称与上边 names 保持一致
- db0:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- # 具体规则配置
- rules:
- sharding:
- # 分片算法定义
- sharding-algorithms:
- # Hint 行表达式分片算法
- t_order_database_hint_inline:
- type: HINT_INLINE
- props:
- algorithm-expression: db$->{Integer.valueOf(value) % 2} # 分片算法的行表达式,默认值${value}
- t_order_table_hint_inline:
- type: HINT_INLINE
- props:
- algorithm-expression: t_order_$->{Integer.valueOf(value) % 3} # 分片算法的行表达式,默认值${value}
- # 分布式序列算法配置
- key-generators:
- t_order_snowflake:
- # 分布式序列算法(雪花算法:SNOWFLAKE; UUID:UUID)(注:UUID没有props配置)
- type: SNOWFLAKE
- # 分布式序列算法属性配置
- props:
- # 工作机器唯一标识
- worker-id: 1
- tables:
- # 逻辑表名称
- t_order:
- # 数据节点:数据库.分片表
- actual-data-nodes: db$->{0..1}.t_order_${0..2}
- # 分库策略
- database-strategy:
- hint:
- sharding-algorithm-name: t_order_database_hint_inline
- # 分表策略
- table-strategy:
- hint:
- sharding-algorithm-name: t_order_table_hint_inline
- keyGenerateStrategy:
- column: id
- keyGeneratorName: t_order_snowflake
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-interval.yml b/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-interval.yml
deleted file mode 100644
index 81cb4546..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application-interval.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db0 , db1
- # 名称与上边 names 保持一致
- db0:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- # 具体规则配置
- rules:
- sharding:
- # 分片算法定义
- sharding-algorithms:
- t_order_database_mod:
- type: MOD
- props:
- sharding-count: 2 # 指定分片数量
- t_order_table_interval:
- type: INTERVAL
- props:
- datetime-pattern: "yyyy-MM-dd HH:mm:ss" # 分片字段格式
- datetime-lower: "2024-01-01 00:00:00" # 范围下限
- datetime-upper: "2024-06-30 23:59:59" # 范围上限
- sharding-suffix-pattern: "yyyyMM" # 分片名后缀,可以是MM,yyyyMMdd等。
- datetime-interval-amount: 1 # 分片间隔,这里指一个月
- datetime-interval-unit: "MONTHS" # 分片间隔单位
- tables:
- # 逻辑表名称
- t_order:
- # 数据节点:数据库.分片表
- actual-data-nodes: db$->{0..1}.t_order_${202401..202406}
- # 分库策略
- database-strategy:
- standard:
- sharding-column: order_id
- sharding-algorithm-name: t_order_database_mod
- # 分表策略
- table-strategy:
- standard:
- sharding-column: interval_value
- sharding-algorithm-name: t_order_table_interval
- keyGenerateStrategy:
- column: id
- keyGeneratorName: t_order_snowflake
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application.yml b/shardingsphere101/shardingsphere-algorithms/src/main/resources/application.yml
deleted file mode 100644
index 9dce0cb8..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/main/resources/application.yml
+++ /dev/null
@@ -1,200 +0,0 @@
-server:
- port: 10202
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db0 , db1
- # 名称与上边 names 保持一致
- db0:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- # 具体规则配置
- rules:
- sharding:
- # 自动分片表规则配置
- # auto-tables:
- # t_order:
- # actual-data-sources: db$->{0..1}
- # sharding-strategy:
- # standard:
- # sharding-column: order_id
- # sharding-algorithm-name: t_order_table_cosid_mod
- # 分片算法定义
- sharding-algorithms:
-
- t_order_database_algorithms:
- # 分片算法类型
- type: INLINE
- props: # 自定义参数
- algorithm-expression: db$->{order_id % 2}
- t_order_table_algorithms:
- type: INLINE
- props:
- algorithm-expression: t_order_$->{order_id % 3}
- t_order_database_mod:
- type: MOD
- props:
- sharding-count: 2 # 指定分片数量
- # 内置分片算法
- # 1、取模分片算法
- t_order_table_mod:
- type: MOD
- props:
- sharding-count: 3 # 指定分片数量
- # 2、哈希取模分片算法
- t_order_table_hash_mod:
- type: HASH_MOD
- props:
- sharding-count: 6 # 指定分片数量
- # 3、基于分片容量的范围分片算法 [1,2) 第一张表 [2,12) 第二张表 [12,20) 第三张表 [20,♾️) 第四张表
- t_order_table_volume_range:
- type: VOLUME_RANGE
- props:
- range-lower: 2 # 范围下界,超过边界的数据会报错
- range-upper: 20 # 范围上界,超过边界的数据会报错
- sharding-volume: 10 # 分片容量
- # 4、基于分片边界的范围分片算法,[1,10) 第一张表 [10,20) 第二张表 [20,30) 第三张表 [30,40) 第四张表 [40,♾️) 第五张表
- t_order_table_boundary_range:
- type: BOUNDARY_RANGE
- props:
- sharding-ranges: 10,20,30,40 # 分片的范围边界,多个范围边界以逗号分隔
- # 5、自动时间段分片算法
- t_order_table_auto_interval:
- type: AUTO_INTERVAL
- props:
- datetime-lower: '2024-01-01 00:00:00' # 分片的起始时间范围,时间戳格式:yyyy-MM-dd HH:mm:ss
- datetime-upper: '2026-01-01 00:00:00' # 分片的结束时间范围,时间戳格式:yyyy-MM-dd HH:mm:ss
- sharding-seconds: 31536000 # 单一分片所能承载的最大时间,单位:秒,允许分片键的时间戳格式的秒带有时间精度,但秒后的时间精度会被自动抹去
- # 标准分片算法
- # 6、行表达式分片算法
- t_order_table_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_$->{order_id % 3} # 分片算法的行表达式
- allow-range-query-with-inline-sharding: false # 是否允许范围查询。注意:范围查询会无视分片策略,进行全路由,默认 false
-
- # 7、时间范围分片算法
- t_order_table_interval:
- type: INTERVAL
- props:
- datetime-pattern: "yyyy-MM-dd HH:mm:ss" # 分片字段格式
- datetime-lower: "2024-01-01 00:00:00" # 范围下限
- datetime-upper: "2024-06-30 23:59:59" # 范围上限
- sharding-suffix-pattern: "yyyyMM" # 分片名后缀,可以是MM,yyyyMMdd等。
- datetime-interval-amount: 1 # 分片间隔,这里指一个月
- datetime-interval-unit: "MONTHS" # 分片间隔单位
-
- # 8、基于 CosId 的取模分片算法
- t_order_table_cosid_mod:
- type: COSID_MOD
- props:
- mod: 3 # 分片数量
- logic-name-prefix: t_order_ # 分片数据源或真实表的前缀格式
-
- # 9、基于 CosId 的固定时间范围的分片算法
- t_order_table_cosid_interval:
- type: COSID_INTERVAL
- props:
- zone-id: "Asia/Shanghai" # 时区,必须遵循 java.time.ZoneId 的所含值。 例如:Asia/Shanghai
- logic-name-prefix: t_order_ # 分片数据源或真实表的前缀格式
- sharding-suffix-pattern: "yyyyMM" # 分片数据源或真实表的后缀格式,必须遵循 Java DateTimeFormatter 的格式,必须和 datetime-interval-unit 保持一致。例如:yyyyMM
- datetime-lower: "2024-01-01 00:00:00" # 时间分片下界值,格式与 yyyy-MM-dd HH:mm:ss 的时间戳格式一致
- datetime-upper: "2024-12-31 00:00:00" # 时间分片上界值,格式与 yyyy-MM-dd HH:mm:ss 的时间戳格式一致
- datetime-interval-unit: "MONTHS" # 分片键时间间隔单位,必须遵循 Java ChronoUnit 的枚举值。例如:MONTHS
- datetime-interval-amount: 1 # 分片键时间间隔,超过该时间间隔将进入下一分片
- # 10、基于 CosId 的雪花ID固定时间范围的分片算法
- t_order_table_cosid_interval_snowflake:
- type: COSID_INTERVAL_SNOWFLAKE
- props:
- zone-id: "Asia/Shanghai" # 时区,必须遵循 java.time.ZoneId 的所含值。 例如:Asia/Shanghai
- logic-name-prefix: t_order_ # 分片数据源或真实表的前缀格式
- sharding-suffix-pattern: "yyyyMM" # 分片数据源或真实表的后缀格式,必须遵循 Java DateTimeFormatter 的格式,必须和 datetime-interval-unit 保持一致。例如:yyyyMM
- datetime-lower: "2024-01-01 00:00:00" # 时间分片下界值,格式与 yyyy-MM-dd HH:mm:ss 的时间戳格式一致
- datetime-upper: "2024-12-31 00:00:00" # 时间分片上界值,格式与 yyyy-MM-dd HH:mm:ss 的时间戳格式一致
- datetime-interval-unit: "MONTHS" # 分片键时间间隔单位,必须遵循 Java ChronoUnit 的枚举值。例如:MONTHS
- datetime-interval-amount: 1 # 分片键时间间隔,超过该时间间隔将进入下一分片
-
- # 11、Hint 行表达式分片算法
- t_order_database_hint_inline:
- type: HINT_INLINE
- props:
- algorithm-expression: db$->{Integer.valueOf(value) % 2} # 分片算法的行表达式,默认值${value}
- t_order_table_hint_inline:
- type: HINT_INLINE
- props:
- algorithm-expression: t_order_$->{Integer.valueOf(value) % 3} # 分片算法的行表达式,默认值${value}
-
- # 12、自定义 STANDARD 标准算法
- t_order_standard_custom_algorithm:
- type: CLASS_BASED
- props:
- # 分片策略
- strategy: standard
- # 分片算法类
- algorithmClassName: com.shardingsphere_101.algorithm.OrderStandardCustomAlgorithm
- # 自定义属性
- cccccc: cccccc
-
- # 13、自定义 complex 标准算法
- t_order_complex_custom_algorithm:
- type: CLASS_BASED
- props:
- # 分片策略
- strategy: complex
- # 分片算法类
- algorithmClassName: com.shardingsphere_101.algorithm.OrderComplexCustomAlgorithm
- # 自定义属性
- aaaaaa: aaaaaa
- # 14、自定义 hint 标准算法
- t_order_hint_custom_algorithm:
- type: CLASS_BASED
- props:
- # 分片策略
- strategy: hint
- # 分片算法类
- algorithmClassName: com.shardingsphere_101.algorithm.OrderHintCustomAlgorithm
- # 自定义属性
- bbbbbb: bbbbbb
-
- # 分布式序列算法配置
- key-generators:
- t_order_snowflake:
- # 分布式序列算法(雪花算法:SNOWFLAKE; UUID:UUID)(注:UUID没有props配置)
- type: SNOWFLAKE
- # 分布式序列算法属性配置
- props:
- # 工作机器唯一标识
- worker-id: 1
- tables:
- # 逻辑表名称
- t_order:
- # 数据节点:数据库.分片表
- actual-data-nodes: db$->{0..1}.t_order_${0..2}
- # 分库策略
- database-strategy:
- standard:
- sharding-column: order_id
- sharding-algorithm-name: t_order_database_mod
- # 分表策略
- table-strategy:
- standard:
- sharding-column: order_id
- sharding-algorithm-name: t_order_table_mod
- keyGenerateStrategy:
- column: id
- keyGeneratorName: t_order_snowflake
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-algorithms/src/test/java/com/shardingsphere_101/CustomShardingAlgorithmsTests.java b/shardingsphere101/shardingsphere-algorithms/src/test/java/com/shardingsphere_101/CustomShardingAlgorithmsTests.java
deleted file mode 100644
index c901dcd8..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/test/java/com/shardingsphere_101/CustomShardingAlgorithmsTests.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package com.shardingsphere_101;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.shardingsphere_101.dao.OrderMapper;
-import com.shardingsphere_101.entity.OrderPo;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.RandomUtils;
-import org.apache.shardingsphere.infra.hint.HintManager;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import javax.annotation.Resource;
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 自动义分片算法测试类
- *
- * @author 公众号:程序员小富
- * @date 2023/12/31 17:25
- */
-@Slf4j
-@DisplayName("自定义分片算法测试类")
-@SpringBootTest
-class CustomShardingAlgorithmsTests {
-
- @Resource
- private JdbcTemplate jdbcTemplate;
-
- @Resource
- private OrderMapper orderMapper;
-
- @DisplayName("测试自定义标准分片算法插入数据")
- @Test
- public void orderComplexCustomAlgorithmTest() {
-
- int randomId = RandomUtils.nextInt();
- OrderPo order = new OrderPo();
- order.setOrderId(20L);
- order.setUserId(100L);
- order.setOrderNumber(String.valueOf(randomId));
- order.setCustomerId((long) randomId);
- order.setOrderDate(new Date());
- order.setTotalAmount(new BigDecimal("0"));
- order.setIntervalValue("2024-03-01 00:00:00");
- orderMapper.insert(order);
- }
-
- /**
- * 查询标准策略
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("自动义分片算法-范围查询")
- @Test
- public void queryTableTest() {
- QueryWrapper queryWrapper = new QueryWrapper()
-// .le("order_id", 10)
-// .ge("order_id", 1)
- .eq("user_id", 1);
- queryWrapper.orderByAsc("order_id");
-// .eq("id", 1771023476480950274L);
- List orderPos = orderMapper.selectList(queryWrapper);
- log.info("查询结果:{}", JSON.toJSONString(orderPos));
- }
-
- /**
- * Hint 强制路由查询
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("Hint 自动义分片算法-范围查询")
- @Test
- public void queryHintTableTest() {
-
- HintManager hintManager = HintManager.getInstance();
- // 指定分表时的分片值
- hintManager.addTableShardingValue("t_order",2L);
- // 指定分库时的分片值
- hintManager.addDatabaseShardingValue("t_order", 100L);
-
- QueryWrapper queryWrapper = new QueryWrapper()
- .eq("user_id", 20).eq("order_id", 10);
- List orderPos = orderMapper.selectList(queryWrapper);
- log.info("查询结果:{}", JSON.toJSONString(orderPos));
- }
-}
diff --git a/shardingsphere101/shardingsphere-algorithms/src/test/java/com/shardingsphere_101/ShardingAlgorithmsTests.java b/shardingsphere101/shardingsphere-algorithms/src/test/java/com/shardingsphere_101/ShardingAlgorithmsTests.java
deleted file mode 100644
index 1e539378..00000000
--- a/shardingsphere101/shardingsphere-algorithms/src/test/java/com/shardingsphere_101/ShardingAlgorithmsTests.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package com.shardingsphere_101;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.shardingsphere_101.dao.OrderMapper;
-import com.shardingsphere_101.entity.OrderPo;
-import org.apache.commons.lang3.RandomUtils;
-import org.apache.shardingsphere.infra.hint.HintManager;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import javax.annotation.Resource;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 分片算法测试类
- *
- * @author 公众号:程序员小富
- * @date 2023/12/31 17:25
- */
-@DisplayName("分片算法测试类")
-@SpringBootTest
-class ShardingAlgorithmsTests {
-
- @Resource
- private JdbcTemplate jdbcTemplate;
-
- @Resource
- private OrderMapper orderMapper;
-
- /**
- * 执行创建逻辑表的SQL,会根据AutoTables的配置自动在对应的数据源内创建分片表
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("创建分片表")
- @Test
- public void autoCreateOrderTableAlgorithmsTest() {
- jdbcTemplate.execute("CREATE TABLE `t_order` (\n" + " `id` bigint(20) NOT NULL,\n" + " `order_id` bigint(20) NOT NULL,\n" + " `user_id` bigint(20) NOT NULL,\n" + " `order_number` varchar(255) NOT NULL,\n" + " `customer_id` bigint(20) NOT NULL,\n" + " `order_date` datetime default NULL,\n" + " `interval_value` varchar(125) default NULL,\n" + " `total_amount` decimal(10,2) NOT NULL,\n" + " PRIMARY KEY (`order_id`) USING BTREE\n" + ");");
- }
-
- /**
- * 删除 t_order 表
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("删除分片表")
- @Test
- public void autoDeleteOrderTableAlgorithmsTest() {
- jdbcTemplate.execute("DROP TABLE `t_order`;");
- }
-
- @DisplayName("测试t_order_id插入数据")
- @Test
- public void insertTableTest() {
-
- for (int i = 1; i <= 40; i++) {
- int randomId = RandomUtils.nextInt();
- OrderPo order = new OrderPo();
- order.setOrderId((long) i);
- order.setUserId((long) i);
- order.setOrderNumber(String.valueOf(randomId));
- order.setCustomerId((long) randomId);
- order.setOrderDate(new Date());
- order.setTotalAmount(new BigDecimal("0"));
- order.setIntervalValue("2024-03-01 00:00:00");
- orderMapper.insert(order);
- }
- }
-
- /**
- * 查询标准策略
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("查询标准策略")
- @Test
- public void queryTableTest() {
- QueryWrapper queryWrapper = new QueryWrapper().eq("order_id", 9).eq("id", 1769988936014688257L);
- OrderPo orderPo = orderMapper.selectOne(queryWrapper);
- System.out.println(orderPo.getId());
- }
-
- @DisplayName("测试 AUTO_INTERVAL 时间分片算法插入数据")
- @Test
- public void insertAutoIntervalDateTableTest() {
- // 放入 t_order_0 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (1, '2023-03-20 00:00:00', 1, '1', 1, 1.00 , '2024-01-01 00:00:00', 1);");
-
- // 放入 t_order_1 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (2, '2024-03-20 00:00:00', 2, '2', 2,1.00 , '2024-01-01 00:00:00', 1);");
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (3, '2024-03-20 00:00:00', 3, '3', 3, 1.00 , '2024-01-01 00:00:00', 1);");
-
- // 放入 t_order_2 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (4,'2025-03-20 00:00:00',4, '4', 4, 1.00 , '2024-01-01 00:00:00', 1);");
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (5,'2025-03-20 00:00:00',5, '5', 5, 1.00 , '2024-01-01 00:00:00', 1);");
-
- // 放入 t_order_3 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (6,'2026-03-20 00:00:00',6, '6', 6, 1.00 , '2024-01-01 00:00:00', 1);");
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (7,'2027-03-20 11:19:58',7, '7', 7, 1.00 , '2024-01-01 00:00:00', 1);");
- }
-
-
- @DisplayName("测试 interval 时间范围分片算法插入数据")
- @Test
- public void insertIntervalDateTableTest() {
- // 放入 t_order_202401 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (1, '2024-03-20 00:00:00', 1, '1', 1, 1.00, '2024-01-01 00:00:00', 1);");
- // 放入 t_order_202402 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (2, '2024-03-20 00:00:00', 2, '2', 2, 1.00, '2024-02-01 00:00:00', 1);");
- // 放入 t_order_202403 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (3, '2024-03-20 00:00:00', 3, '3', 3, 1.00, '2024-03-01 00:00:00', 1);");
- // 放入 t_order_202404 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (4, '2025-03-20 00:00:00', 4, '4', 4, 1.00, '2024-04-01 00:00:00', 1);");
- // 放入 t_order_202405 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (5, '2025-03-20 00:00:00', 5, '5', 5, 1.00, '2024-05-01 00:00:00', 1);");
- // 放入 t_order_202406 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (6, '2026-03-20 00:00:00', 6, '6', 6, 1.00, '2024-06-01 00:00:00', 1);");
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (7, '2027-03-20 00:00:00', 7, '7', 7, 1.00, '2024-07-01 00:00:00', 1);");
- }
-
-
- @DisplayName("测试 cosid_interval COSID_INTERVAL_SNOWFLAKE 时间范围分片算法插入数据")
- @Test
- public void insertCosIdIntervalDateTableTest() {
- // 放入 t_order_202401 分片表
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (1, '2024-03-20 00:00:00', 1, '1', 1, 1.00, '2024-01-01 00:00:00', 1);");
-// jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (2, '2024-03-20 00:00:00', 2, '2', 2, 1.00, '2024-02-01 00:00:00', 1);");
-// jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (3, '2024-03-20 00:00:00', 3, '3', 3, 1.00, '2024-03-01 00:00:00', 1);");
-// jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (4, '2025-03-20 00:00:00', 4, '4', 4, 1.00, '2024-04-01 00:00:00', 1);");
-// jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (5, '2025-03-20 00:00:00', 5, '5', 5, 1.00, '2024-05-11 00:00:10', 1);");
-// jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (6, '2026-03-20 00:00:00', 6, '6', 6, 1.00, '2024-06-01 00:00:00', 1);");
- }
-
- @DisplayName("测试 hint_inline 分片算法插入数据")
- @Test
- public void insertHintInlineTableTest() {
- HintManager hintManager = HintManager.getInstance();
- hintManager.clearShardingValues();
- // 设置逻辑表 t_order 的分库值
- hintManager.addDatabaseShardingValue("t_order", 0);
- // 设置逻辑表 t_order 的分表值
- hintManager.addTableShardingValue("t_order", 1);
- // 1%3 = 1 所以放入 db0.t_order_1 分片表
- // /* SHARDINGSPHERE_HINT: t_order.SHARDING_DATABASE_VALUE=0, t_order.SHARDING_TABLE_VALUE=1 */
- jdbcTemplate.execute("INSERT INTO `t_order`(`id`,`order_date`,`order_id`, `order_number`, `customer_id`, `total_amount`, `interval_value`, `user_id`) VALUES (1, '2024-03-20 00:00:00', 1, '1', 1, 1.00, '2024-01-01 00:00:00', 1);");
-
- hintManager.close();
- }
-}
diff --git a/shardingsphere101/shardingsphere-autocreate-table/README.md b/shardingsphere101/shardingsphere-autocreate-table/README.md
deleted file mode 100644
index b574be63..00000000
--- a/shardingsphere101/shardingsphere-autocreate-table/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-### 本案例对应的文章教程
-
-[分库分表如何管理不同实例中几万张分片表?](http://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247506123&idx=1&sn=50ea1c80fbd145a0407a647cbbb10a10&chksm=9b864836acf1c120b2bdcc84e27266ac3544161bb87d1aec360bacaa830e42f08460bb931a6c&token=755618913&lang=zh_CN#rd)
-
diff --git a/shardingsphere101/shardingsphere-autocreate-table/pom.xml b/shardingsphere101/shardingsphere-autocreate-table/pom.xml
deleted file mode 100644
index 453be44e..00000000
--- a/shardingsphere101/shardingsphere-autocreate-table/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
- 4.0.0
-
- com.shardingsphere101
- shardingsphere101
- 0.0.1-SNAPSHOT
-
- shardingsphere-autocreate-table
- 0.0.1-SNAPSHOT
- shardingsphere-autocreate-table
-
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
-
-
diff --git a/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/AutoCreateTableApplication.java b/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/AutoCreateTableApplication.java
deleted file mode 100644
index 697d89ca..00000000
--- a/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/AutoCreateTableApplication.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.shardingsphere_101;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class AutoCreateTableApplication{
-
- public static void main(String[] args) {
- SpringApplication.run(AutoCreateTableApplication.class, args);
- }
-
-}
diff --git a/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java b/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java
deleted file mode 100644
index 33736b75..00000000
--- a/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java
+++ /dev/null
@@ -1,96 +0,0 @@
-//package com.shardingsphere_101.config;
-//
-//import com.zaxxer.hikari.HikariDataSource;
-//import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-//import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//
-//import javax.sql.DataSource;
-//import java.sql.SQLException;
-//import java.util.*;
-//
-///**
-// * 公众号:程序员小富
-// */
-//@Configuration
-//public class ShardingConfiguration {
-//
-// /**
-// * 配置分片数据源
-// * 公众号:程序员小富
-// */
-// @Bean
-// public DataSource getShardingDataSource() throws SQLException {
-// Map dataSourceMap = new HashMap<>();
-// dataSourceMap.put("db0", dataSource0());
-// dataSourceMap.put("db1", dataSource1());
-//
-// // 分片rules规则配置
-// ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
-//
-// // 分片算法
-// shardingRuleConfig.setShardingAlgorithms(getShardingAlgorithms());
-// // 配置 t_order 表分片规则
-// ShardingTableRuleConfiguration orderTableRuleConfig = new ShardingTableRuleConfiguration("t_order", "db${0..1}.t_order_${1..1000}");
-// orderTableRuleConfig.setTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "t_order_table_algorithms"));
-// orderTableRuleConfig.setDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "t_order_database_algorithms"));
-// shardingRuleConfig.getTables().add(orderTableRuleConfig);
-//
-// // 是否在控制台输出解析改造后真实执行的 SQL
-// Properties properties = new Properties();
-// properties.setProperty("sql-show", "true");
-//
-// // 创建 ShardingSphere 数据源
-// return ShardingSphereDataSourceFactory.createDataSource(dataSourceMap, Collections.singleton(shardingRuleConfig), properties);
-// }
-//
-// /**
-// * 配置数据源1
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource0() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置数据源2
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource1() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置分片算法
-// * 公众号:程序员小富
-// */
-// private Map getShardingAlgorithms() {
-// Map shardingAlgorithms = new LinkedHashMap<>();
-//
-// // 自定义分库算法
-// Properties databaseAlgorithms = new Properties();
-// databaseAlgorithms.setProperty("algorithm-expression", "db$->{order_id % 2}");
-// shardingAlgorithms.put("t_order_database_algorithms", new AlgorithmConfiguration("INLINE", databaseAlgorithms));
-//
-// // 自定义分表算法
-// Properties tableAlgorithms = new Properties();
-// tableAlgorithms.setProperty("algorithm-expression", "db$->{order_id % 1000}");
-// shardingAlgorithms.put("t_order_table_algorithms", new AlgorithmConfiguration("INLINE", tableAlgorithms));
-//
-// return shardingAlgorithms;
-// }
-//}
diff --git a/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/dao/OrderMapper.java b/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/dao/OrderMapper.java
deleted file mode 100644
index 968af444..00000000
--- a/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/dao/OrderMapper.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.shardingsphere_101.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.shardingsphere_101.entity.Order;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface OrderMapper extends BaseMapper {
-
-// @Select("SELECT o.orderId, o.orderNumber, oi.itemId, oi.productId, oi.quantity FROM t_order o" +
-// "JOIN t_order_item oi ON o.orderId = oi.orderId")
-// List selectOrderWithItems();
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/entity/Order.java b/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/entity/Order.java
deleted file mode 100644
index d1c0d7e8..00000000
--- a/shardingsphere101/shardingsphere-autocreate-table/src/main/java/com/shardingsphere_101/entity/Order.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.shardingsphere_101.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 订单实体类
- */
-@Data
-@TableName("t_order")
-@NoArgsConstructor
-public class Order implements Serializable {
-
- @TableId(type = IdType.AUTO)
- private Long Id;
- private Long orderId;
- private String orderNumber;
- private Long customerId;
- private Date orderDate;
- private BigDecimal totalAmount;
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-autocreate-table/src/main/resources/application.yml b/shardingsphere101/shardingsphere-autocreate-table/src/main/resources/application.yml
deleted file mode 100644
index 1ce697a9..00000000
--- a/shardingsphere101/shardingsphere-autocreate-table/src/main/resources/application.yml
+++ /dev/null
@@ -1,86 +0,0 @@
-server:
- port: 10202
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db0 , db1
- # 名称与上边 names 保持一致
- db0:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- # 具体规则配置
- rules:
- sharding:
- # 自动分片表规则配置
-# auto-tables:
-# t_order:
-# actual-data-sources: db$->{0..1}
-# sharding-strategy:
-# standard:
-# sharding-column: order_date
-# sharding-algorithm-name: t_order_mod
- # 分片算法定义
- sharding-algorithms:
- # 自定义分片算法名称
- t_order_database_algorithms:
- # 分片算法类型
- type: INLINE
- # 自定义参数
- props:
- algorithm-expression: db$->{order_id % 2}
- t_order_table_algorithms:
- type: INLINE
- props:
- algorithm-expression: t_order_$->{order_id % 1000}
- t_order_mod:
- type: MOD
- props:
- # 指定分片数量
- sharding-count: 2000
- # 分布式序列算法配置
- key-generators:
- t_order_snowflake:
- # 分布式序列算法(雪花算法:SNOWFLAKE; UUID:UUID)(注:UUID没有props配置)
- type: SNOWFLAKE
- # 分布式序列算法属性配置
- props:
- # 工作机器唯一标识
- worker-id: 1
- tables:
- # 逻辑表名称
- t_order:
- # 数据节点:数据库.分片表
- actual-data-nodes: db$->{0..1}.t_order_${1..1000}
- # 分库策略
- database-strategy:
- standard:
- # 分片列名称
- sharding-column: order_id
- # 分片算法名称
- sharding-algorithm-name: t_order_database_algorithms
- # 分表策略
- table-strategy:
- standard:
- # 分片列名称
- sharding-column: order_id
- # 分片算法名称
- sharding-algorithm-name: t_order_table_algorithms
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: t_order_snowflake
-
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-autocreate-table/src/test/java/com/shardingsphere_101/AutoCreateTablesTests.java b/shardingsphere101/shardingsphere-autocreate-table/src/test/java/com/shardingsphere_101/AutoCreateTablesTests.java
deleted file mode 100644
index 479c315a..00000000
--- a/shardingsphere101/shardingsphere-autocreate-table/src/test/java/com/shardingsphere_101/AutoCreateTablesTests.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.shardingsphere_101;
-
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.jdbc.core.JdbcTemplate;
-import javax.annotation.Resource;
-
-/**
- * @author 公众号:程序员小富
- * 自动创建分片表
- * @date 2023/12/31 17:25
- */
-@SpringBootTest
-class AutoCreateTablesTests {
-
- @Resource
- private JdbcTemplate jdbcTemplate;
-
- /**
- * 执行创建逻辑表的SQL,会根据AutoTables的配置自动在对应的数据源内创建分片表
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("创建分片表")
- @Test
- public void autoCreateOrderTableTest() {
-
- jdbcTemplate.execute("CREATE TABLE `t_order` (\n" +
- " `order_id` bigint(20) NOT NULL,\n" +
- " `order_number` varchar(255) NOT NULL,\n" +
- " `customer_id` bigint(20) NOT NULL,\n" +
- " `order_date` date NOT NULL,\n" +
- " `total_amount` decimal(10,2) NOT NULL,\n" +
- " PRIMARY KEY (`order_id`) USING BTREE\n" +
- ");");
- }
-
- /**
- * 删除 t_order 表
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("修改分片表字段长度")
- @Test
- public void autoModifyOrderTableTest() {
-
- jdbcTemplate.execute("ALTER TABLE t_order MODIFY COLUMN order_number varchar(500);");
- }
-
- /**
- * 删除 t_order 表
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("删除分片表")
- @Test
- public void autoDeleteOrderTableTest() {
-
- jdbcTemplate.execute("DROP TABLE `t_order`;");
- }
-}
diff --git a/shardingsphere101/shardingsphere-default-strategy/README.md b/shardingsphere101/shardingsphere-default-strategy/README.md
deleted file mode 100644
index 8b137891..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/README.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/shardingsphere101/shardingsphere-default-strategy/pom.xml b/shardingsphere101/shardingsphere-default-strategy/pom.xml
deleted file mode 100644
index 066295e3..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
- 4.0.0
-
- com.shardingsphere101
- shardingsphere101
- 0.0.1-SNAPSHOT
-
- shardingsphere-default-strategy
- 0.0.1-SNAPSHOT
- shardingsphere-default-strategy
-
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
-
-
diff --git a/shardingsphere101/shardingsphere-default-strategy/sql/CreateTable.sql b/shardingsphere101/shardingsphere-default-strategy/sql/CreateTable.sql
deleted file mode 100644
index 25f08bbe..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/sql/CreateTable.sql
+++ /dev/null
@@ -1,66 +0,0 @@
-CREATE TABLE t_city_dict (
- id BIGINT, -- 城市ID
- city_name VARCHAR(255) NOT NULL, -- 城市名称
- province_name VARCHAR(255) NOT NULL, -- 省份名称
- country_name VARCHAR(255) NOT NULL, -- 国家名称
- population INT, -- 城市人口数量
- area FLOAT, -- 城市面积
- timezone VARCHAR(255), -- 所属时区
- postal_code VARCHAR(10), -- 邮政编码
- created_date datetime DEFAULT CURRENT_TIMESTAMP,
- updated_date datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`)
-) ;
-
-
-CREATE TABLE t_order_0 (
- order_id INT PRIMARY KEY,
- order_number VARCHAR(20),
- customer_id INT,
- order_date DATE,
- total_amount DECIMAL(10, 2)
-);
-
-
-CREATE TABLE t_order_1 (
- order_id INT PRIMARY KEY,
- order_number VARCHAR(20),
- customer_id INT,
- order_date DATE,
- total_amount DECIMAL(10, 2)
-);
-
-CREATE TABLE t_order_2 (
- order_id INT PRIMARY KEY,
- order_number VARCHAR(20),
- customer_id INT,
- order_date DATE,
- total_amount DECIMAL(10, 2)
-);
-
--- 创建 t_order_item 表
-CREATE TABLE t_order_item_0 (
- item_id INT PRIMARY KEY,
- order_id INT,
- product_id INT,
- quantity INT,
- unit_price DECIMAL(8, 2)
-);
-
-CREATE TABLE t_order_item_1 (
- item_id INT PRIMARY KEY,
- order_id INT,
- product_id INT,
- quantity INT,
- unit_price DECIMAL(8, 2)
-);
-
-CREATE TABLE t_order_item_2 (
- item_id INT PRIMARY KEY,
- order_id INT,
- product_id INT,
- quantity INT,
- unit_price DECIMAL(8, 2)
-);
-
-
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/StrategyApplication.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/StrategyApplication.java
deleted file mode 100644
index 2ae7b8b6..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/StrategyApplication.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.shardingsphere_101;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class
-StrategyApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(StrategyApplication.class, args);
- }
-
-}
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java
deleted file mode 100644
index a99e6d0d..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/config/ShardingConfiguration.java
+++ /dev/null
@@ -1,107 +0,0 @@
-//package com.shardingsphere_101.conf;
-//
-//import com.zaxxer.hikari.HikariDataSource;
-//import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-//import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//
-//import javax.sql.DataSource;
-//import java.sql.SQLException;
-//import java.util.*;
-//
-///**
-// * 公众号:程序员小富
-// */
-//@Configuration
-//public class ShardingConfiguration {
-//
-// /**
-// * 配置分片数据源
-// * 公众号:程序员小富
-// */
-// @Bean
-// public DataSource getShardingDataSource() throws SQLException {
-// Map dataSourceMap = new HashMap<>();
-// dataSourceMap.put("db0", dataSource0());
-// dataSourceMap.put("db1", dataSource1());
-//
-// // 分片rules规则配置
-// ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
-//
-// // 默认的分库策略
-// shardingRuleConfig.setDefaultDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "database-inline")); // 默认的分库策略
-// // 默认的分表策略
-// shardingRuleConfig.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "table-inline"));
-// // 默认的主键生成策略
-// shardingRuleConfig.setDefaultShardingColumn("order_id");
-// shardingRuleConfig.setDefaultKeyGenerateStrategy(new KeyGenerateStrategyConfiguration("id", "table-inline"));
-//
-// // 广播表
-// shardingRuleConfig.setBroadcastTables(Collections.singletonList("t_city_dict"));
-//
-// // 分片算法
-// shardingRuleConfig.setShardingAlgorithms(getShardingAlgorithms());
-// // 配置 t_order 表分片规则
-// ShardingTableRuleConfiguration orderTableRuleConfig = new ShardingTableRuleConfiguration("t_order", "db${0..1}.t_order_${0..2}");
-// orderTableRuleConfig.setTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "table-inline"));
-// orderTableRuleConfig.setDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "database-inline"));
-// shardingRuleConfig.getTables().add(orderTableRuleConfig);
-//
-// // 是否在控制台输出解析改造后真实执行的 SQL
-// Properties properties = new Properties();
-// properties.setProperty("sql-show", "true");
-// // 创建 ShardingSphere 数据源
-// return ShardingSphereDataSourceFactory.createDataSource(dataSourceMap, Collections.singleton(shardingRuleConfig), properties);
-// }
-//
-// /**
-// * 配置数据源1
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource0() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/shardingsphere-db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置数据源2
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource1() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/shardingsphere-db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置分片算法
-// * 公众号:程序员小富
-// */
-// private Map getShardingAlgorithms() {
-// Map shardingAlgorithms = new LinkedHashMap<>();
-//
-// // 自定义分库算法
-// Properties databaseAlgorithms = new Properties();
-// databaseAlgorithms.setProperty("algorithm-expression", "db$->{order_id % 2}");
-// shardingAlgorithms.put("database-inline", new AlgorithmConfiguration("INLINE", databaseAlgorithms));
-//
-// // 自定义分表算法
-// Properties tableAlgorithms = new Properties();
-// tableAlgorithms.setProperty("algorithm-expression", "t_order_$->{order_id % 3}");
-// shardingAlgorithms.put("table-inline", new AlgorithmConfiguration("INLINE", tableAlgorithms));
-//
-// return shardingAlgorithms;
-// }
-//}
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/controller/OrderController.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/controller/OrderController.java
deleted file mode 100644
index 2a3500b6..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/controller/OrderController.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.shardingsphere_101.controller;
-
-import com.shardingsphere_101.dao.OrderItemMapper;
-import com.shardingsphere_101.dao.OrderMapper;
-import com.shardingsphere_101.entity.Order;
-import com.shardingsphere_101.entity.OrderItem;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 公众号:程序员小富
- *
- * @author Jiahai
- */
-@RestController
-@RequestMapping("/order")
-public class OrderController {
-
- @Resource
- private OrderMapper orderMapper;
-
- @Resource
- private OrderItemMapper orderItemMapper;
-
- @RequestMapping("/test1")
- public String test1() {
- for (int i = 0; i < 3; i++) {
- Order order = new Order();
- order.setOrderNumber("WIN000" + i);
- order.setCustomerId((long) i);
- order.setOrderDate(new Date());
- order.setTotalAmount(new BigDecimal("0" + i));
- orderMapper.insert(order);
-// OrderItem orderItem = new OrderItem();
-// orderItem.setOrderId(order.getOrderId());
-// orderItem.setProductId(i);
-// orderItem.setQuantity(i);
-// orderItem.setUnitPrice(new BigDecimal("0" + i));
-// orderItemMapper.insert(orderItem);
- }
- return "ok";
- }
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/CityDictMapper.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/CityDictMapper.java
deleted file mode 100644
index e236a502..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/CityDictMapper.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.shardingsphere_101.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.shardingsphere_101.entity.CityDict;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface CityDictMapper extends BaseMapper {
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/OrderItemMapper.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/OrderItemMapper.java
deleted file mode 100644
index 83734d14..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/OrderItemMapper.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.shardingsphere_101.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.shardingsphere_101.entity.OrderItem;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface OrderItemMapper extends BaseMapper {
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/OrderMapper.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/OrderMapper.java
deleted file mode 100644
index 968af444..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/dao/OrderMapper.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.shardingsphere_101.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.shardingsphere_101.entity.Order;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface OrderMapper extends BaseMapper {
-
-// @Select("SELECT o.orderId, o.orderNumber, oi.itemId, oi.productId, oi.quantity FROM t_order o" +
-// "JOIN t_order_item oi ON o.orderId = oi.orderId")
-// List selectOrderWithItems();
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/CityDict.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/CityDict.java
deleted file mode 100644
index 2f03cf51..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/CityDict.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.shardingsphere_101.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-@TableName("t_city_dict")
-@Data
-public class CityDict {
-
- private Long id;
- private String cityName;
- private String provinceName;
- private String countryName;
- private Integer population;
- private Integer area;
-}
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/Order.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/Order.java
deleted file mode 100644
index d1c0d7e8..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/Order.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.shardingsphere_101.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 订单实体类
- */
-@Data
-@TableName("t_order")
-@NoArgsConstructor
-public class Order implements Serializable {
-
- @TableId(type = IdType.AUTO)
- private Long Id;
- private Long orderId;
- private String orderNumber;
- private Long customerId;
- private Date orderDate;
- private BigDecimal totalAmount;
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/OrderItem.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/OrderItem.java
deleted file mode 100644
index 1c600072..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/OrderItem.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.shardingsphere_101.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.math.BigDecimal;
-
-/**
- * 订单实体类
- *
- * @author Jiahai
- */
-@NoArgsConstructor
-@TableName("t_order_item")
-@Data
-public class OrderItem {
- private Long id;
- private Long itemId;
- private Long orderId;
- private int productId;
- private int quantity;
- private BigDecimal unitPrice;
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/User.java b/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/User.java
deleted file mode 100644
index 42ca83f6..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/java/com/shardingsphere_101/entity/User.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.shardingsphere_101.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-@TableName("t_user")
-@Data
-public class User implements Serializable {
-
- private Long id;
-
- private String uName;
-
- private Integer uAge;
-
- private String uAddress;
-
- private Date createTime;
-
- private Date dateTime;
-}
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/main/resources/application.yml b/shardingsphere101/shardingsphere-default-strategy/src/main/resources/application.yml
deleted file mode 100644
index c5c0f6a0..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/main/resources/application.yml
+++ /dev/null
@@ -1,94 +0,0 @@
-server:
- port: 6770
-
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db0 , db1
- db0:
- # 数据库连接池类名称
- type: com.zaxxer.hikari.HikariDataSource
- # 数据库驱动类名
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- # 数据库连接池类名称
- type: com.zaxxer.hikari.HikariDataSource
- # 数据库驱动类名
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
-
- # 规则配置
- rules:
- sharding:
- # 分片算法配置
- sharding-algorithms:
- order-database-inline:
- # 分片算法类型
- type: INLINE
- props:
- algorithm-expression: db$->{order_id % 2}
- order-table-inline:
- type: INLINE
- props:
- algorithm-expression: t_order_$->{order_id % 4}
- mod:
- type: MOD
- props:
- # 指定分片数量
- sharding-count: 8
- order-table-mod:
- type: MOD
- props:
- # 指定分片数量
- sharding-count: 4
- # 分布式序列算法配置
- key-generators:
- snowflake:
- # 分布式序列算法(雪花算法:SNOWFLAKE; UUID:UUID)(注:UUID没有props配置)
- type: SNOWFLAKE
- # 分布式序列算法属性配置
- props:
- # 工作机器唯一标识
- worker-id: 1
- tables:
- # 逻辑表名称
- t_order:
- # 行表达式标识符可以使用 ${...} 或 $->{...},但前者与 Spring 本身的属性文件占位符冲突,因此在 Spring 环境中使用行表达式标识符建议使用 $->{...}
- actual-data-nodes: db$->{0..1}.t_order_$->{0..5}
- # 分库策略
- database-strategy:
- standard:
- # 分片列名称
- sharding-column: order_id
- # 分片算法名称
- sharding-algorithm-name: order-database-inline
- # 分表策略
- table-strategy:
- standard:
- # 分片列名称
- sharding-column: order_id
- # 分片算法名称
- sharding-algorithm-name: order-table-inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: snowflake
-
- # 自动分片表规则配置
-# auto-tables:
-# t_order: # 逻辑表名称
-# actual-data-sources: db$->{0..1}
-# sharding-strategy: # 切分策略
-# standard: # 用于单分片键的标准分片场景
-# sharding-column: order_id # 分片列名称
-# sharding-algorithm-name: mod # 自动分片算法名称
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/AutoCreateTablesTests.java b/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/AutoCreateTablesTests.java
deleted file mode 100644
index 140ecf52..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/AutoCreateTablesTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.shardingsphere_101;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import javax.annotation.Resource;
-
-/**
- * @author 公众号:程序员小富
- * 自动创建分片表
- * @date 2023/12/31 17:25
- */
-@SpringBootTest
-class AutoCreateTablesTests {
-
- @Resource
- private JdbcTemplate jdbcTemplate;
-
- /**
- * 执行创建逻辑表的SQL,会根据AutoTables的配置自动在对应的数据源内创建分片表
- *
- * @author 公众号:程序员小富
- */
- @Test
- public void autoCreateOrderTableTest() {
-
- jdbcTemplate.execute("CREATE TABLE `t_order` (\n" +
- " `order_id` bigint(20) NOT NULL,\n" +
- " `order_number` varchar(255) NOT NULL,\n" +
- " `customer_id` bigint(20) NOT NULL,\n" +
- " `order_date` date NOT NULL,\n" +
- " `total_amount` decimal(10,2) NOT NULL,\n" +
- " `id` bigint(20) NOT NULL AUTO_INCREMENT,\n" +
- " PRIMARY KEY (`id`) USING BTREE\n" +
- ");");
- }
-
- @Test
- public void autoCreateOrderItemTableTest() {
-
- jdbcTemplate.execute("CREATE TABLE t_order_item (\n" +
- " item_id INT PRIMARY KEY,\n" +
- " order_id INT,\n" +
- " product_id INT,\n" +
- " quantity INT,\n" +
- " unit_price DECIMAL(8, 2)\n" +
- ");");
- }
-}
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/MyBindingTablesTests.java b/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/MyBindingTablesTests.java
deleted file mode 100644
index 26e98b3e..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/MyBindingTablesTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.shardingsphere_101;
-
-import com.shardingsphere_101.dao.OrderItemMapper;
-import com.shardingsphere_101.dao.OrderMapper;
-import com.shardingsphere_101.entity.Order;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import javax.annotation.Resource;
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.Random;
-
-/**
- * 绑定表测试
- */
-@SpringBootTest
-class MyBindingTablesTests {
-
- @Resource
- private OrderMapper orderMapper;
-
- @Resource
- private OrderItemMapper orderItemMapper;
-
- public static long getRandomNumber(int i) {
- int digits = 11; // 要生成的位数
- long min = (long) Math.pow(10, digits - 1); // 最小值
- long max = (long) Math.pow(10, digits) - 1; // 最大值
- Random random = new Random();
- long randomNumber = min + ((long) (random.nextDouble() * (max - min)));
- return randomNumber;
- }
-
- @Test
- public void insertOrderAndItemsTest() {
-
- for (int i = 0; i < 6; i++) {
- Order order = new Order();
-
- long orderId = getRandomNumber(11);
-// order.setOrderId(orderId);
- order.setOrderNumber("WIN" + orderId);
- order.setCustomerId((long) i);
- order.setOrderDate(new Date());
- order.setTotalAmount(new BigDecimal("0" + i));
- orderMapper.insert(order);
-
-// OrderItem orderItem = new OrderItem();
-// orderItem.setOrderId(order.getOrderId());
-// orderItem.setProductId(i);
-// orderItem.setQuantity(i);
-// orderItem.setUnitPrice(new BigDecimal("0" + i));
-// orderItemMapper.insert(orderItem);
- }
- }
-}
diff --git a/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/MyBroadcastTableTests.java b/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/MyBroadcastTableTests.java
deleted file mode 100644
index 11239aa9..00000000
--- a/shardingsphere101/shardingsphere-default-strategy/src/test/java/com/shardingsphere_101/MyBroadcastTableTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.shardingsphere_101;
-
-import com.alibaba.fastjson.JSON;
-import com.shardingsphere_101.dao.CityDictMapper;
-import com.shardingsphere_101.entity.CityDict;
-import lombok.extern.slf4j.Slf4j;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import javax.annotation.Resource;
-
-/**
- * 广播表测试
- */
-@Slf4j
-@SpringBootTest
-class MyBroadcastTableTests {
-
- @Resource
- private CityDictMapper cityDictRepository;
-
- /**
- * 广播表测试
- */
- @Test
- void saveCityDict() {
- CityDict cityDict = new CityDict();
- cityDict.setCityName("北京市");
- cityDict.setProvinceName("北京");
- cityDict.setCountryName("中国");
- cityDict.setPopulation(0);
- cityDict.setArea(0);
- cityDictRepository.insert(cityDict);
- }
-
- @Test
- void findCityDict() {
- for (int i = 0; i < 2000; i++) {
- CityDict dict = cityDictRepository.selectById(1L);
- log.info(JSON.toJSONString(dict));
- }
- }
-}
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/README.md b/shardingsphere101/shardingsphere-sequence-algorithm/README.md
deleted file mode 100644
index 82c3bc05..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-### 本案例对应的文章教程
-
-[一口气搞懂分库分表 12 种分片算法,大厂都在用](https://mp.weixin.qq.com/s/HAoCXGoGCbDt9ZaWCu-qIw)
-
-
-
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/pom.xml b/shardingsphere101/shardingsphere-sequence-algorithm/pom.xml
deleted file mode 100644
index 0062a52f..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- 4.0.0
-
- com.shardingsphere101
- shardingsphere101
- 0.0.1-SNAPSHOT
-
- shardingsphere-sequence-algorithm
- 0.0.1-SNAPSHOT
- shardingsphere-sequence-algorithm
-
-
-
- org.apache.shardingsphere
- shardingsphere-jdbc-core
- ${shardingsphere.version}
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
-
-
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/SequenceAlgorithmsApplication.java b/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/SequenceAlgorithmsApplication.java
deleted file mode 100644
index 556db00a..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/SequenceAlgorithmsApplication.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.shardingsphere_101.keyGenerator;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class SequenceAlgorithmsApplication {
-
- public static void main(String[] args) {
-
- SpringApplication.run(SequenceAlgorithmsApplication.class, args);
- }
-}
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/algorithm/SequenceAlgorithms.java b/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/algorithm/SequenceAlgorithms.java
deleted file mode 100644
index 2e00041b..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/algorithm/SequenceAlgorithms.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.shardingsphere_101.keyGenerator.algorithm;
-
-import lombok.Data;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
-
-import java.util.Properties;
-
-/**
- * 自定义分库分表主键算法
- */
-@Data
-@Slf4j
-public class SequenceAlgorithms implements KeyGenerateAlgorithm {
- @Override
- public String getType() {
- // 返回算法类型表示
- return "custom";
- }
-
- @Override
- public Comparable> generateKey() {
- System.out.println(111);
- System.out.println(111);
- System.out.println(111);
-
- return null;
- }
-
- @Override
- public Properties getProps() {
- return null;
- }
-
- @Override
- public void init(Properties properties) {
- }
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/config/ShardingConfiguration.java b/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/config/ShardingConfiguration.java
deleted file mode 100644
index d3367095..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/config/ShardingConfiguration.java
+++ /dev/null
@@ -1,122 +0,0 @@
-//package com.shardingsphere_101.config;
-//
-//import com.zaxxer.hikari.HikariDataSource;
-//import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-//import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
-//import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//
-//import javax.sql.DataSource;
-//import java.sql.SQLException;
-//import java.util.*;
-//
-///**
-// * 公众号:程序员小富
-// */
-//@Configuration
-//public class ShardingConfiguration {
-//
-// /**
-// * 配置分片数据源
-// * 公众号:程序员小富
-// */
-// @Bean
-// public DataSource getShardingDataSource() throws SQLException {
-// Map dataSourceMap = new HashMap<>();
-// dataSourceMap.put("db0", dataSource0());
-// dataSourceMap.put("db1", dataSource1());
-//
-// // 分片rules规则配置
-// ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
-//
-// // 分片算法
-// shardingRuleConfig.setShardingAlgorithms(getShardingAlgorithms());
-// shardingRuleConfig.setKeyGenerators(getKeyGenerators());
-// // 配置 t_order 表分片规则
-// ShardingTableRuleConfiguration orderTableRuleConfig = new ShardingTableRuleConfiguration("t_order", "db${0..1}.t_order_${0..2}");
-// orderTableRuleConfig.setTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "t_order_table_mod"));
-// orderTableRuleConfig.setDatabaseShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "t_order_database_mod"));
-//
-// // 配置分片健策略
-// orderTableRuleConfig.setKeyGenerateStrategy(new KeyGenerateStrategyConfiguration("id", "xiaofu"));
-//
-//
-// shardingRuleConfig.getTables().add(orderTableRuleConfig);
-//
-// // 是否在控制台输出解析改造后真实执行的 SQL
-// Properties properties = new Properties();
-// properties.setProperty("sql-show", "true");
-//
-// // 创建 ShardingSphere 数据源
-// return ShardingSphereDataSourceFactory.createDataSource(dataSourceMap, Collections.singleton(shardingRuleConfig), properties);
-// }
-//
-// /**
-// * 配置数据源1
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource0() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置数据源2
-// * 公众号:程序员小富
-// */
-// public DataSource dataSource1() {
-// HikariDataSource dataSource = new HikariDataSource();
-// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
-// dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true");
-// dataSource.setUsername("root");
-// dataSource.setPassword("123456");
-// return dataSource;
-// }
-//
-// /**
-// * 配置分片算法
-// * 公众号:程序员小富
-// */
-// private Map getShardingAlgorithms() {
-// Map shardingAlgorithms = new LinkedHashMap<>();
-//
-// // 自定义分库算法
-// Properties databaseAlgorithms = new Properties();
-// databaseAlgorithms.setProperty("sharding-count", "2");
-// shardingAlgorithms.put("t_order_database_mod", new AlgorithmConfiguration("MOD", databaseAlgorithms));
-//
-// // 自定义分表算法
-// Properties tableAlgorithms = new Properties();
-// tableAlgorithms.setProperty("sharding-count", "3");
-// shardingAlgorithms.put("t_order_table_mod", new AlgorithmConfiguration("MOD", tableAlgorithms));
-//
-// return shardingAlgorithms;
-// }
-//
-// /**
-// * 配置分片健
-// * 公众号:程序员小富
-// */
-// private Map getKeyGenerators() {
-// Map keyGenerators = new LinkedHashMap<>();
-//
-// Properties uuidProperties = new Properties();
-// keyGenerators.put("uuid", new AlgorithmConfiguration("UUID", uuidProperties));
-//
-// Properties nanoid = new Properties();
-// keyGenerators.put("nanoid", new AlgorithmConfiguration("NANOID", nanoid));
-//
-// Properties xiaofu = new Properties();
-// keyGenerators.put("xiaofu", new AlgorithmConfiguration("xiaofu", xiaofu));
-//
-// return keyGenerators;
-// }
-//}
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/dao/OrderMapper.java b/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/dao/OrderMapper.java
deleted file mode 100644
index 744187ff..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/dao/OrderMapper.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.shardingsphere_101.keyGenerator.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.shardingsphere_101.keyGenerator.entity.OrderPo;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface OrderMapper extends BaseMapper {
-
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/entity/OrderPo.java b/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/entity/OrderPo.java
deleted file mode 100644
index 73d3f399..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/java/com/shardingsphere_101/keyGenerator/entity/OrderPo.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.shardingsphere_101.keyGenerator.entity;
-
-import com.aventrix.jnanoid.jnanoid.NanoIdUtils;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-import org.apache.shardingsphere.sharding.cosid.algorithm.keygen.CosIdSnowflakeKeyGenerateAlgorithm;
-import org.apache.shardingsphere.sharding.nanoid.algorithm.keygen.NanoIdKeyGenerateAlgorithm;
-import org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm;
-
-import java.beans.Transient;
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.UUID;
-import java.util.concurrent.ThreadLocalRandom;
-
-/**
- * 订单实体类
- */
-@Data
-@TableName("t_order")
-public class OrderPo {
- private transient Long Id;
- private Long orderId;
- private Long userId;
- private String orderNumber;
- private Long customerId;
- private Date orderDate;
- private BigDecimal totalAmount;
- private String intervalValue;
-}
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm b/shardingsphere101/shardingsphere-sequence-algorithm/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm
deleted file mode 100644
index a9c8e0b4..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.KeyGenerateAlgorithm
+++ /dev/null
@@ -1,6 +0,0 @@
-com.shardingsphere_101.keyGenerator.algorithm.SequenceAlgorithms
-org.apache.shardingsphere.sharding.algorithm.keygen.SnowflakeKeyGenerateAlgorithm
-org.apache.shardingsphere.sharding.algorithm.keygen.UUIDKeyGenerateAlgorithm
-org.apache.shardingsphere.sharding.nanoid.algorithm.keygen.NanoIdKeyGenerateAlgorithm
-org.apache.shardingsphere.sharding.cosid.algorithm.keygen.CosIdKeyGenerateAlgorithm
-org.apache.shardingsphere.sharding.cosid.algorithm.keygen.CosIdSnowflakeKeyGenerateAlgorithm
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/resources/application.yml b/shardingsphere101/shardingsphere-sequence-algorithm/src/main/resources/application.yml
deleted file mode 100644
index 7144f7b7..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/src/main/resources/application.yml
+++ /dev/null
@@ -1,78 +0,0 @@
-spring:
- shardingsphere:
- # 数据源配置
- datasource:
- # 数据源名称,多数据源以逗号分隔 ,放在第一个的数据源为未配置分片规则表的默认数据源
- names: db0 , db1
- # 名称与上边 names 保持一致
- db0:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db0?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- db1:
- type: com.zaxxer.hikari.HikariDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- jdbc-url: jdbc:mysql://127.0.0.1:3306/db1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- rules:
- sharding:
- # 分片算法定义
- sharding-algorithms:
- t_order_database_mod:
- type: MOD
- props:
- sharding-count: 2 # 指定分片数量
- t_order_table_mod:
- type: MOD
- props:
- sharding-count: 3 # 指定分片数量
- key-generators: # 分布式序列算法配置
- # 雪花ID生成算法
- snowflake-gen:
- type: SNOWFLAKE
- props:
- worker-id: 1 # 工作机器唯一标识
- max-vibration-offset: 2 # 最大抖动上限值,范围[0, 4096)。注:若使用此算法生成值作分片值,建议配置此属性。此算法在不同毫秒内所生成的 key 取模 2^n (2^n一般为分库或分表数) 之后结果总为 0 或 1。为防止上述分片问题,建议将此属性值配置为 (2^n)-1
- max-tolerate-time-difference-milliseconds: 10 # 最大容忍时钟回退时间,单位:毫秒
- # UUID生成算法
- uu-id-gen:
- type: UUID
- # nanoid生成算法
- nanoid-gen:
- type: NANOID
- # COSID生成算法
- cosId-gen:
- type: COSID
- props:
- id-name: __share__
- as-string: false
- # cosId-snowflake生成算法
- cosId-snowflake-gen:
- type: COSID_SNOWFLAKE
- props:
- epoch: 1477929600000
- as-string: false
- # 自定义ID生成策略
- xiaofu-id-gen:
- type: custom
- tables:
- t_order: # 逻辑表名称
- actual-data-nodes: db$->{0..1}.t_order_${0..2} # 数据节点:数据库.分片表
- database-strategy: # 分库策略
- standard:
- sharding-column: order_id
- sharding-algorithm-name: t_order_database_mod
- table-strategy: # 分表策略
- standard:
- sharding-column: order_id
- sharding-algorithm-name: t_order_table_mod
- key-generate-strategy: # 分布式主键生成策略
- column: id
- keyGeneratorName: xiaofu-id-gen
- # 属性配置
- props:
- # 展示修改以后的sql语句
- sql-show: true
\ No newline at end of file
diff --git a/shardingsphere101/shardingsphere-sequence-algorithm/src/test/java/com/shardingsphere_101/keyGenerator/SequenceAlgorithmsTests.java b/shardingsphere101/shardingsphere-sequence-algorithm/src/test/java/com/shardingsphere_101/keyGenerator/SequenceAlgorithmsTests.java
deleted file mode 100644
index d8ae8341..00000000
--- a/shardingsphere101/shardingsphere-sequence-algorithm/src/test/java/com/shardingsphere_101/keyGenerator/SequenceAlgorithmsTests.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.shardingsphere_101.keyGenerator;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.shardingsphere_101.keyGenerator.dao.OrderMapper;
-import com.shardingsphere_101.keyGenerator.entity.OrderPo;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.RandomUtils;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import javax.annotation.Resource;
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 分布式ID测试类
- *
- * @author 公众号:程序员小富
- * @date 2023/12/31 17:25
- */
-@Slf4j
-@DisplayName("分布式ID测试类")
-@SpringBootTest
-class SequenceAlgorithmsTests {
- @Resource
- private JdbcTemplate jdbcTemplate;
-
- @Resource
- private OrderMapper orderMapper;
-
- @DisplayName("测试分布式ID生成算法插入数据")
- @Test
- public void orderComplexCustomAlgorithmTest() {
-
- int randomId = RandomUtils.nextInt();
- OrderPo order = new OrderPo();
- order.setOrderId(20L);
- order.setUserId(100L);
- order.setOrderNumber(String.valueOf(randomId));
- order.setCustomerId((long) randomId);
- order.setOrderDate(new Date());
- order.setTotalAmount(new BigDecimal("0"));
- order.setIntervalValue("2024-03-01 00:00:00");
- orderMapper.insert(order);
- }
-
- /**
- * 查询标准策略
- *
- * @author 公众号:程序员小富
- */
- @DisplayName("自动义分片算法-范围查询")
- @Test
- public void queryTableTest() {
- QueryWrapper queryWrapper = new QueryWrapper()
- .eq("order_id", 20L)
- .eq("id", 20L);
- queryWrapper.orderByAsc("order_id");
- List orderPos = orderMapper.selectList(queryWrapper);
- log.info("查询结果:{}", JSON.toJSONString(orderPos));
- }
-}
diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/.gitignore b/springboot-aop-redis-lua/.gitignore
similarity index 100%
rename from springboot101/MQTT/springboot-mqtt-messagepush/.gitignore
rename to springboot-aop-redis-lua/.gitignore
diff --git a/springboot-aop-redis-lua/HELP.md b/springboot-aop-redis-lua/HELP.md
new file mode 100644
index 00000000..3d634661
--- /dev/null
+++ b/springboot-aop-redis-lua/HELP.md
@@ -0,0 +1,16 @@
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/maven-plugin/)
+* [Spring Web](https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications)
+
+### Guides
+The following guides illustrate how to use some features concretely:
+
+* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
+* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
+* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)
+
diff --git a/springboot-aop-redis-lua/README.md b/springboot-aop-redis-lua/README.md
new file mode 100644
index 00000000..d4cad3e6
--- /dev/null
+++ b/springboot-aop-redis-lua/README.md
@@ -0,0 +1,4 @@
+# springboot-aop-redis-lua
+springboot-aop-redis-lua 实现的分布式限流方案
+
+# 关注公众号【程序员内点事】,获取 2000G 面试题、电子书、架构技术学习资料
diff --git a/springboot-aop-redis-lua/mvnw b/springboot-aop-redis-lua/mvnw
new file mode 100644
index 00000000..a16b5431
--- /dev/null
+++ b/springboot-aop-redis-lua/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/springboot-aop-redis-lua/mvnw.cmd b/springboot-aop-redis-lua/mvnw.cmd
new file mode 100644
index 00000000..c8d43372
--- /dev/null
+++ b/springboot-aop-redis-lua/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/springboot101/redis/springboot-aop-redis-lua/pom.xml b/springboot-aop-redis-lua/pom.xml
similarity index 91%
rename from springboot101/redis/springboot-aop-redis-lua/pom.xml
rename to springboot-aop-redis-lua/pom.xml
index 5718fb79..a5ae4f4c 100644
--- a/springboot101/redis/springboot-aop-redis-lua/pom.xml
+++ b/springboot-aop-redis-lua/pom.xml
@@ -3,8 +3,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.springboot101
- springboot101
+ com.notebook
+ Springboot-Notebook0.0.1-SNAPSHOTspringboot-aop-redis-lua
@@ -25,14 +25,14 @@
com.google.guavaguava
- 32.0.0-jre
+ 29.0-jre
+
org.apache.commonscommons-lang3
-
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/DetectFacesApplication.java" b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/DemoApplication.java
similarity index 60%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/DetectFacesApplication.java"
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/DemoApplication.java
index ab530bee..456f8225 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/DetectFacesApplication.java"
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/DemoApplication.java
@@ -1,13 +1,13 @@
-package com.springboot101;
+package com.xiaofu.limit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
-public class DetectFacesApplication {
+public class DemoApplication {
public static void main(String[] args) {
- SpringApplication.run(DetectFacesApplication.class, args);
+ SpringApplication.run(DemoApplication.class, args);
}
}
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/api/Limit.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/api/Limit.java
similarity index 89%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/api/Limit.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/api/Limit.java
index d6849dbe..55a72ab5 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/api/Limit.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/api/Limit.java
@@ -1,6 +1,6 @@
-package com.springboot101.limit.api;
+package com.xiaofu.limit.api;
-import com.springboot101.limit.enmu.LimitType;
+import com.xiaofu.limit.enmu.LimitType;
import java.lang.annotation.*;
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/LimiterController.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/LimiterController.java
similarity index 88%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/LimiterController.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/LimiterController.java
index c0d1fb6e..dcf8981f 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/LimiterController.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/LimiterController.java
@@ -1,14 +1,14 @@
-package com.springboot101.limit.controller;
+package com.xiaofu.limit.controller;
-import com.springboot101.limit.api.Limit;
-import com.springboot101.limit.enmu.LimitType;
+import com.xiaofu.limit.api.Limit;
+import com.xiaofu.limit.enmu.LimitType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.atomic.AtomicInteger;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@RestController
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/RedisController.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/RedisController.java
similarity index 90%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/RedisController.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/RedisController.java
index 713000bf..8b4cc958 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/RedisController.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/RedisController.java
@@ -1,4 +1,4 @@
-package com.springboot101.limit.controller;
+package com.xiaofu.limit.controller;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
@@ -13,7 +13,7 @@
import java.util.Date;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@Controller
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/TimeController.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/TimeController.java
similarity index 95%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/TimeController.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/TimeController.java
index 1590c21b..1054030e 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/TimeController.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/TimeController.java
@@ -1,4 +1,4 @@
-package com.springboot101.limit.controller;
+package com.xiaofu.limit.controller;
import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
@@ -11,7 +11,7 @@
import java.util.Date;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@Controller
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/LimitType.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/LimitType.java
similarity index 84%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/LimitType.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/LimitType.java
index 63b3883e..2df8cd78 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/LimitType.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/LimitType.java
@@ -1,4 +1,4 @@
-package com.springboot101.limit.enmu;
+package com.xiaofu.limit.enmu;
/**
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/OrderInfo.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/OrderInfo.java
similarity index 89%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/OrderInfo.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/OrderInfo.java
index 11ceaf70..912ae1d5 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/OrderInfo.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/OrderInfo.java
@@ -1,7 +1,7 @@
-package com.springboot101.limit.enmu;
+package com.xiaofu.limit.enmu;
///**
-// * @Author: 公众号:程序员小富
+// * @Author: xiaofu
// * @Description:
// */
//public class OrderInfo {
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/impl/RedisLimiterHelper.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/impl/RedisLimiterHelper.java
similarity index 96%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/impl/RedisLimiterHelper.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/impl/RedisLimiterHelper.java
index bf7d59e3..e61c07a8 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/impl/RedisLimiterHelper.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/impl/RedisLimiterHelper.java
@@ -1,4 +1,4 @@
-package com.springboot101.limit.impl;
+package com.xiaofu.limit.impl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/interceptor/LimitInterceptor.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/interceptor/LimitInterceptor.java
similarity index 94%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/interceptor/LimitInterceptor.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/interceptor/LimitInterceptor.java
index 2f4d8da6..7f41b56a 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/interceptor/LimitInterceptor.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/interceptor/LimitInterceptor.java
@@ -1,14 +1,14 @@
-package com.springboot101.limit.interceptor;
+package com.xiaofu.limit.interceptor;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
import com.google.common.collect.ImmutableList;
-import com.springboot101.limit.api.Limit;
-import com.springboot101.limit.enmu.LimitType;
+import com.xiaofu.limit.api.Limit;
+import com.xiaofu.limit.enmu.LimitType;
import org.apache.commons.lang3.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
@@ -55,7 +55,7 @@ public LimitInterceptor(RedisTemplate limitRedisTemplate)
* @description 切面
* @date 2020/4/8 13:04
*/
- @Around("execution(public * *(..)) && @annotation(com.springboot101.limit.api.Limit)")
+ @Around("execution(public * *(..)) && @annotation(com.xiaofu.limit.api.Limit)")
public Object interceptor(ProceedingJoinPoint pjp) {
MethodSignature signature = (MethodSignature) pjp.getSignature();
Method method = signature.getMethod();
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/interceptor/LocalDateTimeSerializerConfig.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/interceptor/LocalDateTimeSerializerConfig.java
similarity index 91%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/interceptor/LocalDateTimeSerializerConfig.java
rename to springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/interceptor/LocalDateTimeSerializerConfig.java
index a966047e..dae5befe 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/interceptor/LocalDateTimeSerializerConfig.java
+++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/interceptor/LocalDateTimeSerializerConfig.java
@@ -1,4 +1,4 @@
-package com.springboot101.limit.interceptor;
+package com.xiaofu.limit.interceptor;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.springframework.beans.factory.annotation.Value;
@@ -10,7 +10,7 @@
import java.time.format.DateTimeFormatter;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@Configuration
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/resources/application.properties b/springboot-aop-redis-lua/src/main/resources/application.properties
similarity index 100%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/resources/application.properties
rename to springboot-aop-redis-lua/src/main/resources/application.properties
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/resources/templates/index.html b/springboot-aop-redis-lua/src/main/resources/templates/index.html
similarity index 100%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/resources/templates/index.html
rename to springboot-aop-redis-lua/src/main/resources/templates/index.html
diff --git a/springboot-aop-unifiedlog/HELP.md b/springboot-aop-unifiedlog/HELP.md
new file mode 100644
index 00000000..0dff3d5d
--- /dev/null
+++ b/springboot-aop-unifiedlog/HELP.md
@@ -0,0 +1,19 @@
+# Read Me First
+The following was discovered as part of building this project:
+
+* The original package name 'com.xiaofu.springboot-rabbitmq-mqtt' is invalid and this project uses 'com.xiaofu.mqtt' instead.
+
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.2.7.RELEASE/maven-plugin/)
+* [Spring for RabbitMQ](https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/htmlsingle/#boot-features-amqp)
+
+### Guides
+The following guides illustrate how to use some features concretely:
+
+* [Messaging with RabbitMQ](https://spring.io/guides/gs/messaging-rabbitmq/)
+
diff --git a/springboot-aop-unifiedlog/mvnw b/springboot-aop-unifiedlog/mvnw
new file mode 100644
index 00000000..a16b5431
--- /dev/null
+++ b/springboot-aop-unifiedlog/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/springboot-aop-unifiedlog/mvnw.cmd b/springboot-aop-unifiedlog/mvnw.cmd
new file mode 100644
index 00000000..c8d43372
--- /dev/null
+++ b/springboot-aop-unifiedlog/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/pom.xml" b/springboot-aop-unifiedlog/pom.xml
similarity index 90%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/pom.xml"
rename to springboot-aop-unifiedlog/pom.xml
index 4f7ee875..06a07783 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/pom.xml"
+++ b/springboot-aop-unifiedlog/pom.xml
@@ -3,8 +3,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.springboot101
- springboot101
+ com.notebook
+ Springboot-Notebook0.0.1-SNAPSHOTspringboot-aop-unifiedlog
@@ -17,6 +17,7 @@
org.springframework.bootspring-boot-starter-aop
+
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/SpringBootAopUnifiedLogApplication.java" b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/SpringBootAopUnifiedLogApplication.java
similarity index 61%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/SpringBootAopUnifiedLogApplication.java"
rename to springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/SpringBootAopUnifiedLogApplication.java
index b8ff19f1..2304fc8b 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/SpringBootAopUnifiedLogApplication.java"
+++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/SpringBootAopUnifiedLogApplication.java
@@ -1,12 +1,8 @@
-package com.springboot101;
+package com.chengxy.unifiedlog;
import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.ComponentScan;
-@EnableAutoConfiguration
-@ComponentScan
@SpringBootApplication
public class SpringBootAopUnifiedLogApplication {
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/aspect/LogAspect.java" b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/aspect/LogAspect.java
similarity index 93%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/aspect/LogAspect.java"
rename to springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/aspect/LogAspect.java
index 1fcd5d0d..5fbd2d49 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/aspect/LogAspect.java"
+++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/aspect/LogAspect.java
@@ -1,8 +1,8 @@
-package com.springboot101.aspect;
+package com.chengxy.unifiedlog.aspect;
import com.alibaba.fastjson.JSON;
-import com.springboot101.config.PrintlnLog;
+import com.chengxy.unifiedlog.config.PrintlnLog;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
@@ -15,7 +15,7 @@
import java.lang.reflect.Method;
/**
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 日志收集切面
* @date 2020/7/15 10:22
*/
@@ -36,7 +36,7 @@ public void PrintlnLog() {
/**
* @param joinPoint
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 切面方法入参日志打印
* @date 2020/7/15 10:30
*/
@@ -74,7 +74,7 @@ public void doBefore(JoinPoint joinPoint) throws Throwable {
/**
* @param proceedingJoinPoint
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 切面方法返回结果日志打印
* @date 2020/7/15 10:32
*/
@@ -100,7 +100,7 @@ public Object doAround(ProceedingJoinPoint proceedingJoinPoint) throws Throwable
}
/**
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 切面方法执行后执行
* @date 2020/7/15 10:31
*/
@@ -111,7 +111,7 @@ public void doAfter(JoinPoint joinPoint) throws Throwable {
/**
* @param joinPoint
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description @PrintlnLog 注解作用的切面方法详细细信息
* @date 2020/7/15 10:34
*/
@@ -124,7 +124,7 @@ public String getAspectMethodLogDescJP(JoinPoint joinPoint) throws Exception {
/**
* @param proceedingJoinPoint
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description @PrintlnLog 注解作用的切面方法详细细信息
* @date 2020/7/15 10:34
*/
@@ -139,7 +139,7 @@ public String getAspectMethodLogDescPJ(ProceedingJoinPoint proceedingJoinPoint)
* @param targetName
* @param methodName
* @param arguments
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 自定义注解参数
* @date 2020/7/15 11:51
*/
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/config/PrintlnLog.java" b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/config/PrintlnLog.java
similarity index 80%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/config/PrintlnLog.java"
rename to springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/config/PrintlnLog.java
index 5c4efc20..7d90b0e2 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/config/PrintlnLog.java"
+++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/config/PrintlnLog.java
@@ -1,9 +1,9 @@
-package com.springboot101.config;
+package com.chengxy.unifiedlog.config;
import java.lang.annotation.*;
/**
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description
* @date 2020/7/15 10:20
*/
diff --git a/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/controller/OrderController.java b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/controller/OrderController.java
new file mode 100644
index 00000000..63e7f4cb
--- /dev/null
+++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/controller/OrderController.java
@@ -0,0 +1,33 @@
+package com.chengxy.unifiedlog.controller;
+
+
+import com.alibaba.fastjson.JSON;
+import com.chengxy.unifiedlog.config.PrintlnLog;
+import com.chengxy.unifiedlog.entity.OrderVO;
+import com.chengxy.unifiedlog.service.impl.OrderService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RestController
+@RequestMapping
+public class OrderController {
+
+ @Autowired
+ private OrderService orderService;
+
+ @PrintlnLog(description = "订单详情Controller")
+ @RequestMapping("/order")
+ public void getOrder(OrderVO orderVO, String name) {
+
+ log.info("订单详情入参:orderVO={},name={}", JSON.toJSONString(orderVO), name);
+
+ //OrderDTO orderInfo = orderService.getOrderInfo(orderVO);
+
+ log.info("订单详情结果:orderInfo={}", JSON.toJSONString(""));
+
+ //return orderInfo;
+ }
+}
diff --git a/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/entity/OrderDTO.java b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/entity/OrderDTO.java
new file mode 100644
index 00000000..29383a86
--- /dev/null
+++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/entity/OrderDTO.java
@@ -0,0 +1,20 @@
+package com.chengxy.unifiedlog.entity;
+
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author: xiaofu
+ * @Description:
+ */
+@Data
+public class OrderDTO {
+
+ private String OrderNo;
+
+ private Map OrderMap;
+
+ private List OrderList;
+}
diff --git a/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/entity/OrderVO.java b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/entity/OrderVO.java
new file mode 100644
index 00000000..b340abf4
--- /dev/null
+++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/entity/OrderVO.java
@@ -0,0 +1,14 @@
+package com.chengxy.unifiedlog.entity;
+
+import lombok.Data;
+
+/**
+ * @Author: xiaofu
+ * @Description:
+ */
+@Data
+public class OrderVO {
+
+ private String OrderNo;
+
+}
diff --git a/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/service/OrderServiceImpl.java b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/service/OrderServiceImpl.java
new file mode 100644
index 00000000..41edcf42
--- /dev/null
+++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/service/OrderServiceImpl.java
@@ -0,0 +1,28 @@
+package com.chengxy.unifiedlog.service;
+
+import com.chengxy.unifiedlog.entity.OrderDTO;
+import com.chengxy.unifiedlog.entity.OrderVO;
+import com.chengxy.unifiedlog.service.impl.OrderService;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author: xiaofu
+ * @Description:
+ */
+@Component
+public class OrderServiceImpl implements OrderService {
+
+ @Override
+ public OrderDTO getOrderInfo(OrderVO orderVO) {
+ OrderDTO orderDTO = new OrderDTO();
+ orderDTO.setOrderNo("A0000001");
+ Map map = new HashMap<>();
+ map.put("money", 444);
+ map.put("shopId", 1002);
+ orderDTO.setOrderMap(map);
+ return orderDTO;
+ }
+}
diff --git a/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/service/impl/OrderService.java b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/service/impl/OrderService.java
new file mode 100644
index 00000000..d6d057dd
--- /dev/null
+++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/service/impl/OrderService.java
@@ -0,0 +1,14 @@
+package com.chengxy.unifiedlog.service.impl;
+
+import com.chengxy.unifiedlog.entity.OrderDTO;
+import com.chengxy.unifiedlog.entity.OrderVO;
+
+/**
+ * @Author: xiaofu
+ * @Description:
+ */
+public interface OrderService {
+
+ OrderDTO getOrderInfo(OrderVO orderVO);
+
+}
diff --git a/springboot101/.erupt/generator.loaded b/springboot-aop-unifiedlog/src/main/resources/application.yml
similarity index 100%
rename from springboot101/.erupt/generator.loaded
rename to springboot-aop-unifiedlog/src/main/resources/application.yml
diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/.gitignore b/springboot-database-doc/.gitignore
similarity index 100%
rename from springboot101/rabbitmq/springboot-rabbitmq-confirm/.gitignore
rename to springboot-database-doc/.gitignore
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/doc/fire_\346\225\260\346\215\256\345\272\223\346\226\207\346\241\243\347\224\237\346\210\220_0.0.1-SNAPSHOT.doc" "b/springboot-database-doc/doc/fire_\346\225\260\346\215\256\345\272\223\346\226\207\346\241\243\347\224\237\346\210\220_0.0.1-SNAPSHOT.doc"
similarity index 100%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/doc/fire_\346\225\260\346\215\256\345\272\223\346\226\207\346\241\243\347\224\237\346\210\220_0.0.1-SNAPSHOT.doc"
rename to "springboot-database-doc/doc/fire_\346\225\260\346\215\256\345\272\223\346\226\207\346\241\243\347\224\237\346\210\220_0.0.1-SNAPSHOT.doc"
diff --git a/springboot-database-doc/mvnw b/springboot-database-doc/mvnw
new file mode 100644
index 00000000..a16b5431
--- /dev/null
+++ b/springboot-database-doc/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/springboot-database-doc/mvnw.cmd b/springboot-database-doc/mvnw.cmd
new file mode 100644
index 00000000..c8d43372
--- /dev/null
+++ b/springboot-database-doc/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/pom.xml" b/springboot-database-doc/pom.xml
similarity index 87%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/pom.xml"
rename to springboot-database-doc/pom.xml
index 13aa3fe5..a55bdbd1 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/pom.xml"
+++ b/springboot-database-doc/pom.xml
@@ -3,14 +3,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.springboot101
- springboot101
+ com.notebook
+ Springboot-Notebook0.0.1-SNAPSHOT
- ../pom.xmlspringboot-database-doc0.0.1-SNAPSHOTspringboot-database-doc
+ pom
@@ -34,11 +34,9 @@
3.4.5
-
org.springframework.bootspring-boot-starter-test
- test
@@ -62,20 +60,20 @@
- com.mysql
- mysql-connector-j
- 8.0.32
+ mysql
+ mysql-connector-java
+ 8.0.28root
- 123456
+ xinzhifu521com.mysql.cj.jdbc.Driver
- jdbc:mysql://127.0.0.1:3306/ds-0
+ jdbc:mysql://47.93.6.5:3306/fireWORD
diff --git a/springboot-database-doc/src/main/java/com/xiaofu/datasources/SpringbootDatasourcesRollbackApplication.java b/springboot-database-doc/src/main/java/com/xiaofu/datasources/SpringbootDatasourcesRollbackApplication.java
new file mode 100644
index 00000000..c2239a6b
--- /dev/null
+++ b/springboot-database-doc/src/main/java/com/xiaofu/datasources/SpringbootDatasourcesRollbackApplication.java
@@ -0,0 +1,13 @@
+package com.xiaofu.datasources;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class SpringbootDatasourcesRollbackApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SpringbootDatasourcesRollbackApplication.class, args);
+ }
+
+}
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/test/java/com/springboot101/ScrewApplicationTests.java" b/springboot-database-doc/src/main/java/com/xiaofu/doc/ScrewApplicationTests.java
similarity index 95%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/test/java/com/springboot101/ScrewApplicationTests.java"
rename to springboot-database-doc/src/main/java/com/xiaofu/doc/ScrewApplicationTests.java
index 8f630dec..d3691765 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/test/java/com/springboot101/ScrewApplicationTests.java"
+++ b/springboot-database-doc/src/main/java/com/xiaofu/doc/ScrewApplicationTests.java
@@ -1,4 +1,4 @@
-package com.springboot101;
+package com.xiaofu.doc;
import cn.smallbun.screw.core.Configuration;
import cn.smallbun.screw.core.engine.EngineConfig;
@@ -6,25 +6,24 @@
import cn.smallbun.screw.core.engine.EngineTemplateType;
import cn.smallbun.screw.core.execute.DocumentationExecute;
import cn.smallbun.screw.core.process.ProcessConfig;
-import org.junit.jupiter.api.Test;
+import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
-import javax.annotation.Resource;
import javax.sql.DataSource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@SpringBootTest
public class ScrewApplicationTests {
- @Resource
+ @Autowired
ApplicationContext applicationContext;
@Test
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/main/java/com/springboot101/SpringbootDatabaseDocApplication.java" b/springboot-database-doc/src/main/java/com/xiaofu/doc/SpringbootDatabaseDocApplication.java
similarity index 92%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/main/java/com/springboot101/SpringbootDatabaseDocApplication.java"
rename to springboot-database-doc/src/main/java/com/xiaofu/doc/SpringbootDatabaseDocApplication.java
index 2e6fabab..48a3b05e 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/main/java/com/springboot101/SpringbootDatabaseDocApplication.java"
+++ b/springboot-database-doc/src/main/java/com/xiaofu/doc/SpringbootDatabaseDocApplication.java
@@ -1,4 +1,4 @@
-package com.springboot101;
+package com.xiaofu.doc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/springboot-database-doc/src/main/resources/application.properties b/springboot-database-doc/src/main/resources/application.properties
new file mode 100644
index 00000000..4847f215
--- /dev/null
+++ b/springboot-database-doc/src/main/resources/application.properties
@@ -0,0 +1,5 @@
+spring.datasource.url=jdbc:mysql://47.93.6.5:3306/fire?useUnicode=true&characterEncoding=UTF-8&useSSL=false
+spring.datasource.username=root
+spring.datasource.password=xinzhifu521
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+spring.datasource.xa.properties.useInformationSchema=false
\ No newline at end of file
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/.gitignore" b/springboot-delayqueue/.gitignore
similarity index 59%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/.gitignore"
rename to springboot-delayqueue/.gitignore
index 5b548fd4..173454be 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/.gitignore"
+++ b/springboot-delayqueue/.gitignore
@@ -1,6 +1,6 @@
# Created by .ignore support plugin (hsz.mobi)
-### Example order template template
-### Example order template
+### Example user template template
+### Example user template
# IntelliJ project files
.idea
diff --git a/springboot-delayqueue/HELP.md b/springboot-delayqueue/HELP.md
new file mode 100644
index 00000000..00c8d417
--- /dev/null
+++ b/springboot-delayqueue/HELP.md
@@ -0,0 +1,13 @@
+# Read Me First
+The following was discovered as part of building this project:
+
+* The original package name 'com. chengxy.delayqueue' is invalid and this project uses 'com.chengxy.delayqueue' instead.
+
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/maven-plugin/)
+
diff --git a/springboot-delayqueue/mvnw b/springboot-delayqueue/mvnw
new file mode 100644
index 00000000..a16b5431
--- /dev/null
+++ b/springboot-delayqueue/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/springboot-delayqueue/mvnw.cmd b/springboot-delayqueue/mvnw.cmd
new file mode 100644
index 00000000..c8d43372
--- /dev/null
+++ b/springboot-delayqueue/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/pom.xml" b/springboot-delayqueue/pom.xml
similarity index 87%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/pom.xml"
rename to springboot-delayqueue/pom.xml
index 40838998..456a952b 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/pom.xml"
+++ b/springboot-delayqueue/pom.xml
@@ -3,8 +3,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.springboot101
- springboot101
+ com.notebook
+ Springboot-Notebook0.0.1-SNAPSHOTspringboot-delayqueue
@@ -43,10 +43,6 @@
[4.1.42,)
-
- org.springframework.boot
- spring-boot-starter-amqp
-
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/DelayqueueApplication.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/DelayqueueApplication.java
similarity index 90%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/DelayqueueApplication.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/DelayqueueApplication.java
index a27b236b..a9213131 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/DelayqueueApplication.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/DelayqueueApplication.java
@@ -1,4 +1,4 @@
-package com.springboot101;
+package com.chengxy.delayqueue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/KeyTest.java b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/KeyTest.java
new file mode 100644
index 00000000..a96725f9
--- /dev/null
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/KeyTest.java
@@ -0,0 +1,37 @@
+package com.chengxy.delayqueue;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * @Author: xiaofu
+ * @Description:
+ */
+public class KeyTest {
+
+ // .var
+
+ // .notnull
+
+
+ public static void main(String[] args) {
+
+ List strings = new ArrayList<>();
+
+ strings.add("牛比快捷键");
+
+ strings.add("程序员内点事");
+
+ String s = strings.get(0);
+
+ if (s != null) {
+
+ }
+ Optional s1 = Optional.ofNullable(s);
+
+ if (s1.isPresent()) {
+
+ }
+ }
+}
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/controller/RabbitController.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RabbitController.java
similarity index 82%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/controller/RabbitController.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RabbitController.java
index d78cc9fb..3fdb9af4 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/controller/RabbitController.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RabbitController.java
@@ -1,6 +1,6 @@
-package com.springboot101.controller;//package com.xinzf.project.controller;
+package com.chengxy.delayqueue.controller;//package com.xinzf.project.controller;
-import com.springboot101.deadLetterQueue.DeadLetterSendMessage;
+import com.chengxy.delayqueue.deadLetterQueue.DeadLetterSendMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/controller/RedisController.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RedisController.java
similarity index 86%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/controller/RedisController.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RedisController.java
index db4f8b1f..365ca3eb 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/controller/RedisController.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RedisController.java
@@ -1,4 +1,4 @@
-package com.springboot101.controller;//package com.xinzf.project.controller;
+package com.chengxy.delayqueue.controller;//package com.xinzf.project.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterConfig.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterConfig.java
similarity index 93%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterConfig.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterConfig.java
index 9a162860..9d7de456 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterConfig.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterConfig.java
@@ -1,12 +1,13 @@
-package com.springboot101.deadLetterQueue;
+package com.chengxy.delayqueue.deadLetterQueue;
import org.springframework.amqp.core.*;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@Configuration
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterReceiverMessage.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterReceiverMessage.java
similarity index 89%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterReceiverMessage.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterReceiverMessage.java
index 805a7d65..b891b840 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterReceiverMessage.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterReceiverMessage.java
@@ -1,4 +1,4 @@
-package com.springboot101.deadLetterQueue;
+package com.chengxy.delayqueue.deadLetterQueue;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
@@ -9,7 +9,7 @@
import java.util.Date;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@Slf4j
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterSendMessage.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterSendMessage.java
similarity index 90%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterSendMessage.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterSendMessage.java
index 3e98502f..40315bb8 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/DeadLetterSendMessage.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/DeadLetterSendMessage.java
@@ -1,4 +1,4 @@
-package com.springboot101.deadLetterQueue;
+package com.chengxy.delayqueue.deadLetterQueue;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;
@@ -9,7 +9,7 @@
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@Component
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/RabbitConstant.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/RabbitConstant.java
similarity index 87%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/RabbitConstant.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/RabbitConstant.java
index 94103c4c..240a1f90 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/deadLetterQueue/RabbitConstant.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/deadLetterQueue/RabbitConstant.java
@@ -1,7 +1,7 @@
-package com.springboot101.deadLetterQueue;
+package com.chengxy.delayqueue.deadLetterQueue;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
public @interface RabbitConstant {
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/delayQueue/DelayQueueDemo.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/DelayQueueDemo.java
similarity index 94%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/delayQueue/DelayQueueDemo.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/DelayQueueDemo.java
index 518c8e6e..02145755 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/delayQueue/DelayQueueDemo.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/DelayQueueDemo.java
@@ -1,4 +1,4 @@
-package com.springboot101.delayQueue;
+package com.chengxy.delayqueue.delayQueue;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
@@ -6,7 +6,7 @@
import java.util.concurrent.TimeUnit;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
public class DelayQueueDemo {
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/delayQueue/Order.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/Order.java
similarity index 92%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/delayQueue/Order.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/Order.java
index cdbf7744..7e4d7236 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/delayQueue/Order.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/Order.java
@@ -1,4 +1,4 @@
-package com.springboot101.delayQueue;
+package com.chengxy.delayqueue.delayQueue;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -6,7 +6,7 @@
import java.util.concurrent.TimeUnit;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
public class Order implements Delayed {
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/netty/NettyDelayQueue.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/netty/NettyDelayQueue.java
similarity index 94%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/netty/NettyDelayQueue.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/netty/NettyDelayQueue.java
index 1cd0d323..de4b97ee 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/netty/NettyDelayQueue.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/netty/NettyDelayQueue.java
@@ -1,4 +1,4 @@
-package com.springboot101.netty;
+package com.chengxy.delayqueue.netty;
import io.netty.util.HashedWheelTimer;
import io.netty.util.Timeout;
@@ -9,7 +9,7 @@
import java.util.concurrent.TimeUnit;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
public class NettyDelayQueue {
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/quartz/QuartzDemo.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/quartz/QuartzDemo.java
similarity index 81%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/quartz/QuartzDemo.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/quartz/QuartzDemo.java
index b9361c80..a0fa00ba 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/quartz/QuartzDemo.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/quartz/QuartzDemo.java
@@ -1,10 +1,10 @@
-package com.springboot101.quartz;
+package com.chengxy.delayqueue.quartz;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@Component
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/RedisDelayQueue.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/RedisDelayQueue.java
similarity index 98%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/RedisDelayQueue.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/RedisDelayQueue.java
index 83238936..047549e6 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/RedisDelayQueue.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/RedisDelayQueue.java
@@ -10,7 +10,7 @@
//import java.util.Set;
//
///**
-// * @Author: 公众号:程序员小富
+// * @Author: xiaofu
// * @Description:
// */
//public class RedisDelayQueue {
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/rediscallback/RedisKeyExpirationListener.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/rediscallback/RedisKeyExpirationListener.java
similarity index 95%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/rediscallback/RedisKeyExpirationListener.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/rediscallback/RedisKeyExpirationListener.java
index 3d53d5c6..c2842bcd 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/rediscallback/RedisKeyExpirationListener.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/rediscallback/RedisKeyExpirationListener.java
@@ -6,7 +6,7 @@
//import org.springframework.stereotype.Component;
//
///**
-// * @Author: 公众号:程序员小富
+// * @Author: xiaofu
// * @Description:
// */
//@Component
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/rediscallback/RedisListenerConfig.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/rediscallback/RedisListenerConfig.java
similarity index 94%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/rediscallback/RedisListenerConfig.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/rediscallback/RedisListenerConfig.java
index 20169ddb..cd50a1a7 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/redis/rediscallback/RedisListenerConfig.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/redis/rediscallback/RedisListenerConfig.java
@@ -6,7 +6,7 @@
//import org.springframework.data.redis.listener.RedisMessageListenerContainer;
//
///**
-// * @Author: 公众号:程序员小富
+// * @Author: xiaofu
// * @Description:
// */
//@Configuration
diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/scheduledExecutor/ScheduledExecutorServiceDemo.java" b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/scheduledExecutor/ScheduledExecutorServiceDemo.java
similarity index 95%
rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/scheduledExecutor/ScheduledExecutorServiceDemo.java"
rename to springboot-delayqueue/src/main/java/com/chengxy/delayqueue/scheduledExecutor/ScheduledExecutorServiceDemo.java
index 328328dc..1af625b2 100644
--- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/scheduledExecutor/ScheduledExecutorServiceDemo.java"
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/scheduledExecutor/ScheduledExecutorServiceDemo.java
@@ -1,4 +1,4 @@
-package com.springboot101.scheduledExecutor;
+package com.chengxy.delayqueue.scheduledExecutor;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -8,7 +8,7 @@
import java.util.concurrent.TimeUnit;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
public class ScheduledExecutorServiceDemo {
diff --git a/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/zhujie.java b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/zhujie.java
new file mode 100644
index 00000000..cbd0da27
--- /dev/null
+++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/zhujie.java
@@ -0,0 +1,12 @@
+package com.chengxy.delayqueue;
+
+/**
+ * @Author: xiaofu
+ * @Description:
+ */
+
+public class zhujie {
+
+
+
+}
diff --git a/springboot-delayqueue/src/main/resources/application.yml b/springboot-delayqueue/src/main/resources/application.yml
new file mode 100644
index 00000000..51ddac10
--- /dev/null
+++ b/springboot-delayqueue/src/main/resources/application.yml
@@ -0,0 +1,19 @@
+server:
+ port: 8888
+
+spring:
+ rabbitmq:
+ addresses: 127.0.0.1:5672
+ password: guest
+ username: guest
+# redis:
+# database: 0
+# host: 127.0.0.1
+# password: ''
+# pool:
+# max-active: 200
+# max-idle: 10
+# max-wait: -1
+# min-idle: 0
+# port: 6379
+# timeout: 1000
diff --git a/springboot-demo/.idea/.gitignore b/springboot-demo/.idea/.gitignore
deleted file mode 100644
index 26d33521..00000000
--- a/springboot-demo/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/springboot-demo/.idea/compiler.xml b/springboot-demo/.idea/compiler.xml
deleted file mode 100644
index 2f55cb63..00000000
--- a/springboot-demo/.idea/compiler.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/springboot-demo/.idea/encodings.xml b/springboot-demo/.idea/encodings.xml
deleted file mode 100644
index aa00ffab..00000000
--- a/springboot-demo/.idea/encodings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/springboot-demo/.idea/jarRepositories.xml b/springboot-demo/.idea/jarRepositories.xml
deleted file mode 100644
index f0b4cc9c..00000000
--- a/springboot-demo/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/springboot-demo/.idea/misc.xml b/springboot-demo/.idea/misc.xml
deleted file mode 100644
index d5cd6143..00000000
--- a/springboot-demo/.idea/misc.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/springboot-demo/.idea/uiDesigner.xml b/springboot-demo/.idea/uiDesigner.xml
deleted file mode 100644
index 2b63946d..00000000
--- a/springboot-demo/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/springboot-demo/README.md b/springboot-demo/README.md
deleted file mode 100644
index e7631789..00000000
--- a/springboot-demo/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-此项目为 springboot 脚手架
-
-已经整合了 jpa 连接mysql,自动根据JAVA实体属性创建对应的表
-
-起新项目直接复制它即可
diff --git a/springboot-demo/pom.xml b/springboot-demo/pom.xml
deleted file mode 100644
index feaabf13..00000000
--- a/springboot-demo/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- 4.0.0
-
- com.notebook
- Springboot-Notebook
- 0.0.1-SNAPSHOT
-
- springboot-demo
- 0.0.1-SNAPSHOT
- springboot-demo
-
-
-
-
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
- 2.7.6
-
-
-
-
diff --git a/springboot-demo/src/main/java/com/springboot101/BaseApplication.java b/springboot-demo/src/main/java/com/springboot101/BaseApplication.java
deleted file mode 100644
index a3fc7929..00000000
--- a/springboot-demo/src/main/java/com/springboot101/BaseApplication.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.springboot101;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class BaseApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(BaseApplication.class, args);
- }
-
-}
diff --git a/springboot-demo/src/main/java/com/springboot101/controller/TestController.java b/springboot-demo/src/main/java/com/springboot101/controller/TestController.java
deleted file mode 100644
index 43f9f057..00000000
--- a/springboot-demo/src/main/java/com/springboot101/controller/TestController.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.springboot101.controller;
-
-
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class TestController {
-
- @GetMapping("/test")
- public String test() {
-
- return "test";
- }
-}
diff --git a/springboot-demo/src/main/java/com/springboot101/po/User.java b/springboot-demo/src/main/java/com/springboot101/po/User.java
deleted file mode 100644
index c7ef1048..00000000
--- a/springboot-demo/src/main/java/com/springboot101/po/User.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.springboot101.po;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import javax.persistence.*;
-import java.util.Date;
-
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-@Entity
-@Table(name = "t_user")
-public class User {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
-
- private String name;
-
- private Integer age;
-
- private String email;
-
- @Column(name = "create_time")
- private Date createTime;
-
- @Column(name = "update_time")
- private Date updateTime;
-}
-
diff --git a/springboot-demo/src/main/java/com/springboot101/repository/UserRepository.java b/springboot-demo/src/main/java/com/springboot101/repository/UserRepository.java
deleted file mode 100644
index 00ff5559..00000000
--- a/springboot-demo/src/main/java/com/springboot101/repository/UserRepository.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.springboot101.repository;
-
-import com.springboot101.po.User;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-public interface UserRepository extends JpaRepository {
-}
diff --git a/springboot-demo/src/main/java/com/springboot101/service/UserService.java b/springboot-demo/src/main/java/com/springboot101/service/UserService.java
deleted file mode 100644
index 2ed82c81..00000000
--- a/springboot-demo/src/main/java/com/springboot101/service/UserService.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.springboot101.service;
-
-import com.springboot101.po.User;
-import com.springboot101.repository.UserRepository;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-
-@Component
-public class UserService {
-
- @Resource
- private UserRepository userRepository;
-
-
- public void insertUser(User user){
-
- userRepository.save(user);
- }
-}
diff --git a/springboot-demo/src/main/resources/application.yml b/springboot-demo/src/main/resources/application.yml
deleted file mode 100644
index 6de67352..00000000
--- a/springboot-demo/src/main/resources/application.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-server:
- port: 6666
-
-
-spring:
- # 数据库连接信息
- datasource:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://localhost:3306/db_1?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8
- username: root
- password: 123456
-
- jpa:
- hibernate:
- ddl-auto: update
- properties:
- hibernate:
- dialect: org.hibernate.dialect.MySQL5InnoDBDialect
- show-sql: true
diff --git a/springboot-demo/src/main/resources/static/index.html b/springboot-demo/src/main/resources/static/index.html
deleted file mode 100644
index e2d94a21..00000000
--- a/springboot-demo/src/main/resources/static/index.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
hello word!!!
-
this is a html page
-
-
\ No newline at end of file
diff --git a/springboot-demo/src/test/java/com/springboot101/BaseShare.java b/springboot-demo/src/test/java/com/springboot101/BaseShare.java
deleted file mode 100644
index 7792a300..00000000
--- a/springboot-demo/src/test/java/com/springboot101/BaseShare.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.springboot101;
-
-import java.util.Date;
-
-import com.springboot101.po.User;
-import com.springboot101.service.UserService;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import javax.annotation.Resource;
-
-@SpringBootTest
-class BaseShare {
-
- @Resource
- private UserService userService;
-
- @Test
- public void userServiceTest() {
- User user = new User();
- user.setName("公众号:程序员小富");
- user.setAge(0);
- user.setEmail("vx:程序员小富521");
- user.setCreateTime(new Date());
- user.setUpdateTime(new Date());
- userService.insertUser(user);
- }
-}
diff --git a/springboot101/redis/springboot-aop-redis-lua/.gitignore b/springboot-detect-faces/face-web/.gitignore
similarity index 100%
rename from springboot101/redis/springboot-aop-redis-lua/.gitignore
rename to springboot-detect-faces/face-web/.gitignore
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/lib/arcsoft-sdk-face-3.0.0.0.jar" b/springboot-detect-faces/face-web/lib/arcsoft-sdk-face-3.0.0.0.jar
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/lib/arcsoft-sdk-face-3.0.0.0.jar"
rename to springboot-detect-faces/face-web/lib/arcsoft-sdk-face-3.0.0.0.jar
diff --git a/springboot-detect-faces/face-web/mvnw b/springboot-detect-faces/face-web/mvnw
new file mode 100644
index 00000000..a16b5431
--- /dev/null
+++ b/springboot-detect-faces/face-web/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/springboot-detect-faces/face-web/mvnw.cmd b/springboot-detect-faces/face-web/mvnw.cmd
new file mode 100644
index 00000000..c8d43372
--- /dev/null
+++ b/springboot-detect-faces/face-web/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/pom.xml" b/springboot-detect-faces/face-web/pom.xml
similarity index 69%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/pom.xml"
rename to springboot-detect-faces/face-web/pom.xml
index 6258dee7..24ff9d76 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/pom.xml"
+++ b/springboot-detect-faces/face-web/pom.xml
@@ -2,13 +2,13 @@
4.0.0
- com.springboot101
- springboot101
+ com.face
+ springboot-detect-faces0.0.1-SNAPSHOT
- springboot-detect-faces
+ face-web0.0.1-SNAPSHOT
- springboot-detect-faces
+ face-web1.8
@@ -24,40 +24,21 @@
arcsoft-sdk-face3.0.0.0system
- ${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0.jar
+ ${basedir}/lib/arcsoft-sdk-face-3.0.0.0.jar
-
org.springframework.bootspring-boot-starter-data-jpa
-
org.springframework.bootspring-boot-starter-jdbc
-
- cn.hutool
- hutool-all
- 4.6.1
-
- com.squareup.okhttp3
- okhttp
- 3.14.2
-
-
-
- org.apache.commons
- commons-pool2
- 2.6.0
-
-
-
-
- org.springframework.boot
- spring-boot-starter-thymeleaf
+ mysql
+ mysql-connector-java
+ 8.0.28
@@ -75,11 +56,11 @@
org.springframework.bootspring-boot-maven-plugin
-
+ ${spring-boot.version}truetrue
- com.springboot101.DetectFacesApplication
+ com.firebook.FireBookApplicationfalse
diff --git a/springboot-detect-faces/face-web/src/main/java/META-INF/MANIFEST.MF b/springboot-detect-faces/face-web/src/main/java/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..49bce39c
--- /dev/null
+++ b/springboot-detect-faces/face-web/src/main/java/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: com.fire.FireControllerApplication
+
diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/RedisLuaAopApplication.java b/springboot-detect-faces/face-web/src/main/java/com/fire/FireControllerApplication.java
similarity index 59%
rename from springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/RedisLuaAopApplication.java
rename to springboot-detect-faces/face-web/src/main/java/com/fire/FireControllerApplication.java
index d67325da..79840742 100644
--- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/RedisLuaAopApplication.java
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/FireControllerApplication.java
@@ -1,13 +1,13 @@
-package com.springboot101.limit;
+package com.fire;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
-public class RedisLuaAopApplication {
+public class FireControllerApplication {
public static void main(String[] args) {
- SpringApplication.run(RedisLuaAopApplication.class, args);
+ SpringApplication.run(FireControllerApplication.class, args);
}
}
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/base/Resp.java" b/springboot-detect-faces/face-web/src/main/java/com/fire/base/Resp.java
similarity index 89%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/base/Resp.java"
rename to springboot-detect-faces/face-web/src/main/java/com/fire/base/Resp.java
index d44bbe22..b19993db 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/base/Resp.java"
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/base/Resp.java
@@ -1,12 +1,13 @@
-package com.springboot101.base;
+package com.fire.base;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
+import java.util.List;
/**
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description
* @date 2020/7/24 15:36
*/
@@ -45,7 +46,7 @@ public class Resp implements Serializable {
* 2xx表示成功
*
* @return the boolean
- * @author 公众号:程序员小富
+ * @author xiaofu
* @date 2019年02月22日 13时04分11秒
*/
public boolean isOk() {
@@ -58,7 +59,7 @@ public boolean isOk() {
* @param the type parameter
* @param data the data
* @return the ret
- * @author 公众号:程序员小富
+ * @author xiaofu
* @date 2019年02月14日 19时15分30秒
*/
public static Resp ok(D data) {
@@ -74,7 +75,7 @@ public static Resp ok(D data) {
* @param code the code
* @param message the message
* @return the ret
- * @author 公众号:程序员小富
+ * @author xiaofu
* @date 2019年02月14日 19时16分55秒
*/
public static Resp error(Integer code, String message) {
@@ -91,7 +92,7 @@ public static Resp error(Integer code, String message) {
* @param message the message
* @param data the data
* @return the resp
- * @author 公众号:程序员小富
+ * @author xiaofu
* @date 2019年02月28日 21时16分17秒
*/
public static Resp of(Integer code, String message, D data) {
@@ -104,7 +105,7 @@ public static Resp of(Integer code, String message, D data) {
* @param the type parameter
* @param resp the resp
* @return the resp
- * @author 公众号:程序员小富
+ * @author xiaofu
* @date 2019年03月14日 21时09分42秒
*/
public static Resp error(Resp resp) {
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/controller/LoginAPIController.java" b/springboot-detect-faces/face-web/src/main/java/com/fire/controller/LoginAPIController.java
similarity index 84%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/controller/LoginAPIController.java"
rename to springboot-detect-faces/face-web/src/main/java/com/fire/controller/LoginAPIController.java
index 6431eb0e..6379157f 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/controller/LoginAPIController.java"
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/controller/LoginAPIController.java
@@ -1,7 +1,7 @@
-package com.springboot101.controller;
+package com.fire.controller;
-import com.springboot101.base.Resp;
-import com.springboot101.service.FaceEngineService;
+import com.fire.base.Resp;
+import com.fire.service.FaceEngineService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
@@ -10,7 +10,7 @@
import javax.annotation.Resource;
/**
- * @author 公众号:程序员小富
+ * @author xiaofu
* @Description:
* @date 2021/08/19
*/
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/entity/BaseEntity.java" b/springboot-detect-faces/face-web/src/main/java/com/fire/entity/BaseEntity.java
similarity index 93%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/entity/BaseEntity.java"
rename to springboot-detect-faces/face-web/src/main/java/com/fire/entity/BaseEntity.java
index b606b330..2489d871 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/entity/BaseEntity.java"
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/entity/BaseEntity.java
@@ -1,4 +1,4 @@
-package com.springboot101.entity;
+package com.fire.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import jdk.nashorn.internal.ir.annotations.Ignore;
@@ -11,7 +11,7 @@
import java.util.Date;
/**
- * @author 公众号:程序员小富
+ * @author xiaofu
* @Description:
* @date 2021/08/19
*/
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/entity/User.java" b/springboot-detect-faces/face-web/src/main/java/com/fire/entity/User.java
similarity index 94%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/entity/User.java"
rename to springboot-detect-faces/face-web/src/main/java/com/fire/entity/User.java
index 4e3296e3..d338065a 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/entity/User.java"
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/entity/User.java
@@ -1,4 +1,4 @@
-package com.springboot101.entity;
+package com.fire.entity;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -11,7 +11,7 @@
/**
* 用户
*
- * @author 公众号:程序员小富
+ * @author xiaofu
* @Description: 用户
* @date 2021/09/15
*/
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/repository/UserDao.java" b/springboot-detect-faces/face-web/src/main/java/com/fire/repository/UserDao.java
similarity index 67%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/repository/UserDao.java"
rename to springboot-detect-faces/face-web/src/main/java/com/fire/repository/UserDao.java
index 6c2eb536..42e393d3 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/repository/UserDao.java"
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/repository/UserDao.java
@@ -1,11 +1,11 @@
-package com.springboot101.repository;
+package com.fire.repository;
-import com.springboot101.entity.User;
+import com.fire.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
- * @author 公众号:程序员小富
+ * @author xiaofu
* @Description:
* @date 2021/10/29
*/
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/service/FaceEngineService.java" b/springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineService.java
similarity index 51%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/service/FaceEngineService.java"
rename to springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineService.java
index f9a4a037..ae516424 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/service/FaceEngineService.java"
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineService.java
@@ -1,7 +1,7 @@
-package com.springboot101.service;
+package com.fire.service;
-import com.springboot101.entity.User;
+import com.fire.entity.User;
public interface FaceEngineService {
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/service/FaceEngineServiceImpl.java" b/springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineServiceImpl.java
similarity index 97%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/service/FaceEngineServiceImpl.java"
rename to springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineServiceImpl.java
index 24503f12..2049e072 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/service/FaceEngineServiceImpl.java"
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineServiceImpl.java
@@ -1,4 +1,4 @@
-package com.springboot101.service;
+package com.fire.service;
import cn.hutool.core.codec.Base64;
import com.alibaba.fastjson.JSON;
@@ -7,9 +7,9 @@
import com.arcsoft.face.enums.DetectOrient;
import com.arcsoft.face.enums.ErrorInfo;
import com.arcsoft.face.toolkit.ImageInfo;
-import com.springboot101.entity.User;
-import com.springboot101.repository.UserDao;
-import com.springboot101.util.Base64Util;
+import com.fire.entity.User;
+import com.fire.repository.UserDao;
+import com.fire.util.Base64Util;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/util/Base64Util.java" b/springboot-detect-faces/face-web/src/main/java/com/fire/util/Base64Util.java
similarity index 97%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/util/Base64Util.java"
rename to springboot-detect-faces/face-web/src/main/java/com/fire/util/Base64Util.java
index bb1e4cf4..ded6b522 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/util/Base64Util.java"
+++ b/springboot-detect-faces/face-web/src/main/java/com/fire/util/Base64Util.java
@@ -1,6 +1,6 @@
-package com.springboot101.util;
+package com.fire.util;
-import org.springframework.util.StringUtils;
+import org.apache.commons.lang.StringUtils;
/**
* Base64 工具类
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/application.yml" b/springboot-detect-faces/face-web/src/main/resources/application.yml
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/application.yml"
rename to springboot-detect-faces/face-web/src/main/resources/application.yml
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/css/face.css" b/springboot-detect-faces/face-web/src/main/resources/static/css/face.css
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/css/face.css"
rename to springboot-detect-faces/face-web/src/main/resources/static/css/face.css
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/image/gzh.jpg" b/springboot-detect-faces/face-web/src/main/resources/static/image/gzh.jpg
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/image/gzh.jpg"
rename to springboot-detect-faces/face-web/src/main/resources/static/image/gzh.jpg
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/image/login_bg.png" b/springboot-detect-faces/face-web/src/main/resources/static/image/login_bg.png
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/image/login_bg.png"
rename to springboot-detect-faces/face-web/src/main/resources/static/image/login_bg.png
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/dat.gui.min.js" b/springboot-detect-faces/face-web/src/main/resources/static/js/dat.gui.min.js
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/dat.gui.min.js"
rename to springboot-detect-faces/face-web/src/main/resources/static/js/dat.gui.min.js
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/face-min.js" b/springboot-detect-faces/face-web/src/main/resources/static/js/face-min.js
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/face-min.js"
rename to springboot-detect-faces/face-web/src/main/resources/static/js/face-min.js
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/stats.min.js" b/springboot-detect-faces/face-web/src/main/resources/static/js/stats.min.js
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/stats.min.js"
rename to springboot-detect-faces/face-web/src/main/resources/static/js/stats.min.js
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/tracking-min.js" b/springboot-detect-faces/face-web/src/main/resources/static/js/tracking-min.js
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/tracking-min.js"
rename to springboot-detect-faces/face-web/src/main/resources/static/js/tracking-min.js
diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/vue.min.js b/springboot-detect-faces/face-web/src/main/resources/static/js/vue.min.js
similarity index 100%
rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/vue.min.js
rename to springboot-detect-faces/face-web/src/main/resources/static/js/vue.min.js
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/face.html" b/springboot-detect-faces/face-web/src/main/resources/templates/face.html
similarity index 99%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/face.html"
rename to springboot-detect-faces/face-web/src/main/resources/templates/face.html
index be7f8019..07cd8ce7 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/face.html"
+++ b/springboot-detect-faces/face-web/src/main/resources/templates/face.html
@@ -188,7 +188,7 @@
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/index2.html" b/springboot-detect-faces/face-web/src/main/resources/templates/index2.html
similarity index 95%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/index2.html"
rename to springboot-detect-faces/face-web/src/main/resources/templates/index2.html
index 1f3d472c..cbc77c9b 100644
--- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/index2.html"
+++ b/springboot-detect-faces/face-web/src/main/resources/templates/index2.html
@@ -34,7 +34,7 @@
hi 老朋友,欢迎回来~
-
问题咨询欢迎关注公众号:程序员小富
+
问题咨询欢迎关注公众号:程序员内点事
diff --git a/springboot-detect-faces/pom.xml b/springboot-detect-faces/pom.xml
new file mode 100644
index 00000000..269b2dd8
--- /dev/null
+++ b/springboot-detect-faces/pom.xml
@@ -0,0 +1,103 @@
+
+
+
+ Springboot-Notebook
+ com.notebook
+ 0.0.1-SNAPSHOT
+
+ 4.0.0
+ com.face
+ springboot-detect-faces
+ 0.0.1-SNAPSHOT
+ springboot-detect-faces
+ pom
+
+
+ 8
+ 8
+
+
+
+
+ face-web
+
+
+
+
+
+ org.projectlombok
+ lombok
+ 1.16.18
+ provided
+
+
+
+ com.alibaba
+ fastjson
+ 1.2.83
+
+
+ cn.hutool
+ hutool-all
+ 4.6.1
+
+
+ com.google.code.gson
+ gson
+ 2.8.9
+
+
+
+ com.google.guava
+ guava
+ 26.0-jre
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ 3.14.2
+
+
+
+ org.apache.commons
+ commons-pool2
+ 2.6.0
+
+
+
+ commons-lang
+ commons-lang
+ 2.6
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/springboot101/redis/springboot-redisson-lock/.gitignore b/springboot-douyin-watermark/.gitignore
similarity index 100%
rename from springboot101/redis/springboot-redisson-lock/.gitignore
rename to springboot-douyin-watermark/.gitignore
diff --git a/springboot-douyin-watermark/mvnw b/springboot-douyin-watermark/mvnw
new file mode 100644
index 00000000..a16b5431
--- /dev/null
+++ b/springboot-douyin-watermark/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/springboot-douyin-watermark/mvnw.cmd b/springboot-douyin-watermark/mvnw.cmd
new file mode 100644
index 00000000..c8d43372
--- /dev/null
+++ b/springboot-douyin-watermark/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/pom.xml" b/springboot-douyin-watermark/pom.xml
similarity index 61%
rename from "springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/pom.xml"
rename to springboot-douyin-watermark/pom.xml
index 11b0cf65..0e1cc9ec 100644
--- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/pom.xml"
+++ b/springboot-douyin-watermark/pom.xml
@@ -7,11 +7,21 @@
Springboot-Notebook0.0.1-SNAPSHOT
- springboot-jsp
+ springboot-douyin-watermark0.0.1-SNAPSHOT
- springboot-jsp
+ springboot-douyin-watermark
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/SpringbootDouyinWatermarkApplication.java" b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/SpringbootDouyinWatermarkApplication.java
similarity index 92%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/SpringbootDouyinWatermarkApplication.java"
rename to springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/SpringbootDouyinWatermarkApplication.java
index 30cab7f5..5b09eab9 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/SpringbootDouyinWatermarkApplication.java"
+++ b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/SpringbootDouyinWatermarkApplication.java
@@ -1,4 +1,4 @@
-package com.springboot101;
+package com.xiaofu.douyin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/controller/DYController.java" b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/controller/DYController.java
similarity index 84%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/controller/DYController.java"
rename to springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/controller/DYController.java
index 6710942c..287c8385 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/controller/DYController.java"
+++ b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/controller/DYController.java
@@ -1,10 +1,10 @@
-package com.springboot101.controller;
+package com.xiaofu.douyin.controller;
import com.alibaba.fastjson.JSON;
-import com.springboot101.po.ResultDto;
-import com.springboot101.utils.CommonUtils;
-import com.springboot101.service.VideoParseUrlService;
+import com.xiaofu.douyin.po.ResultDto;
+import com.xiaofu.douyin.service.VideoParseUrlService;
+import com.xiaofu.douyin.utils.CommonUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -16,7 +16,7 @@
/**
- * @author 公众号:程序员小富-公众号:程序员小富
+ * @author xiaofu-公众号:程序员内点事
* @description 抖音无水印视频下载
* @date 2020/9/15 18:44
*/
@@ -34,7 +34,7 @@ public String index() {
/**
* @param url
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 解析无水印视频url
* @date 2020/9/15 12:43
*/
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/DYResult.java" b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/DYResult.java
similarity index 99%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/DYResult.java"
rename to springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/DYResult.java
index c3289161..3224a509 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/DYResult.java"
+++ b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/DYResult.java
@@ -1,4 +1,4 @@
-package com.springboot101.po;
+package com.xiaofu.douyin.po;
import java.util.List;
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/HSResult.java" b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/HSResult.java
similarity index 98%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/HSResult.java"
rename to springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/HSResult.java
index 31556771..8079530a 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/HSResult.java"
+++ b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/HSResult.java
@@ -1,7 +1,7 @@
-package com.springboot101.po;
+package com.xiaofu.douyin.po;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
public class HSResult {
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/ResultDto.java" b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/ResultDto.java
similarity index 96%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/ResultDto.java"
rename to springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/ResultDto.java
index ecccde75..f276fba1 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/po/ResultDto.java"
+++ b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/po/ResultDto.java
@@ -1,4 +1,4 @@
-package com.springboot101.po;
+package com.xiaofu.douyin.po;
public class ResultDto {
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/service/VideoParseUrlService.java" b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/service/VideoParseUrlService.java
similarity index 76%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/service/VideoParseUrlService.java"
rename to springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/service/VideoParseUrlService.java
index 1833bdcb..9eca00c4 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/service/VideoParseUrlService.java"
+++ b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/service/VideoParseUrlService.java
@@ -1,7 +1,7 @@
-package com.springboot101.service;
+package com.xiaofu.douyin.service;
-import com.springboot101.po.ResultDto;
+import com.xiaofu.douyin.po.ResultDto;
public interface VideoParseUrlService {
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/service/impl/VideoParseUrlServiceImpl.java" b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/service/impl/VideoParseUrlServiceImpl.java
similarity index 89%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/service/impl/VideoParseUrlServiceImpl.java"
rename to springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/service/impl/VideoParseUrlServiceImpl.java
index ebc27d34..c3651994 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/service/impl/VideoParseUrlServiceImpl.java"
+++ b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/service/impl/VideoParseUrlServiceImpl.java
@@ -1,16 +1,16 @@
-package com.springboot101.service.impl;
+package com.xiaofu.douyin.service.impl;
import com.alibaba.fastjson.JSON;
-import com.springboot101.po.DYResult;
-import com.springboot101.po.HSResult;
-import com.springboot101.po.ResultDto;
-import com.springboot101.utils.CommonUtils;
-import com.springboot101.service.VideoParseUrlService;
+import com.xiaofu.douyin.po.DYResult;
+import com.xiaofu.douyin.po.HSResult;
+import com.xiaofu.douyin.po.ResultDto;
+import com.xiaofu.douyin.service.VideoParseUrlService;
+import com.xiaofu.douyin.utils.CommonUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
/**
- * @Author: 公众号:程序员小富
+ * @Author: xiaofu
* @Description:
*/
@Component
@@ -18,7 +18,7 @@ public class VideoParseUrlServiceImpl implements VideoParseUrlService {
/**
* @param redirectUrl
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 抖音小视频解析
* @date 2020/9/21 16:23
*/
@@ -72,7 +72,7 @@ public ResultDto dyParseUrl(String redirectUrl) throws Exception {
/**
* @param redirectUrl
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 火山小视频解析
* @date 2020/9/21 16:23
*/
@@ -116,7 +116,7 @@ public ResultDto hsParseUrl(String redirectUrl) throws Exception {
/**
* @param redirectUrl
- * @author 公众号:程序员小富
+ * @author xiaofu
* @description 全民小视频解析
* @date 2020/9/21 16:23
*/
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/utils/CommonUtils.java" b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/utils/CommonUtils.java
similarity index 98%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/utils/CommonUtils.java"
rename to springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/utils/CommonUtils.java
index 0be0f6e9..6d757ff9 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/java/com/springboot101/utils/CommonUtils.java"
+++ b/springboot-douyin-watermark/src/main/java/com/xiaofu/douyin/utils/CommonUtils.java
@@ -1,4 +1,4 @@
-package com.springboot101.utils;
+package com.xiaofu.douyin.utils;
import java.io.BufferedReader;
diff --git a/springboot-douyin-watermark/src/main/resources/application.properties b/springboot-douyin-watermark/src/main/resources/application.properties
new file mode 100644
index 00000000..c4e658f9
--- /dev/null
+++ b/springboot-douyin-watermark/src/main/resources/application.properties
@@ -0,0 +1 @@
+server.port=8888
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/code.css" b/springboot-douyin-watermark/src/main/resources/static/css/code.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/code.css"
rename to springboot-douyin-watermark/src/main/resources/static/css/code.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/icon.png" b/springboot-douyin-watermark/src/main/resources/static/css/icon.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/icon.png"
rename to springboot-douyin-watermark/src/main/resources/static/css/icon.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/index.css" b/springboot-douyin-watermark/src/main/resources/static/css/index.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/index.css"
rename to springboot-douyin-watermark/src/main/resources/static/css/index.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/laydate.css" b/springboot-douyin-watermark/src/main/resources/static/css/laydate.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/laydate.css"
rename to springboot-douyin-watermark/src/main/resources/static/css/laydate.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/layer.css" b/springboot-douyin-watermark/src/main/resources/static/css/layer.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/layer.css"
rename to springboot-douyin-watermark/src/main/resources/static/css/layer.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/layui.css" b/springboot-douyin-watermark/src/main/resources/static/css/layui.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/layui.css"
rename to springboot-douyin-watermark/src/main/resources/static/css/layui.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/layui.mobile.css" b/springboot-douyin-watermark/src/main/resources/static/css/layui.mobile.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/layui.mobile.css"
rename to springboot-douyin-watermark/src/main/resources/static/css/layui.mobile.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/loading-0.gif" b/springboot-douyin-watermark/src/main/resources/static/css/loading-0.gif
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/loading-0.gif"
rename to springboot-douyin-watermark/src/main/resources/static/css/loading-0.gif
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/loading-1.gif" b/springboot-douyin-watermark/src/main/resources/static/css/loading-1.gif
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/loading-1.gif"
rename to springboot-douyin-watermark/src/main/resources/static/css/loading-1.gif
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/loading-2.gif" b/springboot-douyin-watermark/src/main/resources/static/css/loading-2.gif
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/loading-2.gif"
rename to springboot-douyin-watermark/src/main/resources/static/css/loading-2.gif
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/push.css" b/springboot-douyin-watermark/src/main/resources/static/css/push.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/css/push.css"
rename to springboot-douyin-watermark/src/main/resources/static/css/push.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.eot" b/springboot-douyin-watermark/src/main/resources/static/font/iconfont.eot
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.eot"
rename to springboot-douyin-watermark/src/main/resources/static/font/iconfont.eot
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.svg" b/springboot-douyin-watermark/src/main/resources/static/font/iconfont.svg
similarity index 99%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.svg"
rename to springboot-douyin-watermark/src/main/resources/static/font/iconfont.svg
index 186754af..999ca1fe 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.svg"
+++ b/springboot-douyin-watermark/src/main/resources/static/font/iconfont.svg
@@ -377,7 +377,7 @@ Created by iconfont
-
+
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.ttf" b/springboot-douyin-watermark/src/main/resources/static/font/iconfont.ttf
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.ttf"
rename to springboot-douyin-watermark/src/main/resources/static/font/iconfont.ttf
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.woff" b/springboot-douyin-watermark/src/main/resources/static/font/iconfont.woff
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.woff"
rename to springboot-douyin-watermark/src/main/resources/static/font/iconfont.woff
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.woff2" b/springboot-douyin-watermark/src/main/resources/static/font/iconfont.woff2
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/font/iconfont.woff2"
rename to springboot-douyin-watermark/src/main/resources/static/font/iconfont.woff2
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/bg1.png" b/springboot-douyin-watermark/src/main/resources/static/img/bg1.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/bg1.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/bg1.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/bg2.png" b/springboot-douyin-watermark/src/main/resources/static/img/bg2.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/bg2.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/bg2.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/bg3.png" b/springboot-douyin-watermark/src/main/resources/static/img/bg3.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/bg3.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/bg3.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/douyin.png" b/springboot-douyin-watermark/src/main/resources/static/img/douyin.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/douyin.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/douyin.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/favicon.ico" b/springboot-douyin-watermark/src/main/resources/static/img/favicon.ico
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/favicon.ico"
rename to springboot-douyin-watermark/src/main/resources/static/img/favicon.ico
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/huoshan.png" b/springboot-douyin-watermark/src/main/resources/static/img/huoshan.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/huoshan.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/huoshan.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/kuaishou.png" b/springboot-douyin-watermark/src/main/resources/static/img/kuaishou.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/kuaishou.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/kuaishou.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/pipixia.png" b/springboot-douyin-watermark/src/main/resources/static/img/pipixia.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/pipixia.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/pipixia.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/qq.png" b/springboot-douyin-watermark/src/main/resources/static/img/qq.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/qq.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/qq.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/quanmin.png" b/springboot-douyin-watermark/src/main/resources/static/img/quanmin.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/quanmin.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/quanmin.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/shuoming.png" b/springboot-douyin-watermark/src/main/resources/static/img/shuoming.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/shuoming.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/shuoming.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/webicon.png" b/springboot-douyin-watermark/src/main/resources/static/img/webicon.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/webicon.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/webicon.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/weishi.png" b/springboot-douyin-watermark/src/main/resources/static/img/weishi.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/weishi.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/weishi.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/wx.png" b/springboot-douyin-watermark/src/main/resources/static/img/wx.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/wx.png"
rename to springboot-douyin-watermark/src/main/resources/static/img/wx.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/\345\205\254\345\217\267.jpg" "b/springboot-douyin-watermark/src/main/resources/static/img/\345\205\254\345\217\267.jpg"
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/img/\345\205\254\345\217\267.jpg"
rename to "springboot-douyin-watermark/src/main/resources/static/img/\345\205\254\345\217\267.jpg"
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/carousel.js" b/springboot-douyin-watermark/src/main/resources/static/js/carousel.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/carousel.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/carousel.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/code.js" b/springboot-douyin-watermark/src/main/resources/static/js/code.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/code.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/code.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/colorpicker.js" b/springboot-douyin-watermark/src/main/resources/static/js/colorpicker.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/colorpicker.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/colorpicker.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/layui.css" b/springboot-douyin-watermark/src/main/resources/static/js/css/layui.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/layui.css"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/layui.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/layui.mobile.css" b/springboot-douyin-watermark/src/main/resources/static/js/css/layui.mobile.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/layui.mobile.css"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/layui.mobile.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/code.css" b/springboot-douyin-watermark/src/main/resources/static/js/css/modules/code.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/code.css"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/modules/code.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/laydate/default/laydate.css" b/springboot-douyin-watermark/src/main/resources/static/js/css/modules/laydate/default/laydate.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/laydate/default/laydate.css"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/modules/laydate/default/laydate.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/icon-ext.png" b/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/icon-ext.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/icon-ext.png"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/icon-ext.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/icon.png" b/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/icon.png
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/icon.png"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/icon.png
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/layer.css" b/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/layer.css
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/layer.css"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/layer.css
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-0.gif" b/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-0.gif
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-0.gif"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-0.gif
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-1.gif" b/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-1.gif
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-1.gif"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-1.gif
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-2.gif" b/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-2.gif
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-2.gif"
rename to springboot-douyin-watermark/src/main/resources/static/js/css/modules/layer/default/loading-2.gif
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/element.js" b/springboot-douyin-watermark/src/main/resources/static/js/element.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/element.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/element.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/flow.js" b/springboot-douyin-watermark/src/main/resources/static/js/flow.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/flow.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/flow.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/form.js" b/springboot-douyin-watermark/src/main/resources/static/js/form.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/form.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/form.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/hm.js" b/springboot-douyin-watermark/src/main/resources/static/js/hm.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/hm.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/hm.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/index.js" b/springboot-douyin-watermark/src/main/resources/static/js/index.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/index.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/index.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/jquery-1.11.0.min.js" b/springboot-douyin-watermark/src/main/resources/static/js/jquery-1.11.0.min.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/jquery-1.11.0.min.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/jquery-1.11.0.min.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/jquery.js" b/springboot-douyin-watermark/src/main/resources/static/js/jquery.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/jquery.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/jquery.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/laydate.js" b/springboot-douyin-watermark/src/main/resources/static/js/laydate.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/laydate.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/laydate.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/layedit.js" b/springboot-douyin-watermark/src/main/resources/static/js/layedit.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/layedit.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/layedit.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/layer.js" b/springboot-douyin-watermark/src/main/resources/static/js/layer.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/layer.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/layer.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/laypage.js" b/springboot-douyin-watermark/src/main/resources/static/js/laypage.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/laypage.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/laypage.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/laytpl.js" b/springboot-douyin-watermark/src/main/resources/static/js/laytpl.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/laytpl.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/laytpl.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/layui.all.js" b/springboot-douyin-watermark/src/main/resources/static/js/layui.all.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/layui.all.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/layui.all.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/layui.js" b/springboot-douyin-watermark/src/main/resources/static/js/layui.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/layui.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/layui.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/mobile.js" b/springboot-douyin-watermark/src/main/resources/static/js/mobile.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/mobile.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/mobile.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/push.js" b/springboot-douyin-watermark/src/main/resources/static/js/push.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/push.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/push.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/rate.js" b/springboot-douyin-watermark/src/main/resources/static/js/rate.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/rate.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/rate.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/slider.js" b/springboot-douyin-watermark/src/main/resources/static/js/slider.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/slider.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/slider.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/table.js" b/springboot-douyin-watermark/src/main/resources/static/js/table.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/table.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/table.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/tool.js" b/springboot-douyin-watermark/src/main/resources/static/js/tool.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/tool.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/tool.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/transfer.js" b/springboot-douyin-watermark/src/main/resources/static/js/transfer.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/transfer.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/transfer.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/tree.js" b/springboot-douyin-watermark/src/main/resources/static/js/tree.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/tree.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/tree.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/upload.js" b/springboot-douyin-watermark/src/main/resources/static/js/upload.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/upload.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/upload.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/util.js" b/springboot-douyin-watermark/src/main/resources/static/js/util.js
similarity index 100%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/util.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/util.js
diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/vue.min.js" b/springboot-douyin-watermark/src/main/resources/static/js/vue.min.js
similarity index 100%
rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/static/js/vue.min.js"
rename to springboot-douyin-watermark/src/main/resources/static/js/vue.min.js
diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/templates/index.html" b/springboot-douyin-watermark/src/main/resources/templates/index.html
similarity index 99%
rename from "springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/templates/index.html"
rename to springboot-douyin-watermark/src/main/resources/templates/index.html
index 7339fa74..aa939a20 100644
--- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/templates/index.html"
+++ b/springboot-douyin-watermark/src/main/resources/templates/index.html
@@ -156,7 +156,7 @@