diff --git a/.gitignore b/.gitignore index 1567da9a..317b41d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ HELP.md target/ !.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ +!**/src/main/** +!**/src/test/** ### STS ### .apt_generated @@ -14,7 +14,7 @@ target/ .sts4-cache ### IntelliJ IDEA ### -.idea +*.idea *.iws *.iml *.ipr @@ -26,15 +26,6 @@ target/ /nbdist/ /.nb-gradle/ build/ -!**/src/main/**/build/ -!**/src/test/**/build/ ### VS Code ### .vscode/ -!/mvnw -!/mvnw.cmd -!/mvnw - -!/mvnw.cmd -shardingsphere101/.idea/** -springboot101/.idea/** diff --git a/README.md b/README.md index dd8cc16b..d47c0c33 100644 --- a/README.md +++ b/README.md @@ -5,23 +5,21 @@ - + -## 说在前边 - - -> 本项目全部案例详细教程,同步在 个人**公众号:程序员小富** , 欢迎关注交流指正,加群学习! +> 本项目全部案例详细教程,同步在 个人公众号:**程序员小富** , 欢迎关注交流指正,加群学习
- +
![](wx/person.png) -[**作者小富,目前就职某大厂,点击一起来了解下**](https://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247500646&idx=1&sn=5a0993997dc1fc609da4eda5ba610681&chksm=9b86539bacf1da8d2bc22b569d27e1b7b85a21a0ec7d5a5f4a6660148a5f40f076e2d42e4885&token=1045698719&lang=zh_CN#rd) +[**作者小富,目前就职京东,点击一起来了解下**](https://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247500646&idx=1&sn=5a0993997dc1fc609da4eda5ba610681&chksm=9b86539bacf1da8d2bc22b569d27e1b7b85a21a0ec7d5a5f4a6660148a5f40f076e2d42e4885&token=1045698719&lang=zh_CN#rd) +--- -## 项目介绍 +### 介绍 **Springboot-Notebook** 一个以 `springboot` 为基础开发框架, 整合 `Redis` 、`Mysql` 、 `Rabbitmq` 、`ES` 、`MongoDB`、`sharding-jdbc @@ -42,84 +40,17 @@ 消息推送 | 7种实时消息推送 更多 | ...... -## 🤝 关于作者 - -大家好,我是本站作者小富~ 从事编程工作十余年,在大厂狗东做过架构相关工作. - -写作分享很多年,将工作中的所遇到的问题、用到技术梳理成文章分享出来和小伙伴们共勉,希望对大家有用! - -目前在持续的更新三个系列的专题《Springboot开发实战100例》、《ShardingSphere5.x分库分表原理与实战》、《面试八股》 - -## 🔥技术群 & 资料 - -如果遇到了问题,可以通过以下方式联系我。也欢迎加入我们的技术交流群,群里都是热心的Javaer,会讨论技术问题,互相帮助,相信能让您获得更多收获。 - -**在我的公众号:程序员小富,内提供了一些资料:** - -- 技术书籍公众号内回复[ **pdf** ] Get。 - -- 面试笔记、springcloud进阶实战PDF,公众号内回复[ **1222** ] Get。 - -- 原创《ShardingSphere5.x分库分表原理与实战》PDF,公众号内回复[ **分库分表** ] Get。 - - -| ![个人公众号](https://img.shields.io/static/v1?label=wechat&message=微信公众号&logo=wechat&color=07C160) | ![个人公众号](https://img.shields.io/static/v1?label=wechat&message=个人微信&logo=wechat&color=07C160) | -| ---------| ------- | -| | | -| 关注公众号:程序员小富 | 接搜微信号:xiaofucode| - - -## 系列专题 - -### 《ShardingSphere5.x分库分表原理与实战》 - -内容同步在小富的个人网站:[xiaofucode.com](https://xiaofucode.com),现有章节已经生成了 **PDF**,欢迎下载! - -获取方式:《ShardingSphere5.x分库分表原理与实战》PDF,**公众号:程序员小富**内回复[ **分库分表** ] Get。 - -
- -
- -系列往期精选: - -- [好好的系统,为什么要分库分表?](https://mp.weixin.qq.com/s/-WFBtHtTMtHoGwIm9bL4Uw) -- [分库分表的 21 条法则,hold 住!](https://mp.weixin.qq.com/s/aRQLKGzFHcX7zQLqa6FIbA) -- [2 种方式快速实现分库分表,轻松拿捏!](https://mp.weixin.qq.com/s/XdlJK170YZEwof6DzZlbZg) -- [分库分表如何管理不同实例中几万张分片表?](https://mp.weixin.qq.com/s/IdJoG-0cCaPJ5s2aAOM3Jw) -- [一口气搞懂分库分表 12 种分片算法,大厂都在用](https://mp.weixin.qq.com/s/HAoCXGoGCbDt9ZaWCu-qIw) -- [DIY 3 种分库分表分片算法,自己写的轮子才吊!](https://mp.weixin.qq.com/s/EADxOtkURwYEit7-ou2bqQ) -- [ 持续更新中...](https://xiaofucode.com) - -### 《Springboot 开发场景 100 例》 - -Springboot101 上百个 Springboot 开发实战案例分享,开发工作拿来即用,省下的时间就是生活。内容同步在小富的个人网站:[xiaofucode.com](https://xiaofucode.com)! - -系列往期精选: - -- [springboot一行代码实现文件上传20个平台](http://www.xiaofucode.com/guide/springboot101/high/一行代码实现文件上传%2020个平台.html) -- [springboot + rabbitmq + MQTT 实现智能家居](http://www.xiaofucode.com/guide/springboot101/high/springboot%20_%20rabbitmq%20做智能家居.html) -- [springboot + redis 分布式限流器](http://www.xiaofucode.com/guide/springboot101/high/springboot%20_%20Redis%20分布式限流器.html) -- [springboot注解实现动态数据源切换](http://www.xiaofucode.com/guide/springboot101/数据库/注解实现动态数据源切换.html) -- [springboot + Knife4j 集成API文档](http://www.xiaofucode.com/guide/springboot101/文档/集成Knife4j.html) -- [springboot + oauth2.0实战](http://www.xiaofucode.com/guide/springboot101/high/OAuth2.0实战.html) -- [springboot + canal实现 mysql+binlog 监控](http://www.xiaofucode.com/guide/springboot101/high/canal%20实现mysql%20binlog监控.html) -- [springboot + jsoup 实现爬虫](http://www.xiaofucode.com/guide/springboot101/high/springboot%20_%20jsoup%20实现爬虫.html) -- [ 更多文章...](https://xiaofucode.com) - ### 面试八股 -内容同步在小富的个人网站:[xiaofucode.com](https://xiaofucode.com)。 - - 《spring cloud alibaba 微服务全家桶》 + - 《面试笔记》 + - 《LeetCode算法笔记》 -**获取方式**:[公众号:**程序员小富** , 回复[ **1222** ]](https://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247500646&idx=1&sn=5a0993997dc1fc609da4eda5ba610681&chksm=9b86539bacf1da8d2bc22b569d27e1b7b85a21a0ec7d5a5f4a6660148a5f40f076e2d42e4885&token=1045698719&lang=zh_CN#rd) -
- -
+**获取方式**:[公众号:**程序员小富** , 回复 **1222**](https://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247500646&idx=1&sn=5a0993997dc1fc609da4eda5ba610681&chksm=9b86539bacf1da8d2bc22b569d27e1b7b85a21a0ec7d5a5f4a6660148a5f40f076e2d42e4885&token=1045698719&lang=zh_CN#rd) + ### 电子书 @@ -127,9 +58,9 @@ Springboot101 上百个 Springboot 开发实战案例分享,开发工作拿来 ![](wx/book.png) -## 优质文章精选 +### 优质文章精选 -### Java 开发技巧 +#### Java 开发技巧 - [3种 Springboot 全局时间格式化方式,别再写重复代码了](https://mp.weixin.qq.com/s/MeDfnL__jdEq7Yi48vg_vA) (`springboot-global-formatting`) - [真是没想到,Springboot + Flowable 开发工作流会这么简单!](https://mp.weixin.qq.com/s/hXS9HirRnhYRMIwd4GVeIQ) (`springboot-work-flowable`) @@ -258,3 +189,16 @@ Springboot101 上百个 Springboot 开发实战案例分享,开发工作拿来 - [看了 100多份简历后,想给找工作的程序员几点建议](https://mp.weixin.qq.com/s/iVBbzaNpC--Tk6c-JfwtUQ) + + + + + + + +> 欢迎关注公众号、或者添加个人微信:xinzhifu521,加群学习 + +
+ + +
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..79f25bed 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 2.7.6 + 2.0.5.RELEASE com.notebook Springboot-Notebook @@ -14,10 +14,23 @@ pom - - springboot101 - - shardingsphere101 + springboot-sharding-jdbc + springboot-work-flowable + springboot-testng-report + 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 @@ -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.boot spring-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.alibaba fastjson - 1.2.83 + 1.2.49 + + + mysql + mysql-connector-java + runtime + + + org.springframework.boot + spring-boot-starter-amqp - - @@ -79,4 +99,5 @@ + diff --git a/shardingsphere101/.gitignore b/shardingsphere101/.gitignore deleted file mode 100644 index e65f4769..00000000 --- a/shardingsphere101/.gitignore +++ /dev/null @@ -1,34 +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/ -!/.idea/ 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/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/.idea/compiler.xml b/springboot-aop-redis-lua/.idea/compiler.xml new file mode 100644 index 00000000..56ccdce3 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/compiler.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/encodings.xml b/springboot-aop-redis-lua/.idea/encodings.xml new file mode 100644 index 00000000..b26911bd --- /dev/null +++ b/springboot-aop-redis-lua/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/kotlinc.xml b/springboot-aop-redis-lua/.idea/kotlinc.xml new file mode 100644 index 00000000..1c24f9a8 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml new file mode 100644 index 00000000..6fec8f43 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml new file mode 100644 index 00000000..9eb8596a --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_alibaba_fastjson_1_2_49.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_alibaba_fastjson_1_2_49.xml new file mode 100644 index 00000000..d4394098 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_alibaba_fastjson_1_2_49.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml new file mode 100644 index 00000000..bc7d7fd8 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_3.xml new file mode 100644 index 00000000..aa94641a --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_3.xml new file mode 100644 index 00000000..e94ceb75 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_3.xml new file mode 100644 index 00000000..656ffa49 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_10_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_10_3.xml new file mode 100644 index 00000000..7261701c --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_10_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_10_3.xml new file mode 100644 index 00000000..5124c4ce --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_10_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_10_3.xml new file mode 100644 index 00000000..31b440cc --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_google_guava_guava_21_0.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_google_guava_guava_21_0.xml new file mode 100644 index 00000000..a9234562 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_google_guava_guava_21_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml new file mode 100644 index 00000000..f19f6eb3 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml new file mode 100644 index 00000000..b8581a6f --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__io_lettuce_lettuce_core_5_2_2_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__io_lettuce_lettuce_core_5_2_2_RELEASE.xml new file mode 100644 index 00000000..851d46fb --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__io_lettuce_lettuce_core_5_2_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_buffer_4_1_48_Final.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_buffer_4_1_48_Final.xml new file mode 100644 index 00000000..b5ffa967 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_buffer_4_1_48_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_codec_4_1_48_Final.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_codec_4_1_48_Final.xml new file mode 100644 index 00000000..b21bbc74 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_codec_4_1_48_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_common_4_1_48_Final.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_common_4_1_48_Final.xml new file mode 100644 index 00000000..6d70c4aa --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_common_4_1_48_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_handler_4_1_48_Final.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_handler_4_1_48_Final.xml new file mode 100644 index 00000000..a5c9956b --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_handler_4_1_48_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_resolver_4_1_48_Final.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_resolver_4_1_48_Final.xml new file mode 100644 index 00000000..45ebb99c --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_resolver_4_1_48_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_transport_4_1_48_Final.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_transport_4_1_48_Final.xml new file mode 100644 index 00000000..21802cfc --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__io_netty_netty_transport_4_1_48_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__io_projectreactor_reactor_core_3_3_4_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__io_projectreactor_reactor_core_3_3_4_RELEASE.xml new file mode 100644 index 00000000..eb81c2fb --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__io_projectreactor_reactor_core_3_3_4_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml new file mode 100644 index 00000000..be90656e --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml new file mode 100644 index 00000000..cba9dd24 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml new file mode 100644 index 00000000..e66afb95 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml new file mode 100644 index 00000000..04213f73 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_8.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_8.xml new file mode 100644 index 00000000..73e43180 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_10_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_10_8.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_10_8.xml new file mode 100644 index 00000000..4d6fd9a2 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_10_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml new file mode 100644 index 00000000..b3d38583 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml new file mode 100644 index 00000000..10830235 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_9.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_9.xml new file mode 100644 index 00000000..9050e004 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_12_1.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_12_1.xml new file mode 100644 index 00000000..ad038546 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_12_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_12_1.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_12_1.xml new file mode 100644 index 00000000..b4b1b1b6 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_12_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_33.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_33.xml new file mode 100644 index 00000000..1e88c55a --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_33.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_33.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_33.xml new file mode 100644 index 00000000..16bfd1eb --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_33.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_33.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_33.xml new file mode 100644 index 00000000..e61207b3 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_33.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml new file mode 100644 index 00000000..f854ab00 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_5.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_5.xml new file mode 100644 index 00000000..1a387a4d --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_assertj_assertj_core_3_13_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_assertj_assertj_core_3_13_2.xml new file mode 100644 index 00000000..6222cc89 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_assertj_assertj_core_3_13_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_attoparser_attoparser_2_0_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_attoparser_attoparser_2_0_5_RELEASE.xml new file mode 100644 index 00000000..5bad7db8 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_attoparser_attoparser_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_hamcrest_hamcrest_2_1.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_hamcrest_hamcrest_2_1.xml new file mode 100644 index 00000000..b1702934 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_hamcrest_hamcrest_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_18_Final.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_18_Final.xml new file mode 100644 index 00000000..d035d9cd --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_18_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml new file mode 100644 index 00000000..0b76247c --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_5_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_5_2.xml new file mode 100644 index 00000000..5db07403 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_5_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_5_2.xml new file mode 100644 index 00000000..8fbc8ce2 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_5_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_5_2.xml new file mode 100644 index 00000000..cca5485d --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_5_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_5_2.xml new file mode 100644 index 00000000..e2713d08 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_5_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_5_2.xml new file mode 100644 index 00000000..4192cdcd --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_5_2.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_5_2.xml new file mode 100644 index 00000000..cbbd9b77 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_mockito_mockito_core_3_1_0.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_mockito_mockito_core_3_1_0.xml new file mode 100644 index 00000000..c18526d0 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_mockito_mockito_core_3_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_3_1_0.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_3_1_0.xml new file mode 100644 index 00000000..d4e66431 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_3_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml new file mode 100644 index 00000000..af41e3b6 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml new file mode 100644 index 00000000..fbc1b163 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml new file mode 100644 index 00000000..0bf8cf2b --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml new file mode 100644 index 00000000..f17253bf --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml new file mode 100644 index 00000000..c4c54d6d --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_30.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_30.xml new file mode 100644 index 00000000..27229ce3 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_30.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml new file mode 100644 index 00000000..02b6812c --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_2_6_RELEASE.xml new file mode 100644 index 00000000..35e80377 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_2_6_RELEASE.xml new file mode 100644 index 00000000..5b60c93b --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_2_6_RELEASE.xml new file mode 100644 index 00000000..20e8b4f5 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_2_6_RELEASE.xml new file mode 100644 index 00000000..9c842573 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_2_6_RELEASE.xml new file mode 100644 index 00000000..352caeac --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_2_6_RELEASE.xml new file mode 100644 index 00000000..94147d6c --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_2_6_RELEASE.xml new file mode 100644 index 00000000..cee45df0 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_2_6_RELEASE.xml new file mode 100644 index 00000000..5be67a68 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_thymeleaf_2_1_3_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_thymeleaf_2_1_3_RELEASE.xml new file mode 100644 index 00000000..fa0bbdc9 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_thymeleaf_2_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_2_6_RELEASE.xml new file mode 100644 index 00000000..960a99f2 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_validation_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_validation_2_2_6_RELEASE.xml new file mode 100644 index 00000000..fa682045 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_validation_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_2_6_RELEASE.xml new file mode 100644 index 00000000..3e807b06 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_2_6_RELEASE.xml new file mode 100644 index 00000000..ea379592 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_2_6_RELEASE.xml new file mode 100644 index 00000000..c8fab5d5 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_2_6_RELEASE.xml new file mode 100644 index 00000000..6136f0d4 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_2_6_RELEASE.xml new file mode 100644 index 00000000..f77f1896 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_2_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_2_6_RELEASE.xml new file mode 100644 index 00000000..86ebc51c --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_2_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_aop_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_aop_5_2_5_RELEASE.xml new file mode 100644 index 00000000..13397380 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_aop_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_beans_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_beans_5_2_5_RELEASE.xml new file mode 100644 index 00000000..97d38e86 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_beans_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_context_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_context_5_2_5_RELEASE.xml new file mode 100644 index 00000000..65e18f73 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_context_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_context_support_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_context_support_5_2_5_RELEASE.xml new file mode 100644 index 00000000..18538125 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_context_support_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_core_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_core_5_2_5_RELEASE.xml new file mode 100644 index 00000000..9901cb97 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_core_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_expression_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_expression_5_2_5_RELEASE.xml new file mode 100644 index 00000000..dd19707e --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_expression_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_jcl_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_jcl_5_2_5_RELEASE.xml new file mode 100644 index 00000000..b1ffa91a --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_jcl_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_oxm_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_oxm_5_2_5_RELEASE.xml new file mode 100644 index 00000000..03b17cfc --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_oxm_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_test_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_test_5_2_5_RELEASE.xml new file mode 100644 index 00000000..ad47fa36 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_test_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_tx_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_tx_5_2_5_RELEASE.xml new file mode 100644 index 00000000..97a3dce4 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_tx_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_web_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_web_5_2_5_RELEASE.xml new file mode 100644 index 00000000..36a90f56 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_web_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_webmvc_5_2_5_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_webmvc_5_2_5_RELEASE.xml new file mode 100644 index 00000000..a1ca211e --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_springframework_spring_webmvc_5_2_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_extras_thymeleaf_extras_java8time_3_0_4_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_extras_thymeleaf_extras_java8time_3_0_4_RELEASE.xml new file mode 100644 index 00000000..7b246ae1 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_extras_thymeleaf_extras_java8time_3_0_4_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_thymeleaf_3_0_11_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_thymeleaf_3_0_11_RELEASE.xml new file mode 100644 index 00000000..7b72babd --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_thymeleaf_3_0_11_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_thymeleaf_spring5_3_0_11_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_thymeleaf_spring5_3_0_11_RELEASE.xml new file mode 100644 index 00000000..3370587a --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_thymeleaf_thymeleaf_spring5_3_0_11_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_unbescape_unbescape_1_1_6_RELEASE.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_unbescape_unbescape_1_1_6_RELEASE.xml new file mode 100644 index 00000000..2334aa05 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_unbescape_unbescape_1_1_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_4.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_4.xml new file mode 100644 index 00000000..13230150 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/libraries/Maven__org_yaml_snakeyaml_1_25.xml b/springboot-aop-redis-lua/.idea/libraries/Maven__org_yaml_snakeyaml_1_25.xml new file mode 100644 index 00000000..495fc06f --- /dev/null +++ b/springboot-aop-redis-lua/.idea/libraries/Maven__org_yaml_snakeyaml_1_25.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/misc.xml b/springboot-aop-redis-lua/.idea/misc.xml new file mode 100644 index 00000000..0d36b021 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/misc.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + C:\Users\51536\AppData\Roaming\Subversion + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/modules.xml b/springboot-aop-redis-lua/.idea/modules.xml new file mode 100644 index 00000000..e1f219bb --- /dev/null +++ b/springboot-aop-redis-lua/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/springboot101/.erupt/generator.loaded b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/0/9/0958cb88d1caae4cf85804d2e38b35f2080dc94f similarity index 100% rename from springboot101/.erupt/generator.loaded rename to springboot-aop-redis-lua/.idea/sonarlint/issuestore/0/9/0958cb88d1caae4cf85804d2e38b35f2080dc94f diff --git a/springboot-aop-redis-lua/.idea/sonarlint/issuestore/1/7/173aa01eccf362a2e3cf20ac61d323e14d90ac1b b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/1/7/173aa01eccf362a2e3cf20ac61d323e14d90ac1b new file mode 100644 index 00000000..da70a828 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/1/7/173aa01eccf362a2e3cf20ac61d323e14d90ac1b @@ -0,0 +1,6 @@ + +U squid:S2589Y"7Remove this expression which always evaluates to "true"(ܜ��8�����. +j squid:S00112\"FDefine and throw a dedicated exception instead of using a generic one.(ˬ�������8�����. +e squid:S00112`"FDefine and throw a dedicated exception instead of using a generic one.(Ś��8�����. +e squid:S00112b"FDefine and throw a dedicated exception instead of using a generic one.(����8�����. +^ squid:S1193_"@Replace the usage of the "instanceof" operator by a catch block.(����8�����. \ No newline at end of file diff --git a/springboot101/.erupt/job.loaded b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/1/f/1f1763f358c257ea3515417352b82b0165647ad1 similarity index 100% rename from springboot101/.erupt/job.loaded rename to springboot-aop-redis-lua/.idea/sonarlint/issuestore/1/f/1f1763f358c257ea3515417352b82b0165647ad1 diff --git a/springboot101/.erupt/monitor.loaded b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/2/f/2fefad31ed78f6280413d453d00f5f65feacc872 similarity index 100% rename from springboot101/.erupt/monitor.loaded rename to springboot-aop-redis-lua/.idea/sonarlint/issuestore/2/f/2fefad31ed78f6280413d453d00f5f65feacc872 diff --git a/springboot101/.erupt/upms.loaded b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/4/4/442292b8a7efeabbe4cc176709b833b1792140ec similarity index 100% rename from springboot101/.erupt/upms.loaded rename to springboot-aop-redis-lua/.idea/sonarlint/issuestore/4/4/442292b8a7efeabbe4cc176709b833b1792140ec diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/templates/2.html b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/5/d/5d837c4ed85ecaaf932c506e80ff5d7b9f3d590d similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/templates/2.html rename to springboot-aop-redis-lua/.idea/sonarlint/issuestore/5/d/5d837c4ed85ecaaf932c506e80ff5d7b9f3d590d diff --git "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/README.md" b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/8/d/8de1366047da7f75e71926df440f671ef295d239 similarity index 100% rename from "springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/README.md" rename to springboot-aop-redis-lua/.idea/sonarlint/issuestore/8/d/8de1366047da7f75e71926df440f671ef295d239 diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/README.md" b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/9/5/951560d1fc6f900bd0749d4aa56090db5a6d4556 similarity index 100% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/README.md" rename to springboot-aop-redis-lua/.idea/sonarlint/issuestore/9/5/951560d1fc6f900bd0749d4aa56090db5a6d4556 diff --git a/springboot-aop-redis-lua/.idea/sonarlint/issuestore/d/0/d0a5e924c80d12cd1ba04f69b1a9a7d63f5dbf6c b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/d/0/d0a5e924c80d12cd1ba04f69b1a9a7d63f5dbf6c new file mode 100644 index 00000000..9125c94c --- /dev/null +++ b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/d/0/d0a5e924c80d12cd1ba04f69b1a9a7d63f5dbf6c @@ -0,0 +1,4 @@ + +? squid:S2066'"Make this inner class static(���������8ƌ�ޗ. +[ +squid:S106"9Replace this use of System.out or System.err by a logger.(�ѽ������8�����. \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/sonarlint/issuestore/d/2/d25c923914b627c1633491891311b2088c3e0aeb b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/d/2/d25c923914b627c1633491891311b2088c3e0aeb new file mode 100644 index 00000000..b02fb0b3 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/sonarlint/issuestore/d/2/d25c923914b627c1633491891311b2088c3e0aeb @@ -0,0 +1,9 @@ + +nsquid:CommentedOutCodeLine " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/uiDesigner.xml b/springboot-aop-redis-lua/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/springboot-aop-redis-lua/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/vcs.xml b/springboot-aop-redis-lua/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/springboot-aop-redis-lua/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.idea/workspace.xml b/springboot-aop-redis-lua/.idea/workspace.xml new file mode 100644 index 00000000..b05c50e7 --- /dev/null +++ b/springboot-aop-redis-lua/.idea/workspace.xml @@ -0,0 +1,1372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + limitRedisTemplate + interval + demo + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1586317768852 + + + 1586425805006 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + file://$PROJECT_DIR$/src/main/java/com/xiaofu/limit/interceptor/LimitInterceptor.java + 82 + + + + file://$PROJECT_DIR$/src/main/java/com/xiaofu/limit/controller/TimeController.java + 35 + + + + file://$PROJECT_DIR$/src/main/java/com/xiaofu/limit/interceptor/LimitInterceptor.java + 58 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Spring + + + + + + + + + + + + + + + 1.8 + + + + + + + + demo + + + + + + + + 1.8 + + + + + + + + Maven: ch.qos.logback:logback-classic:1.2.3 + + + + + + + + \ No newline at end of file diff --git a/springboot-aop-redis-lua/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-aop-redis-lua/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..1d45a896 --- /dev/null +++ b/springboot-aop-redis-lua/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-aop-redis-lua/.mvn/wrapper/maven-wrapper.jar b/springboot-aop-redis-lua/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-aop-redis-lua/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-aop-redis-lua/.mvn/wrapper/maven-wrapper.properties b/springboot-aop-redis-lua/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-aop-redis-lua/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 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/springboot-aop-redis-lua/pom.xml b/springboot-aop-redis-lua/pom.xml new file mode 100644 index 00000000..a5ae4f4c --- /dev/null +++ b/springboot-aop-redis-lua/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-aop-redis-lua + 0.0.1-SNAPSHOT + springboot-aop-redis-lua + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter-aop + + + + com.google.guava + guava + 29.0-jre + + + + + org.apache.commons + commons-lang3 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/DemoApplication.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/DemoApplication.java new file mode 100644 index 00000000..456f8225 --- /dev/null +++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/DemoApplication.java @@ -0,0 +1,13 @@ +package com.xiaofu.limit; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class DemoApplication { + + public static void main(String[] 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/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/RedisController.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/RedisController.java new file mode 100644 index 00000000..8b4cc958 --- /dev/null +++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/controller/RedisController.java @@ -0,0 +1,36 @@ +package com.xiaofu.limit.controller; + +import com.alibaba.fastjson.JSON; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.Date; + +/** + * @Author: xiaofu + * @Description: + */ +@Controller +public class RedisController { + + @Autowired + private RedisTemplate redisTemplate; + + @GetMapping("/addKey") + @ResponseBody + public String addkey() { + + for (int i = 0; i < 500000; i++) { + + redisTemplate.opsForValue().set("test_key_" + i, i); + } + return null; + } + +} \ No newline at end of file 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/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/OrderInfo.java b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/OrderInfo.java new file mode 100644 index 00000000..912ae1d5 --- /dev/null +++ b/springboot-aop-redis-lua/src/main/java/com/xiaofu/limit/enmu/OrderInfo.java @@ -0,0 +1,30 @@ +package com.xiaofu.limit.enmu; + +///** +// * @Author: xiaofu +// * @Description: +// */ +//public class OrderInfo { +// +// //@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") +// private LocalDateTime createTime; +// +// //@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") +// private Date updateTime; +// +// public LocalDateTime getCreateTime() { +// return createTime; +// } +// +// public void setCreateTime(LocalDateTime createTime) { +// this.createTime = createTime; +// } +// +// public Date getUpdateTime() { +// return updateTime; +// } +// +// public void setUpdateTime(Date updateTime) { +// this.updateTime = updateTime; +// } +//} 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/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-aop-unifiedlog/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..19aa89c8 --- /dev/null +++ b/springboot-aop-unifiedlog/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain OrderService downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains OrderService custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-aop-unifiedlog/.mvn/wrapper/maven-wrapper.jar b/springboot-aop-unifiedlog/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-aop-unifiedlog/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-aop-unifiedlog/.mvn/wrapper/maven-wrapper.properties b/springboot-aop-unifiedlog/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-aop-unifiedlog/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 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/springboot-aop-unifiedlog/pom.xml b/springboot-aop-unifiedlog/pom.xml new file mode 100644 index 00000000..06a07783 --- /dev/null +++ b/springboot-aop-unifiedlog/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-aop-unifiedlog + 0.0.1-SNAPSHOT + springboot-aop-unifiedlog + + + + + org.springframework.boot + spring-boot-starter-aop + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/SpringBootAopUnifiedLogApplication.java b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/SpringBootAopUnifiedLogApplication.java new file mode 100644 index 00000000..2304fc8b --- /dev/null +++ b/springboot-aop-unifiedlog/src/main/java/com/chengxy/unifiedlog/SpringBootAopUnifiedLogApplication.java @@ -0,0 +1,12 @@ +package com.chengxy.unifiedlog; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringBootAopUnifiedLogApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringBootAopUnifiedLogApplication.class, args); + } +} 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/springboot-aop-unifiedlog/src/main/resources/application.yml b/springboot-aop-unifiedlog/src/main/resources/application.yml new file mode 100644 index 00000000..e69de29b 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/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" new file mode 100644 index 00000000..95844907 --- /dev/null +++ "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" @@ -0,0 +1 @@ +fire数据库文档数据库名:fire文档版本:0.0.1-SNAPSHOT文档描述:数据库文档生成fire_user (用户表)编号名称数据类型长度小数位允许空值主键默认值说明1user_idint100NY2user_namevarchar1000YN用户名3face_tokenvarchar5000YN人脸唯一标识4ageint100YNfire数据库文档screwscrew20117100Microsoft Office Word011falsefalse116falsefalse16.00002052-11.1.0.9740 \ No newline at end of file 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/springboot-database-doc/pom.xml b/springboot-database-doc/pom.xml new file mode 100644 index 00000000..ba81e708 --- /dev/null +++ b/springboot-database-doc/pom.xml @@ -0,0 +1,104 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-database-doc + 0.0.1-SNAPSHOT + springboot-database-doc + pom + + + + + org.freemarker + freemarker + 2.3.30 + + + + + cn.smallbun.screw + screw-core + 1.0.3 + + + + + com.zaxxer + HikariCP + 3.4.5 + + + + org.springframework.boot + spring-boot-starter-test + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + cn.smallbun.screw + screw-maven-plugin + 1.0.3 + + + + com.zaxxer + HikariCP + 3.4.5 + + + + mysql + mysql-connector-java + 8.0.20 + + + + + root + + xinzhifu521 + + com.mysql.cj.jdbc.Driver + + jdbc:mysql://47.93.6.5:3306/fire + + WORD + + false + + freemarker + + + + 数据库文档生成 + + ${project.version} + + fire数据库文档 + + + + compile + + run + + + + + + + + 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/springboot-delayqueue/.gitignore b/springboot-delayqueue/.gitignore new file mode 100644 index 00000000..173454be --- /dev/null +++ b/springboot-delayqueue/.gitignore @@ -0,0 +1,9 @@ +# Created by .ignore support plugin (hsz.mobi) +### Example user template template +### Example user template + +# IntelliJ project files +.idea +*.iml +out +gen diff --git a/springboot-delayqueue/.idea/compiler.xml b/springboot-delayqueue/.idea/compiler.xml new file mode 100644 index 00000000..170e1fd8 --- /dev/null +++ b/springboot-delayqueue/.idea/compiler.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/delayqueue1.iml b/springboot-delayqueue/.idea/delayqueue1.iml new file mode 100644 index 00000000..d59beaf0 --- /dev/null +++ b/springboot-delayqueue/.idea/delayqueue1.iml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/encodings.xml b/springboot-delayqueue/.idea/encodings.xml new file mode 100644 index 00000000..b26911bd --- /dev/null +++ b/springboot-delayqueue/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/kotlinc.xml b/springboot-delayqueue/.idea/kotlinc.xml new file mode 100644 index 00000000..1c24f9a8 --- /dev/null +++ b/springboot-delayqueue/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml b/springboot-delayqueue/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml new file mode 100644 index 00000000..6fec8f43 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml b/springboot-delayqueue/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml new file mode 100644 index 00000000..9eb8596a --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__com_alibaba_fastjson_1_2_49.xml b/springboot-delayqueue/.idea/libraries/Maven__com_alibaba_fastjson_1_2_49.xml new file mode 100644 index 00000000..d4394098 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__com_alibaba_fastjson_1_2_49.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml b/springboot-delayqueue/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml new file mode 100644 index 00000000..06441f49 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml b/springboot-delayqueue/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml new file mode 100644 index 00000000..f19f6eb3 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__com_rabbitmq_amqp_client_5_4_1.xml b/springboot-delayqueue/.idea/libraries/Maven__com_rabbitmq_amqp_client_5_4_1.xml new file mode 100644 index 00000000..c14a72ec --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__com_rabbitmq_amqp_client_5_4_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/springboot-delayqueue/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml new file mode 100644 index 00000000..b8581a6f --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__io_netty_netty_all_4_1_36_Final.xml b/springboot-delayqueue/.idea/libraries/Maven__io_netty_netty_all_4_1_36_Final.xml new file mode 100644 index 00000000..f1d5d7c8 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__io_netty_netty_all_4_1_36_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml b/springboot-delayqueue/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml new file mode 100644 index 00000000..e74f3ab2 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__junit_junit_4_12.xml b/springboot-delayqueue/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 00000000..d4110417 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_7_11.xml b/springboot-delayqueue/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_7_11.xml new file mode 100644 index 00000000..ee623f18 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_7_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_7_11.xml b/springboot-delayqueue/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_7_11.xml new file mode 100644 index 00000000..a72c9a38 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_7_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml b/springboot-delayqueue/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml new file mode 100644 index 00000000..b3d38583 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml b/springboot-delayqueue/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml new file mode 100644 index 00000000..10830235 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml b/springboot-delayqueue/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml new file mode 100644 index 00000000..78cfcd37 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_5_0.xml b/springboot-delayqueue/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_5_0.xml new file mode 100644 index 00000000..440e770f --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_10_0.xml b/springboot-delayqueue/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_10_0.xml new file mode 100644 index 00000000..cbe5ca7e --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_10_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_10_0.xml b/springboot-delayqueue/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_10_0.xml new file mode 100644 index 00000000..1407c582 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_10_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_assertj_assertj_core_3_9_1.xml b/springboot-delayqueue/.idea/libraries/Maven__org_assertj_assertj_core_3_9_1.xml new file mode 100644 index 00000000..40adaaa0 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_assertj_assertj_core_3_9_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/springboot-delayqueue/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 00000000..f58bbc11 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/springboot-delayqueue/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml new file mode 100644 index 00000000..78dbe458 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_mockito_mockito_core_2_15_0.xml b/springboot-delayqueue/.idea/libraries/Maven__org_mockito_mockito_core_2_15_0.xml new file mode 100644 index 00000000..a742a6dd --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_mockito_mockito_core_2_15_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/springboot-delayqueue/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml new file mode 100644 index 00000000..af41e3b6 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml b/springboot-delayqueue/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml new file mode 100644 index 00000000..0bf8cf2b --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml b/springboot-delayqueue/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml new file mode 100644 index 00000000..c4c54d6d --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml b/springboot-delayqueue/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml new file mode 100644 index 00000000..6073e533 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml b/springboot-delayqueue/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml new file mode 100644 index 00000000..20e81636 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_amqp_spring_amqp_2_0_6_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_amqp_spring_amqp_2_0_6_RELEASE.xml new file mode 100644 index 00000000..e60dbc53 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_amqp_spring_amqp_2_0_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_amqp_spring_rabbit_2_0_6_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_amqp_spring_rabbit_2_0_6_RELEASE.xml new file mode 100644 index 00000000..b6dc088e --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_amqp_spring_rabbit_2_0_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_0_5_RELEASE.xml new file mode 100644 index 00000000..694ace04 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_0_5_RELEASE.xml new file mode 100644 index 00000000..487c520a --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_0_5_RELEASE.xml new file mode 100644 index 00000000..dc463240 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_amqp_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_amqp_2_0_5_RELEASE.xml new file mode 100644 index 00000000..56b52f8e --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_amqp_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_1_5_7_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_1_5_7_RELEASE.xml new file mode 100644 index 00000000..534f9523 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_1_5_7_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_0_5_RELEASE.xml new file mode 100644 index 00000000..af6c53d3 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_quartz_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_quartz_2_0_5_RELEASE.xml new file mode 100644 index 00000000..746b92a8 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_quartz_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_0_5_RELEASE.xml new file mode 100644 index 00000000..0262995c --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_0_5_RELEASE.xml new file mode 100644 index 00000000..f2c363d0 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_0_5_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_0_5_RELEASE.xml new file mode 100644 index 00000000..4c7f1e34 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_0_5_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_0_10_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_0_10_RELEASE.xml new file mode 100644 index 00000000..a6340190 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_0_10_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_0_10_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_0_10_RELEASE.xml new file mode 100644 index 00000000..f277e854 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_0_10_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_0_10_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_0_10_RELEASE.xml new file mode 100644 index 00000000..9646d844 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_0_10_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_retry_spring_retry_1_2_2_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_retry_spring_retry_1_2_2_RELEASE.xml new file mode 100644 index 00000000..1b2836ba --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_retry_spring_retry_1_2_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_aop_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_aop_5_0_9_RELEASE.xml new file mode 100644 index 00000000..d72ff5a2 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_aop_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_beans_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_beans_5_0_9_RELEASE.xml new file mode 100644 index 00000000..f606e1f0 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_beans_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_context_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_context_5_0_9_RELEASE.xml new file mode 100644 index 00000000..1444af1b --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_context_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_context_support_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_context_support_5_0_9_RELEASE.xml new file mode 100644 index 00000000..5df56644 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_context_support_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_core_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_core_5_0_9_RELEASE.xml new file mode 100644 index 00000000..15a89a5a --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_core_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_expression_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_expression_5_0_9_RELEASE.xml new file mode 100644 index 00000000..b5c312e9 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_expression_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_jcl_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_jcl_5_0_9_RELEASE.xml new file mode 100644 index 00000000..847069e2 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_jcl_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_messaging_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_messaging_5_0_9_RELEASE.xml new file mode 100644 index 00000000..4750da46 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_messaging_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_oxm_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_oxm_5_0_9_RELEASE.xml new file mode 100644 index 00000000..d466a05d --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_oxm_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_test_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_test_5_0_9_RELEASE.xml new file mode 100644 index 00000000..22def702 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_test_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_tx_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_tx_5_0_9_RELEASE.xml new file mode 100644 index 00000000..79735e2d --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_tx_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_web_5_0_9_RELEASE.xml b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_web_5_0_9_RELEASE.xml new file mode 100644 index 00000000..6700b123 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_springframework_spring_web_5_0_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_5_1.xml b/springboot-delayqueue/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_5_1.xml new file mode 100644 index 00000000..474c910c --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_5_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__org_yaml_snakeyaml_1_19.xml b/springboot-delayqueue/.idea/libraries/Maven__org_yaml_snakeyaml_1_19.xml new file mode 100644 index 00000000..33ccf19e --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__org_yaml_snakeyaml_1_19.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml b/springboot-delayqueue/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml new file mode 100644 index 00000000..77144ff4 --- /dev/null +++ b/springboot-delayqueue/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/misc.xml b/springboot-delayqueue/.idea/misc.xml new file mode 100644 index 00000000..23d05a6d --- /dev/null +++ b/springboot-delayqueue/.idea/misc.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/modules.xml b/springboot-delayqueue/.idea/modules.xml new file mode 100644 index 00000000..8b124080 --- /dev/null +++ b/springboot-delayqueue/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/0/6/06f65155ec73600b9fc5c4dc2883d4bb84d8e284 b/springboot-delayqueue/.idea/sonarlint/issuestore/0/6/06f65155ec73600b9fc5c4dc2883d4bb84d8e284 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/0/e/0eedbc21342147864018a65ffb34da0727f4d8b0 b/springboot-delayqueue/.idea/sonarlint/issuestore/0/e/0eedbc21342147864018a65ffb34da0727f4d8b0 new file mode 100644 index 00000000..d53a8630 --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/0/e/0eedbc21342147864018a65ffb34da0727f4d8b0 @@ -0,0 +1,3 @@ + +[ +squid:S106"9Replace this use of System.out or System.err by a logger.(逩������8����. \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/1/e/1e2cec022ccb287cc3cc9f59626c56f7007a0d76 b/springboot-delayqueue/.idea/sonarlint/issuestore/1/e/1e2cec022ccb287cc3cc9f59626c56f7007a0d76 new file mode 100644 index 00000000..13b2fee8 --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/1/e/1e2cec022ccb287cc3cc9f59626c56f7007a0d76 @@ -0,0 +1,14 @@ + +isquid:CommentedOutCodeLine" squid:S1604*"(Make this anonymous inner class a lambda(�� +w squid:S00120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(��������� +D squid:S1481*".Remove this unused "schedule2" local variable.(�� +f squid:S00100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Ԣ�� \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/5/d/5d837c4ed85ecaaf932c506e80ff5d7b9f3d590d b/springboot-delayqueue/.idea/sonarlint/issuestore/5/d/5d837c4ed85ecaaf932c506e80ff5d7b9f3d590d new file mode 100644 index 00000000..e69de29b diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/6/1/61ba2d75f3f04e099148e7a84c6a909f2000ff04 b/springboot-delayqueue/.idea/sonarlint/issuestore/6/1/61ba2d75f3f04e099148e7a84c6a909f2000ff04 new file mode 100644 index 00000000..d4e4b604 --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/6/1/61ba2d75f3f04e099148e7a84c6a909f2000ff04 @@ -0,0 +1,23 @@ + +K squid:S1066M"/Merge this if statement with the enclosing one.(��������� +1 squid:S1220""Move this file to a named package. +c squid:S00112^"FDefine and throw a dedicated exception instead of using a generic one.(������� +? squid:S1148Y"#Use a logger to log this exception.(��ԅ����� +T squid:S1197-"8Move the array designator from the variable to the type.(��������� +T +squid:S106."9Replace this use of System.out or System.err by a logger.(��������� +T +squid:S1060"9Replace this use of System.out or System.err by a logger.(��������� +O +squid:S106>"9Replace this use of System.out or System.err by a logger.(���� +O +squid:S106I"9Replace this use of System.out or System.err by a logger.(���� +O +squid:S106N"9Replace this use of System.out or System.err by a logger.(���� +T +squid:S106R"9Replace this use of System.out or System.err by a logger.(��������� +A squid:S1181W"%Catch Exception instead of Throwable.(��������� +N +squid:S106U"9Replace this use of System.out or System.err by a logger.(���" +T +squid:S106X"9Replace this use of System.out or System.err by a logger.(כ������� \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/6/5/656c5eebf847caf1c820ac51faf490cf1fa849bb b/springboot-delayqueue/.idea/sonarlint/issuestore/6/5/656c5eebf847caf1c820ac51faf490cf1fa849bb new file mode 100644 index 00000000..29088d96 --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/6/5/656c5eebf847caf1c820ac51faf490cf1fa849bb @@ -0,0 +1,15 @@ + +T +squid:S106&"9Replace this use of System.out or System.err by a logger.(�������� +m squid:S3457&"Q%n should be used in place of \n to produce the platform-specific line separator.(�������� +i squid:S00117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(��ۻ +i squid:S00117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(��٫ +T +squid:S106"9Replace this use of System.out or System.err by a logger.(Ѹ������� +w squid:S00120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(��������� +T +squid:S106("9Replace this use of System.out or System.err by a logger.(��������� +O squid:S1854!"8Remove this useless assignment to local variable "task".(�Ϲ� +Z squid:S1155">Use isEmpty() to check whether the collection is empty or not.(�υ������ +@ squid:S1481!")Remove this unused "task" local variable.(�Ϲ� +i squid:S00117"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(�ϼ� \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/8/3/834fd5778cef59dd13c73c0c1e82d757696905f4 b/springboot-delayqueue/.idea/sonarlint/issuestore/8/3/834fd5778cef59dd13c73c0c1e82d757696905f4 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/8/7/8747855872e49550ba11a851f5d46f41b5a93760 b/springboot-delayqueue/.idea/sonarlint/issuestore/8/7/8747855872e49550ba11a851f5d46f41b5a93760 new file mode 100644 index 00000000..93f91329 --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/8/7/8747855872e49550ba11a851f5d46f41b5a93760 @@ -0,0 +1,2 @@ + +f squid:S4488"HReplace "@RequestMapping(method = RequestMethod.GET)" with "@GetMapping"(����8��ݖ�. \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/8/b/8b855d9516d1e1a374c51c691a59524e11dd6529 b/springboot-delayqueue/.idea/sonarlint/issuestore/8/b/8b855d9516d1e1a374c51c691a59524e11dd6529 new file mode 100644 index 00000000..cb1e4f06 --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/8/b/8b855d9516d1e1a374c51c691a59524e11dd6529 @@ -0,0 +1,2 @@ + +r squid:S00120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(���� \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/9/1/91980c651b994a2c6eccf9ca27613136e6d64515 b/springboot-delayqueue/.idea/sonarlint/issuestore/9/1/91980c651b994a2c6eccf9ca27613136e6d64515 new file mode 100644 index 00000000..d342c392 --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/9/1/91980c651b994a2c6eccf9ca27613136e6d64515 @@ -0,0 +1,7 @@ + +[ +squid:S106"9Replace this use of System.out or System.err by a logger.(��������8����. +V +squid:S106'"9Replace this use of System.out or System.err by a logger.(떫�8����. +[ +squid:S106"9Replace this use of System.out or System.err by a logger.(��ͳ�����8����. \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/a/3/a397642f99a64dab853239281e8a13cb16f6e3cb b/springboot-delayqueue/.idea/sonarlint/issuestore/a/3/a397642f99a64dab853239281e8a13cb16f6e3cb new file mode 100644 index 00000000..9da6c04a --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/a/3/a397642f99a64dab853239281e8a13cb16f6e3cb @@ -0,0 +1,3 @@ + +V +squid:S106"9Replace this use of System.out or System.err by a logger.(�х�8����. \ No newline at end of file diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/a/5/a5cc2925ca8258af241be7e5b0381edf30266302 b/springboot-delayqueue/.idea/sonarlint/issuestore/a/5/a5cc2925ca8258af241be7e5b0381edf30266302 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-delayqueue/.idea/sonarlint/issuestore/a/f/afd08067d3eaa308f8e502c87d62d2b0c31265c6 b/springboot-delayqueue/.idea/sonarlint/issuestore/a/f/afd08067d3eaa308f8e502c87d62d2b0c31265c6 new file mode 100644 index 00000000..3e21bbd7 --- /dev/null +++ b/springboot-delayqueue/.idea/sonarlint/issuestore/a/f/afd08067d3eaa308f8e502c87d62d2b0c31265c6 @@ -0,0 +1,5 @@ + +r squid:S00120"ZRename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.(���� +nsquid:CommentedOutCodeLine" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/vcs.xml b/springboot-delayqueue/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/springboot-delayqueue/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.idea/workspace.xml b/springboot-delayqueue/.idea/workspace.xml new file mode 100644 index 00000000..7b4091ee --- /dev/null +++ b/springboot-delayqueue/.idea/workspace.xml @@ -0,0 +1,1262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C:\Users\51536\AppData\Roaming\Subversion + + + + + 1588830272905 + + + 1588830563717 + + + 1588845654311 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-autoconfigure/2.0.5.RELEASE/spring-boot-autoconfigure-2.0.5.RELEASE.jar!/org/springframework/boot/autoconfigure/SpringBootApplication.class + 27 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Spring + + + + + + + + + + + + + + + 1.8 + + + + + + + + delayqueue1 + + + + + + + + 1.8 + + + + + + + + Maven: ch.qos.logback:logback-classic:1.2.3 + + + + + + + + \ No newline at end of file diff --git a/springboot-delayqueue/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-delayqueue/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..1d45a896 --- /dev/null +++ b/springboot-delayqueue/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-delayqueue/.mvn/wrapper/maven-wrapper.jar b/springboot-delayqueue/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-delayqueue/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-delayqueue/.mvn/wrapper/maven-wrapper.properties b/springboot-delayqueue/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-delayqueue/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 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/springboot-delayqueue/pom.xml b/springboot-delayqueue/pom.xml new file mode 100644 index 00000000..456a952b --- /dev/null +++ b/springboot-delayqueue/pom.xml @@ -0,0 +1,57 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-delayqueue + 0.0.1-SNAPSHOT + springboot-delayqueue + + + + + + org.springframework.boot + spring-boot-starter-data-redis + 1.5.7.RELEASE + + + + org.apache.commons + commons-lang3 + 3.4 + + + + com.fasterxml.jackson.core + jackson-annotations + 2.9.0 + + + + org.springframework.boot + spring-boot-starter-quartz + + + + io.netty + netty-all + [4.1.42,) + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + 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/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RedisController.java b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RedisController.java new file mode 100644 index 00000000..365ca3eb --- /dev/null +++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/controller/RedisController.java @@ -0,0 +1,24 @@ +package com.chengxy.delayqueue.controller;//package com.xinzf.project.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.io.IOException; +import java.util.Map; + +@Controller +@RequestMapping +public class RedisController { + + + + @RequestMapping(value = "/redis", method = RequestMethod.GET) + @ResponseBody + public Map redisTest(String type) throws IOException { + + return null ; + } + +} 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/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/Order.java b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/Order.java new file mode 100644 index 00000000..7e4d7236 --- /dev/null +++ b/springboot-delayqueue/src/main/java/com/chengxy/delayqueue/delayQueue/Order.java @@ -0,0 +1,45 @@ +package com.chengxy.delayqueue.delayQueue; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.util.concurrent.Delayed; +import java.util.concurrent.TimeUnit; + +/** + * @Author: xiaofu + * @Description: + */ +public class Order implements Delayed { + + /** + * 延迟时间 + */ + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private long time; + + /** + * 订单号 + */ + String name; + + public Order(String name, long time, TimeUnit unit) { + this.name = name; + this.time = System.currentTimeMillis() + (time > 0 ? unit.toMillis(time) : 0); + } + + @Override + public long getDelay(TimeUnit unit) { + return time - System.currentTimeMillis(); + } + + @Override + public int compareTo(Delayed o) { + Order Order = (Order) o; + long diff = this.time - Order.time; + if (diff <= 0) { + return -1; + } else { + return 1; + } + } +} \ No newline at end of file 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/.gitignore b/springboot-demo/.gitignore deleted file mode 100644 index 724f6033..00000000 --- a/springboot-demo/.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/ -!/.idea/ -!/.idea/ 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/springboot-detect-faces/face-web/pom.xml b/springboot-detect-faces/face-web/pom.xml new file mode 100644 index 00000000..74cd9f4d --- /dev/null +++ b/springboot-detect-faces/face-web/pom.xml @@ -0,0 +1,79 @@ + + + 4.0.0 + + com.face + springboot-detect-faces + 0.0.1-SNAPSHOT + + face-web + 0.0.1-SNAPSHOT + face-web + + + 1.8 + UTF-8 + UTF-8 + 2.2.10.RELEASE + 1.4.1.Final + + + + + com.arcsoft.face + arcsoft-sdk-face + 3.0.0.0 + system + ${basedir}/lib/arcsoft-sdk-face-3.0.0.0.jar + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-jdbc + + + + mysql + mysql-connector-java + 8.0.18 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + UTF-8 + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + true + true + com.firebook.FireBookApplication + false + + + + repackage + + repackage + + + + + + + + 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/springboot-detect-faces/face-web/src/main/java/com/fire/FireControllerApplication.java b/springboot-detect-faces/face-web/src/main/java/com/fire/FireControllerApplication.java new file mode 100644 index 00000000..79840742 --- /dev/null +++ b/springboot-detect-faces/face-web/src/main/java/com/fire/FireControllerApplication.java @@ -0,0 +1,13 @@ +package com.fire; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class FireControllerApplication { + + public static void main(String[] 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/springboot-detect-faces/face-web/src/main/java/com/fire/entity/User.java b/springboot-detect-faces/face-web/src/main/java/com/fire/entity/User.java new file mode 100644 index 00000000..d338065a --- /dev/null +++ b/springboot-detect-faces/face-web/src/main/java/com/fire/entity/User.java @@ -0,0 +1,84 @@ +package com.fire.entity; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Entity; +import javax.persistence.Table; +import java.util.Date; + +/** + * 用户 + * + * @author xiaofu + * @Description: 用户 + * @date 2021/09/15 + */ +@Data +@Entity +@DynamicUpdate +@NoArgsConstructor +@Table(name = "fire_user") +public class User extends BaseEntity { + + /** + * 账号 + */ + private String accountId; + + /** + * 用户名 + */ + private String userName; + + /** + * 密码 + */ + private String password; + + /** + * 电子邮件 + */ + private String email; + + /** + * 头像 + */ + private String avatarPath; + + /** + * 是否为管理员 + */ + private boolean isAdmin; + + /** + * 启用状态 + */ + private boolean enabled; + + /** + * 密码重置时间 + */ + private Date pwdResetRime; + + /** + * 个人简介 + */ + private String personalDesc; + + /** + * 人脸识别信息 + */ + private byte[] detectFaces; + + /** + * 未知性别=-1 、男性=0 、女性=1 + */ + private Integer gender = -1; + + /** + * 是否为第一次登录的新用户 + */ + private boolean firstLogin; +} diff --git a/springboot-detect-faces/face-web/src/main/java/com/fire/repository/UserDao.java b/springboot-detect-faces/face-web/src/main/java/com/fire/repository/UserDao.java new file mode 100644 index 00000000..42e393d3 --- /dev/null +++ b/springboot-detect-faces/face-web/src/main/java/com/fire/repository/UserDao.java @@ -0,0 +1,15 @@ +package com.fire.repository; + +import com.fire.entity.User; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +/** + * @author xiaofu + * @Description: + * @date 2021/10/29 + */ +@Repository +public interface UserDao extends JpaRepository { + +} diff --git a/springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineService.java b/springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineService.java new file mode 100644 index 00000000..ae516424 --- /dev/null +++ b/springboot-detect-faces/face-web/src/main/java/com/fire/service/FaceEngineService.java @@ -0,0 +1,9 @@ +package com.fire.service; + + +import com.fire.entity.User; + +public interface FaceEngineService { + + User detectFaces(String file); +} 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 @@

{{scanTip}}

playVideo() { this.getUserMedia({ video: { - width: 500, height: 400, facingMode: "order" + width: 500, height: 400, facingMode: "user" } /* 前置优先 */ }, this.success, this.error) diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/index1.html" b/springboot-detect-faces/face-web/src/main/resources/templates/index1.html similarity index 96% rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/index1.html" rename to springboot-detect-faces/face-web/src/main/resources/templates/index1.html index e531f914..4ca72f76 100644 --- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/resources/templates/index1.html" +++ b/springboot-detect-faces/face-web/src/main/resources/templates/index1.html @@ -35,7 +35,7 @@

hi 新朋友,欢迎来到小富的世界~

-

问题咨询欢迎关注公众号:程序员小富

+

问题咨询欢迎关注公众号:程序员内点事

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..8338951b --- /dev/null +++ b/springboot-detect-faces/pom.xml @@ -0,0 +1,103 @@ + + + + org.springframework.boot + spring-boot-starter-parent + 2.2.1.RELEASE + + 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.70 + + + cn.hutool + hutool-all + 4.6.1 + + + com.google.code.gson + gson + 2.8.2 + + + + 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/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-douyin-watermark/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..e76d1f32 --- /dev/null +++ b/springboot-douyin-watermark/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-douyin-watermark/.mvn/wrapper/maven-wrapper.jar b/springboot-douyin-watermark/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-douyin-watermark/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-douyin-watermark/.mvn/wrapper/maven-wrapper.properties b/springboot-douyin-watermark/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-douyin-watermark/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 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/springboot-douyin-watermark/pom.xml b/springboot-douyin-watermark/pom.xml new file mode 100644 index 00000000..0e1cc9ec --- /dev/null +++ b/springboot-douyin-watermark/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-douyin-watermark + 0.0.1-SNAPSHOT + 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/springboot-douyin-watermark/src/main/resources/templates/index.html b/springboot-douyin-watermark/src/main/resources/templates/index.html new file mode 100644 index 00000000..aa939a20 --- /dev/null +++ b/springboot-douyin-watermark/src/main/resources/templates/index.html @@ -0,0 +1,193 @@ + + + + + + + + + + + + 抖音去水印 + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+
+
+
+
+ 支持平台(抖音、火山小视频) +
+
+
+
+
    +
  • + 抖音 +
  • + + + + + + +
  • + 火山小视频 +
  • + + + + + + +
+
+
+
+ +
+
+
+ + + + 去水印工具 + + + +
+
+
+
+
+ + +
+ +
+
+ + +
+ + +
+ + +
+
+ + +
+
+
+
+
+ +
+
+
+ 使用说明 +
+
+
+ 功能完善中,如遇点击下载按钮无响应,请按下图方式下载视频 +
+ +
    +
  • + 火山小视频 +
  • +
+
+
+
+ +
+
+ 声明 +
+
+
+ 本工具不已盈利为目的,只为交流学习,咨询请关注公众号【程序员内点事】 + +
+
+
+
+
+ +
+   +
+
+   +
+
+
+
+ + + + + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/springboot-erupt/pom.xml b/springboot-erupt/pom.xml new file mode 100644 index 00000000..35645618 --- /dev/null +++ b/springboot-erupt/pom.xml @@ -0,0 +1,116 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.4.3 + + + + war + + springboot-erupt + springboot-erupt + 0.0.1-SNAPSHOT + Demo project for Spring Boot + + + 1.8 + 1.6.7 + + + + + org.springframework.boot + spring-boot-starter + + + + + org.projectlombok + lombok + 1.16.18 + provided + + + + mysql + mysql-connector-java + + + + + xyz.erupt + erupt-upms + ${erupt.version} + + + + xyz.erupt + erupt-security + ${erupt.version} + + + + xyz.erupt + erupt-web + ${erupt.version} + + + + xyz.erupt + erupt-job + ${erupt.version} + + + + xyz.erupt + erupt-tpl + ${erupt.version} + + + + xyz.erupt + erupt-generator + ${erupt.version} + + + + xyz.erupt + erupt-monitor + ${erupt.version} + + + + org.springframework.boot + spring-boot-starter-tomcat + compile + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + + nexus-aliyun + nexus-aliyun + http://maven.aliyun.com/nexus/content/repositories/central + + true + + + false + + + + + diff --git a/springboot-erupt/src/main/java/com/xiaofu/erupt/SpringBootEruptApplication.java b/springboot-erupt/src/main/java/com/xiaofu/erupt/SpringBootEruptApplication.java new file mode 100644 index 00000000..5d87ac01 --- /dev/null +++ b/springboot-erupt/src/main/java/com/xiaofu/erupt/SpringBootEruptApplication.java @@ -0,0 +1,22 @@ +package com.xiaofu.erupt; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.context.annotation.ComponentScan; +import xyz.erupt.core.annotation.EruptScan; + +import java.io.IOException; +import java.net.URISyntaxException; + +@SpringBootApplication +@ComponentScan({"xyz.erupt", "com.xiaofu.erupt.model"}) // ↓ xyz.erupt必须有 +@EntityScan({"xyz.erupt", "com.xiaofu.erupt.model"}) // ↓ 如果包名com.example.demo有变化 +@EruptScan({"xyz.erupt", "com.xiaofu.erupt.model"}) // → 要修改为变化后的包名 +public class SpringBootEruptApplication { + + public static void main(String[] args) throws URISyntaxException, IOException { + SpringApplication.run(SpringBootEruptApplication.class, args); + System.setProperty("java.awt.headless", "false"); + } +} diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/filter/StudentFilter.java" b/springboot-erupt/src/main/java/com/xiaofu/erupt/filter/StudentFilter.java similarity index 90% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/filter/StudentFilter.java" rename to springboot-erupt/src/main/java/com/xiaofu/erupt/filter/StudentFilter.java index b6f6e38d..afa68147 100644 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/filter/StudentFilter.java" +++ b/springboot-erupt/src/main/java/com/xiaofu/erupt/filter/StudentFilter.java @@ -1,4 +1,4 @@ -package com.springboot101.filter; +package com.xiaofu.erupt.filter; import xyz.erupt.annotation.fun.FilterHandler; diff --git a/springboot-erupt/src/main/java/com/xiaofu/erupt/model/Student.java b/springboot-erupt/src/main/java/com/xiaofu/erupt/model/Student.java new file mode 100644 index 00000000..5f86571e --- /dev/null +++ b/springboot-erupt/src/main/java/com/xiaofu/erupt/model/Student.java @@ -0,0 +1,69 @@ +package com.xiaofu.erupt.model; + +import com.xiaofu.erupt.filter.StudentFilter; +import com.xiaofu.erupt.proxy.StudentDataProxy; +import lombok.Getter; +import lombok.Setter; +import org.apache.poi.ss.usermodel.AutoFilter; +import org.hibernate.annotations.GenericGenerator; +import xyz.erupt.annotation.Erupt; +import xyz.erupt.annotation.EruptField; +import xyz.erupt.annotation.sub_erupt.Filter; +import xyz.erupt.annotation.sub_erupt.Power; +import xyz.erupt.annotation.sub_field.Edit; +import xyz.erupt.annotation.sub_field.EditType; +import xyz.erupt.annotation.sub_field.View; +import xyz.erupt.annotation.sub_field.ViewType; +import xyz.erupt.annotation.sub_field.sub_edit.AttachmentType; +import xyz.erupt.annotation.sub_field.sub_edit.BoolType; +import xyz.erupt.annotation.sub_field.sub_edit.HtmlEditorType; +import xyz.erupt.annotation.sub_field.sub_edit.Search; +import xyz.erupt.jpa.model.BaseModel; + +import javax.persistence.*; +import java.util.Date; + +/* + * @Erupt注解修饰在类上,@EruptField注解修饰在字段上 + * 其他注解均为Jpa注解 + */ +@Getter +@Setter +@Erupt(name = "学生表",dataProxy = {StudentDataProxy.class}, + power = @Power(importable = true, export = true) +) +@Entity +//@Table(name = "t_student") +public class Student extends BaseModel { + + @EruptField( + views = @View(title = "学生姓名"), + edit = @Edit(title = "学生姓名", notNull = true, search = @Search(vague = true)) + ) + private String studentName; + + @EruptField( + views = @View(title = "所属班级"), + edit = @Edit(title = "所属班级", notNull = true) + ) + private String studentClass; + + @EruptField( + views = @View(title = "学生年龄"), + edit = @Edit(title = "学生年龄", notNull = true) + ) + private String studentAge; + + @Lob + @EruptField( + views = @View(title = "学生性别"), + edit = @Edit(title = "学生性别", notNull = true) + ) + private String studentSex; + + @EruptField( + views = @View(title = "考核状态"), + edit = @Edit(title = "考核状态", notNull = true, boolType = @BoolType(trueText = "通过", falseText = "挂科"), search = @Search) + ) + private Boolean status; +} \ No newline at end of file diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/proxy/StudentDataProxy.java" b/springboot-erupt/src/main/java/com/xiaofu/erupt/proxy/StudentDataProxy.java similarity index 95% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/proxy/StudentDataProxy.java" rename to springboot-erupt/src/main/java/com/xiaofu/erupt/proxy/StudentDataProxy.java index 083c6c25..d7bdb332 100644 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/proxy/StudentDataProxy.java" +++ b/springboot-erupt/src/main/java/com/xiaofu/erupt/proxy/StudentDataProxy.java @@ -1,6 +1,6 @@ -package com.springboot101.proxy; +package com.xiaofu.erupt.proxy; -import com.springboot101.model.Student; +import com.xiaofu.erupt.model.Student; import org.apache.poi.ss.usermodel.Workbook; import xyz.erupt.annotation.fun.DataProxy; import xyz.erupt.core.exception.EruptApiErrorTip; diff --git a/springboot-erupt/src/main/resources/application.yml b/springboot-erupt/src/main/resources/application.yml new file mode 100644 index 00000000..978e221d --- /dev/null +++ b/springboot-erupt/src/main/resources/application.yml @@ -0,0 +1,22 @@ +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/erupt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai + username: root + password: sb886684 + jpa: + show-sql: true + generate-ddl: true + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + database: mysql + profiles: + active: dev + mail: + username: xxxx@qq.com + password: xxxxxxx + host: smtp.qq.com + properties: + mail.smtp.ssl.auth: true + mail.smtp.ssl.enable: true + mail.smtp.ssl.required: true +server: + port: 8888 \ No newline at end of file diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/public/app.css" b/springboot-erupt/src/main/resources/public/app.css similarity index 100% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/public/app.css" rename to springboot-erupt/src/main/resources/public/app.css diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/public/app.js" b/springboot-erupt/src/main/resources/public/app.js similarity index 100% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/public/app.js" rename to springboot-erupt/src/main/resources/public/app.js diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/public/home.html" b/springboot-erupt/src/main/resources/public/home.html similarity index 100% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/public/home.html" rename to springboot-erupt/src/main/resources/public/home.html diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/public/login-img.png" b/springboot-erupt/src/main/resources/public/login-img.png similarity index 100% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/public/login-img.png" rename to springboot-erupt/src/main/resources/public/login-img.png diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/tpl/erupt.html" b/springboot-erupt/src/main/resources/tpl/erupt.html similarity index 100% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/tpl/erupt.html" rename to springboot-erupt/src/main/resources/tpl/erupt.html diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/.gitignore" b/springboot-file-storage/.gitignore similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/.gitignore" rename to springboot-file-storage/.gitignore diff --git a/springboot-file-storage/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-file-storage/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..e76d1f32 --- /dev/null +++ b/springboot-file-storage/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-file-storage/.mvn/wrapper/maven-wrapper.jar b/springboot-file-storage/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-file-storage/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-file-storage/.mvn/wrapper/maven-wrapper.properties b/springboot-file-storage/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-file-storage/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/springboot-file-storage/README.md b/springboot-file-storage/README.md new file mode 100644 index 00000000..0dd908b2 --- /dev/null +++ b/springboot-file-storage/README.md @@ -0,0 +1,6 @@ +# 工程简介 + + + +# 延伸阅读 + diff --git a/springboot-file-storage/mvnw b/springboot-file-storage/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/springboot-file-storage/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-file-storage/mvnw.cmd b/springboot-file-storage/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/springboot-file-storage/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/springboot-file-storage/pom.xml b/springboot-file-storage/pom.xml new file mode 100644 index 00000000..97f7faba --- /dev/null +++ b/springboot-file-storage/pom.xml @@ -0,0 +1,100 @@ + + + 4.0.0 + com.fire.storage + springboot-file-storage + 0.0.1-SNAPSHOT + springboot-file-storage + Demo project for Spring Boot + + + 1.8 + UTF-8 + UTF-8 + 2.3.7.RELEASE + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.projectlombok + lombok + 1.18.10 + + + + + cn.xuyanwu + spring-file-storage + 0.5.0 + + + + + com.aliyun.oss + aliyun-sdk-oss + 3.10.2 + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + UTF-8 + + + + org.springframework.boot + spring-boot-maven-plugin + 2.3.7.RELEASE + + com.fire.storage.SpringbootFileStorageApplication + + + + repackage + + repackage + + + + + + + + diff --git "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/SpringbootFileStorageApplication.java" b/springboot-file-storage/src/main/java/com/fire/storage/SpringbootFileStorageApplication.java similarity index 93% rename from "springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/SpringbootFileStorageApplication.java" rename to springboot-file-storage/src/main/java/com/fire/storage/SpringbootFileStorageApplication.java index d6c95e75..57626404 100644 --- "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/SpringbootFileStorageApplication.java" +++ b/springboot-file-storage/src/main/java/com/fire/storage/SpringbootFileStorageApplication.java @@ -1,4 +1,4 @@ -package com.springboot101; +package com.fire.storage; import cn.xuyanwu.spring.file.storage.EnableFileStorage; import org.springframework.boot.SpringApplication; diff --git "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/controller/FileController.java" b/springboot-file-storage/src/main/java/com/fire/storage/controller/FileController.java similarity index 98% rename from "springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/controller/FileController.java" rename to springboot-file-storage/src/main/java/com/fire/storage/controller/FileController.java index a0b6a7d0..a074ad6d 100644 --- "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/controller/FileController.java" +++ b/springboot-file-storage/src/main/java/com/fire/storage/controller/FileController.java @@ -1,6 +1,6 @@ -package com.springboot101.controller; +package com.fire.storage.controller; import cn.xuyanwu.spring.file.storage.FileInfo; import cn.xuyanwu.spring.file.storage.FileStorageService; diff --git "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/service/LogFileStorageAspect.java" b/springboot-file-storage/src/main/java/com/fire/storage/da/LogFileStorageAspect.java similarity index 98% rename from "springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/service/LogFileStorageAspect.java" rename to springboot-file-storage/src/main/java/com/fire/storage/da/LogFileStorageAspect.java index 590a8f28..2f994766 100644 --- "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/java/com/springboot101/service/LogFileStorageAspect.java" +++ b/springboot-file-storage/src/main/java/com/fire/storage/da/LogFileStorageAspect.java @@ -1,4 +1,4 @@ -package com.springboot101.service; +package com.fire.storage.da; import cn.xuyanwu.spring.file.storage.FileInfo; import cn.xuyanwu.spring.file.storage.UploadPretreatment; diff --git "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/resources/application.yml" b/springboot-file-storage/src/main/resources/application.yml similarity index 100% rename from "springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/src/main/resources/application.yml" rename to springboot-file-storage/src/main/resources/application.yml diff --git a/springboot-file-storage/src/test/java/com/fire/storage/SpringbootFileStorageApplicationTests.java b/springboot-file-storage/src/test/java/com/fire/storage/SpringbootFileStorageApplicationTests.java new file mode 100644 index 00000000..52bf8231 --- /dev/null +++ b/springboot-file-storage/src/test/java/com/fire/storage/SpringbootFileStorageApplicationTests.java @@ -0,0 +1,13 @@ +package com.fire.storage; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class SpringbootFileStorageApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/.gitignore" b/springboot-global-formatting/.gitignore similarity index 100% rename from "springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/.gitignore" rename to springboot-global-formatting/.gitignore diff --git a/springboot-global-formatting/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-global-formatting/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..e76d1f32 --- /dev/null +++ b/springboot-global-formatting/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-global-formatting/.mvn/wrapper/maven-wrapper.jar b/springboot-global-formatting/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-global-formatting/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-global-formatting/.mvn/wrapper/maven-wrapper.properties b/springboot-global-formatting/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-global-formatting/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/springboot-global-formatting/mvnw b/springboot-global-formatting/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/springboot-global-formatting/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-global-formatting/mvnw.cmd b/springboot-global-formatting/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/springboot-global-formatting/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/springboot-global-formatting/pom.xml b/springboot-global-formatting/pom.xml new file mode 100644 index 00000000..b3a57360 --- /dev/null +++ b/springboot-global-formatting/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-global-formatting + 0.0.1-SNAPSHOT + springboot-global-formatting + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/SpringbootGlobalFormattingApplication.java" b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/SpringbootGlobalFormattingApplication.java similarity index 91% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/SpringbootGlobalFormattingApplication.java" rename to springboot-global-formatting/src/main/java/com/xiaofu/formatting/SpringbootGlobalFormattingApplication.java index a9080cef..4a7eed48 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/SpringbootGlobalFormattingApplication.java" +++ b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/SpringbootGlobalFormattingApplication.java @@ -1,4 +1,4 @@ -package com.springboot101; +package com.xiaofu.formatting; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/config/DateFormatConfig1.java" b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/config/DateFormatConfig1.java similarity index 93% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/config/DateFormatConfig1.java" rename to springboot-global-formatting/src/main/java/com/xiaofu/formatting/config/DateFormatConfig1.java index 370b0492..d98e257c 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/config/DateFormatConfig1.java" +++ b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/config/DateFormatConfig1.java @@ -1,4 +1,4 @@ -//package com.springboot101.formatting.config; +//package com.xiaofu.formatting.config; // // //import com.fasterxml.jackson.databind.SerializationFeature; @@ -24,7 +24,7 @@ // private String pattern; // // /** -// * @author 公众号:程序员小富 +// * @author xiaofu // * @description date 类型全局时间格式化 // * @date 2020/8/31 18:22 // */ @@ -43,7 +43,7 @@ // } // // /** -// * @author 公众号:程序员小富 +// * @author xiaofu // * @description LocalDate 类型全局时间格式化 // * @date 2020/8/31 18:22 // */ diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/config/DateFormatConfig2.java" b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/config/DateFormatConfig2.java similarity index 94% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/config/DateFormatConfig2.java" rename to springboot-global-formatting/src/main/java/com/xiaofu/formatting/config/DateFormatConfig2.java index e811c554..bb62cd4f 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/config/DateFormatConfig2.java" +++ b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/config/DateFormatConfig2.java @@ -1,4 +1,4 @@ -package com.springboot101.config; +package com.xiaofu.formatting.config; import com.fasterxml.jackson.core.JsonGenerator; @@ -42,7 +42,7 @@ public ObjectMapper serializingObjectMapper() { } /** - * @author 公众号:程序员小富 + * @author xiaofu * @description Date 时间类型装换 * @date 2020/9/1 17:25 */ @@ -56,7 +56,7 @@ public void serialize(Date date, JsonGenerator gen, SerializerProvider provider) } /** - * @author 公众号:程序员小富 + * @author xiaofu * @description Date 时间类型装换 * @date 2020/9/1 17:25 */ @@ -74,7 +74,7 @@ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializ } /** - * @author 公众号:程序员小富 + * @author xiaofu * @description LocalDate 时间类型装换 * @date 2020/9/1 17:25 */ @@ -86,7 +86,7 @@ public void serialize(LocalDateTime value, JsonGenerator gen, SerializerProvider } /** - * @author 公众号:程序员小富 + * @author xiaofu * @description LocalDate 时间类型装换 * @date 2020/9/1 17:25 */ diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/controller/GlobalFormattingTimeController.java" b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/controller/GlobalFormattingTimeController.java similarity index 84% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/controller/GlobalFormattingTimeController.java" rename to springboot-global-formatting/src/main/java/com/xiaofu/formatting/controller/GlobalFormattingTimeController.java index 910db981..76d85208 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/controller/GlobalFormattingTimeController.java" +++ b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/controller/GlobalFormattingTimeController.java @@ -1,7 +1,7 @@ -package com.springboot101.controller; +package com.xiaofu.formatting.controller; import com.alibaba.fastjson.JSON; -import com.springboot101.dto.OrderDTO; +import com.xiaofu.formatting.dto.OrderDTO; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -10,7 +10,7 @@ import java.util.Date; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: */ @Slf4j diff --git a/springboot-global-formatting/src/main/java/com/xiaofu/formatting/dto/OrderDTO.java b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/dto/OrderDTO.java new file mode 100644 index 00000000..76de241f --- /dev/null +++ b/springboot-global-formatting/src/main/java/com/xiaofu/formatting/dto/OrderDTO.java @@ -0,0 +1,21 @@ +package com.xiaofu.formatting.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.Date; + +/** + * @Author: xiaofu + * @Description: + */ +@Data +public class OrderDTO { + + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + + @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd") + private Date updateTime; +} diff --git a/springboot-global-formatting/src/main/resources/application.properties b/springboot-global-formatting/src/main/resources/application.properties new file mode 100644 index 00000000..e69de29b diff --git a/springboot-jasypt/README.md b/springboot-jasypt/README.md new file mode 100644 index 00000000..b4b31fdc --- /dev/null +++ b/springboot-jasypt/README.md @@ -0,0 +1,29 @@ + + +### 启动命令 并注入 秘钥配置 + +>jasypt.encryptor.password=mypassword + +```java + +java -jar -Djasypt.encryptor.password=mypassword XXX-jasypt.jar + +脚本文件 + +java -jar -Djasypt.encryptor.password=${JASYPT_PASSWORD} xxx.jar +``` + +### 生成待加密的文本内容 + +> maven包路径 D:\maven_lib\org\jasypt\jasypt\1.9.3\jasypt-1.9.3.jar + +> input 待加密文本 + +> password 秘钥文本 + +```java +java -cp D:\maven_lib\org\jasypt\jasypt\1.9.3\jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input="mypassword" password=35579B7F9C8CB15E +``` + +参考文件 https://blog.yamell.com/java/415.html + diff --git a/springboot-jasypt/pom.xml b/springboot-jasypt/pom.xml new file mode 100644 index 00000000..970ee34e --- /dev/null +++ b/springboot-jasypt/pom.xml @@ -0,0 +1,69 @@ + + + + org.springframework.boot + spring-boot-starter-parent + 2.3.3.RELEASE + + + 4.0.0 + + springboot-jasypt + + + 8 + 8 + + + + + + com.github.ulisesbocchio + jasypt-spring-boot-starter + 2.1.0 + + + org.aspectj + aspectjweaver + + + org.apache.poi + poi + 3.17 + compile + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-web + + + org.projectlombok + lombok + 1.16.18 + provided + + + + com.alibaba + fastjson + 1.2.49 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + \ No newline at end of file diff --git a/springboot-jasypt/src/main/java/com/xiaofu/JasyptApplication.java b/springboot-jasypt/src/main/java/com/xiaofu/JasyptApplication.java new file mode 100644 index 00000000..f8599702 --- /dev/null +++ b/springboot-jasypt/src/main/java/com/xiaofu/JasyptApplication.java @@ -0,0 +1,20 @@ +package com.xiaofu; + +import com.xiaofu.process.MyPropertiesBeanFactoryPostProcessor; +import com.xiaofu.process.conf; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Import; + +@Import({MyPropertiesBeanFactoryPostProcessor.class, conf.class}) +@ComponentScan("com.xiaofu") +@SpringBootApplication +public class JasyptApplication { + + public static void main(String[] args) { + ConfigurableApplicationContext run = SpringApplication.run(JasyptApplication.class, args); + } +} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/annotation/EncryptField.java" b/springboot-jasypt/src/main/java/com/xiaofu/annotation/EncryptField.java similarity index 84% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/annotation/EncryptField.java" rename to springboot-jasypt/src/main/java/com/xiaofu/annotation/EncryptField.java index cc1e9081..2f5af7e1 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/annotation/EncryptField.java" +++ b/springboot-jasypt/src/main/java/com/xiaofu/annotation/EncryptField.java @@ -1,4 +1,4 @@ -package com.springboot101.annotation; +package com.xiaofu.annotation; import java.lang.annotation.*; @Documented diff --git a/springboot-jasypt/src/main/java/com/xiaofu/annotation/EncryptMethod.java b/springboot-jasypt/src/main/java/com/xiaofu/annotation/EncryptMethod.java new file mode 100644 index 00000000..7e0bac68 --- /dev/null +++ b/springboot-jasypt/src/main/java/com/xiaofu/annotation/EncryptMethod.java @@ -0,0 +1,14 @@ +package com.xiaofu.annotation; + +import java.lang.annotation.*; + +import static com.xiaofu.enums.EncryptConstant.ENCRYPT; + +@Documented +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface EncryptMethod { + + String type() default ENCRYPT; +} + diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/aspect/EncryptHandler.java" b/springboot-jasypt/src/main/java/com/xiaofu/aspect/EncryptHandler.java similarity index 89% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/aspect/EncryptHandler.java" rename to springboot-jasypt/src/main/java/com/xiaofu/aspect/EncryptHandler.java index dae3af51..1e5c87d4 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/aspect/EncryptHandler.java" +++ b/springboot-jasypt/src/main/java/com/xiaofu/aspect/EncryptHandler.java @@ -1,18 +1,21 @@ -package com.springboot101.aspect; +package com.xiaofu.aspect; -import com.springboot101.annotation.EncryptField; +import com.xiaofu.annotation.EncryptField; +import com.xiaofu.annotation.EncryptMethod; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.*; +import org.aspectj.lang.reflect.MethodSignature; import org.jasypt.encryption.StringEncryptor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.SerializationUtils; import java.lang.reflect.Field; import java.util.*; -import static com.springboot101.enums.EncryptConstant.DECRYPT; -import static com.springboot101.enums.EncryptConstant.ENCRYPT; +import static com.xiaofu.enums.EncryptConstant.DECRYPT; +import static com.xiaofu.enums.EncryptConstant.ENCRYPT; @Slf4j @Aspect @@ -22,7 +25,7 @@ public class EncryptHandler { @Autowired private StringEncryptor stringEncryptor; - @Pointcut("@annotation(com.springboot101.annotation.EncryptMethod)") + @Pointcut("@annotation(com.xiaofu.annotation.EncryptMethod)") public void pointCut() { } diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/controller/Encryptor.java" b/springboot-jasypt/src/main/java/com/xiaofu/controller/Encryptor.java similarity index 76% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/controller/Encryptor.java" rename to springboot-jasypt/src/main/java/com/xiaofu/controller/Encryptor.java index 2b013617..cfbfaae9 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/controller/Encryptor.java" +++ b/springboot-jasypt/src/main/java/com/xiaofu/controller/Encryptor.java @@ -1,9 +1,9 @@ -package com.springboot101.controller; +package com.xiaofu.controller; import com.alibaba.fastjson.JSON; -import com.springboot101.annotation.EncryptField; -import com.springboot101.annotation.EncryptMethod; -import com.springboot101.model.UserVo; +import com.xiaofu.annotation.EncryptField; +import com.xiaofu.annotation.EncryptMethod; +import com.xiaofu.model.UserVo; import lombok.extern.slf4j.Slf4j; import org.jasypt.encryption.StringEncryptor; import org.springframework.beans.factory.annotation.Autowired; @@ -18,7 +18,7 @@ public class Encryptor { private StringEncryptor stringEncryptor; public void encrypt(String content) { - String encryptStr = stringEncryptor.encrypt("公众号:程序员小富"); + String encryptStr = stringEncryptor.encrypt("xiaofu"); System.out.println("加密后的内容:" + encryptStr); } diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/enums/EncryptConstant.java" b/springboot-jasypt/src/main/java/com/xiaofu/enums/EncryptConstant.java similarity index 80% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/enums/EncryptConstant.java" rename to springboot-jasypt/src/main/java/com/xiaofu/enums/EncryptConstant.java index eee3cf55..bf8ccded 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/enums/EncryptConstant.java" +++ b/springboot-jasypt/src/main/java/com/xiaofu/enums/EncryptConstant.java @@ -1,4 +1,4 @@ -package com.springboot101.enums; +package com.xiaofu.enums; public interface EncryptConstant { diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/model/UserVo.java" b/springboot-jasypt/src/main/java/com/xiaofu/model/UserVo.java similarity index 80% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/model/UserVo.java" rename to springboot-jasypt/src/main/java/com/xiaofu/model/UserVo.java index 707ec213..be41ecad 100644 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/model/UserVo.java" +++ b/springboot-jasypt/src/main/java/com/xiaofu/model/UserVo.java @@ -1,6 +1,6 @@ -package com.springboot101.model; +package com.xiaofu.model; -import com.springboot101.annotation.EncryptField; +import com.xiaofu.annotation.EncryptField; import lombok.Data; import java.io.Serializable; diff --git a/springboot-jasypt/src/main/java/com/xiaofu/process/EnvCopy1.java b/springboot-jasypt/src/main/java/com/xiaofu/process/EnvCopy1.java new file mode 100644 index 00000000..30215980 --- /dev/null +++ b/springboot-jasypt/src/main/java/com/xiaofu/process/EnvCopy1.java @@ -0,0 +1,34 @@ +package com.xiaofu.process; + +import com.ulisesbocchio.jasyptspringboot.EncryptablePropertySource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.core.env.PropertySource; +import org.springframework.core.env.StandardEnvironment; +import org.springframework.stereotype.Component; + +import java.util.Optional; + +/** + * @Auther: 公众号:程序员小富 + * @Date: 2021/7/30 18:35 + * @Description: + */ +public class EnvCopy1 { + + StandardEnvironment copy1; + + public EnvCopy1(final ConfigurableEnvironment environment) { + copy1 = new StandardEnvironment(); + Optional.ofNullable(environment.getPropertySources()).ifPresent(sources -> sources.forEach(ps -> { + final PropertySource original = ps instanceof EncryptablePropertySource + ? ((EncryptablePropertySource) ps).getDelegate() + : ps; + copy1.getPropertySources().addLast(original); + })); + } + + public ConfigurableEnvironment get() { + return copy1; + } +} diff --git a/springboot-jasypt/src/main/java/com/xiaofu/process/MyPropertiesBeanFactoryPostProcessor.java b/springboot-jasypt/src/main/java/com/xiaofu/process/MyPropertiesBeanFactoryPostProcessor.java new file mode 100644 index 00000000..789dd133 --- /dev/null +++ b/springboot-jasypt/src/main/java/com/xiaofu/process/MyPropertiesBeanFactoryPostProcessor.java @@ -0,0 +1,34 @@ +//package com.xiaofu.process; +// +//import lombok.NoArgsConstructor; +//import org.springframework.beans.BeansException; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +//import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +//import org.springframework.context.annotation.Import; +//import org.springframework.core.Ordered; +//import org.springframework.core.env.*; +// +//import java.util.Iterator; +// +//@NoArgsConstructor +//public class MyPropertiesBeanFactoryPostProcessor implements BeanFactoryPostProcessor, Ordered { +// +// EnvCopy1 envCopy1 ; +// +// @Override +// public void postProcessBeanFactory(ConfigurableListableBeanFactory a) throws BeansException { +// MutablePropertySources propertySources = envCopy1.get().getPropertySources(); +// for (PropertySource propertySource : propertySources) { +// if (propertySource instanceof PropertiesPropertySource) { +// System.out.println(propertySource.getProperty("propertyKey")); +// // 用propertySource.getSource() 可以获取全部配置 +// } +// }09ta +// @Override +// public int getOrder() { +// return 0; +// } +// +// +//} diff --git a/springboot-jasypt/src/main/java/com/xiaofu/process/conf.java b/springboot-jasypt/src/main/java/com/xiaofu/process/conf.java new file mode 100644 index 00000000..e747023b --- /dev/null +++ b/springboot-jasypt/src/main/java/com/xiaofu/process/conf.java @@ -0,0 +1,19 @@ +package com.xiaofu.process; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.ConfigurableEnvironment; + +/** + * @Auther: 公众号:程序员小富 + * @Date: 2021/7/30 18:41 + * @Description: + */ +@Configuration +public class conf { + + @Bean + public EnvCopy1 envCopy1(final ConfigurableEnvironment environment) { + return new EnvCopy1(environment); + } +} diff --git a/springboot-jasypt/src/main/resources/application.yml b/springboot-jasypt/src/main/resources/application.yml new file mode 100644 index 00000000..55ea7867 --- /dev/null +++ b/springboot-jasypt/src/main/resources/application.yml @@ -0,0 +1,15 @@ +# \u7AEF\u53E3\u53F7 +server: + port: 9000 + +spring: + datasource: + url: jdbc:mysql://1.2.3.4:3306/xiaofu?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai + username: xiaofu + password: ENC(mVTvp4IddqdaYGqPl9lCQbzM3H/b0B6l) + +# \u79D8\u94A5 +jasypt: + encryptor: + password: 35579B7F9C8CB15E + poolSize: 3 \ No newline at end of file diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/.gitignore" b/springboot-magic-api/.gitignore similarity index 100% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/.gitignore" rename to springboot-magic-api/.gitignore diff --git a/springboot-magic-api/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-magic-api/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..e76d1f32 --- /dev/null +++ b/springboot-magic-api/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-magic-api/.mvn/wrapper/maven-wrapper.jar b/springboot-magic-api/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-magic-api/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-magic-api/.mvn/wrapper/maven-wrapper.properties b/springboot-magic-api/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-magic-api/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/README.md" b/springboot-magic-api/README.md similarity index 100% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/README.md" rename to springboot-magic-api/README.md diff --git a/springboot-magic-api/mvnw b/springboot-magic-api/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/springboot-magic-api/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-magic-api/mvnw.cmd b/springboot-magic-api/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/springboot-magic-api/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/springboot-magic-api/pom.xml b/springboot-magic-api/pom.xml new file mode 100644 index 00000000..a5136d57 --- /dev/null +++ b/springboot-magic-api/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-magic-api + 0.0.1-SNAPSHOT + + + 8 + 8 + + + + + + org.apache.commons + commons-lang3 + 3.7 + + + + org.ssssssss + magic-api-spring-boot-starter + 0.7.1 + + + + mysql + mysql-connector-java + runtime + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + com.dtflys.forest + spring-boot-starter-forest + 1.5.0-RC3 + + + + + \ No newline at end of file diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/main/java/com/springboot101/SpringbootMagicApiApplication.java" b/springboot-magic-api/src/main/java/com/xiaofu/magic/SpringbootMagicApiApplication.java similarity index 91% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/main/java/com/springboot101/SpringbootMagicApiApplication.java" rename to springboot-magic-api/src/main/java/com/xiaofu/magic/SpringbootMagicApiApplication.java index ce8fc6b0..887eccd4 100644 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/main/java/com/springboot101/SpringbootMagicApiApplication.java" +++ b/springboot-magic-api/src/main/java/com/xiaofu/magic/SpringbootMagicApiApplication.java @@ -1,4 +1,4 @@ -package com.springboot101; +package com.xiaofu.magic; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/springboot-magic-api/src/main/resources/application.yml b/springboot-magic-api/src/main/resources/application.yml new file mode 100644 index 00000000..c3f8c52b --- /dev/null +++ b/springboot-magic-api/src/main/resources/application.yml @@ -0,0 +1,54 @@ +magic-api: + web: /magic/web # UI请求的界面以及UI服务地址 + resource: #配置存储方式 + type: database # 配置存储在数据库中 + tableName: magic_api_file # 数据库中的表名 + datasource: jdbc:mysql://47.93.6.5:3306/magic-api?useUnicode=true&characterEncoding=UTF-8&useSSL=false + #指定数据源(单数据源时无需配置,多数据源时默认使用主数据源,如果存在其他数据源中需要指定。) + prefix: /magic-api # key前缀 + readonly: false # 是否是只读模式 +# prefix: / # 接口前缀,可以不配置 +# auto-import-module: db # 自动导入的模块 +# auto-import-package: java.lang.*,java.util.* #自动导包 +# refresh-interval: 0 #不启用刷新 +# allow-override: false #禁止覆盖应用接口 +# sql-column-case: camel #启用驼峰命名转换 +# editor-config: classpath:./magic-editor-config.js #编辑器配置 +# support-cross-domain: true # 跨域支持,默认开启 +# response: |- #配置JSON格式,格式为magic-script中的表达式 +# { +# code: code, +# message: message, +# data, +# timestamp, +# requestTime, +# executeTime, +# } +# banner: true # 打印banner +# thread-pool-executor-size: 8 # async语句的线程池大小 +# throw-exception: false #执行出错时是否抛出异常 +# page-config: +# size: size # 页大小的参数名称 +# page: page # 页码的参数名称 +# default-page: 1 # 未传页码时的默认首页 +# default-size: 10 # 未传页大小时的默认页大小 +# security-config: # 安全配置 +# username: admin # 登录用的用户名 +# password: 123456 # 登录用的密码 +# swagger-config: +# version: 1.0 +# description: MagicAPI 接口信息 +# title: MagicAPI Swagger Docs +# name: MagicAPI 接口 +# location: /v2/api-docs/magic-api/swagger2.json +# debug-config: +# timeout: 60 # 断点超时时间,默认60s + +server: + port: 9999 +spring: + datasource: + driver-class-name: com.mysql.jdbc.Driver + password: xinzhifu521 + url: jdbc:mysql://47.93.6.5:3306/magic-api?useUnicode=true&characterEncoding=UTF-8&useSSL=false + username: root diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/test/java/com/xiaofu/magic/SpringbootMagicApiApplicationTests.java" b/springboot-magic-api/src/test/java/com/xiaofu/magic/SpringbootMagicApiApplicationTests.java similarity index 86% rename from "springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/test/java/com/xiaofu/magic/SpringbootMagicApiApplicationTests.java" rename to springboot-magic-api/src/test/java/com/xiaofu/magic/SpringbootMagicApiApplicationTests.java index a7509af1..b4d34d90 100644 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/test/java/com/xiaofu/magic/SpringbootMagicApiApplicationTests.java" +++ b/springboot-magic-api/src/test/java/com/xiaofu/magic/SpringbootMagicApiApplicationTests.java @@ -1,4 +1,4 @@ -//package com.springboot101.magic; +//package com.xiaofu.magic; // //import org.junit.jupiter.api.Test; //import org.springframework.boot.test.context.SpringBootTest; diff --git "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/.gitignore" b/springboot-mqtt-messagepush/.gitignore similarity index 100% rename from "springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/.gitignore" rename to springboot-mqtt-messagepush/.gitignore diff --git a/springboot-mqtt-messagepush/mvnw b/springboot-mqtt-messagepush/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/springboot-mqtt-messagepush/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-mqtt-messagepush/mvnw.cmd b/springboot-mqtt-messagepush/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/springboot-mqtt-messagepush/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/springboot-mqtt-messagepush/pom.xml b/springboot-mqtt-messagepush/pom.xml new file mode 100644 index 00000000..2e8c3beb --- /dev/null +++ b/springboot-mqtt-messagepush/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-mqtt-messagepush + 0.0.1-SNAPSHOT + springboot-mqtt-messagepush + + + + + + org.springframework.integration + spring-integration-mqtt + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + [1.2.1,) + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/SpringbootMqttMessagepushApplication.java b/springboot-mqtt-messagepush/src/main/java/com/mqtt/SpringbootMqttMessagepushApplication.java similarity index 92% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/SpringbootMqttMessagepushApplication.java rename to springboot-mqtt-messagepush/src/main/java/com/mqtt/SpringbootMqttMessagepushApplication.java index c97d2aad..b00535f0 100644 --- a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/SpringbootMqttMessagepushApplication.java +++ b/springboot-mqtt-messagepush/src/main/java/com/mqtt/SpringbootMqttMessagepushApplication.java @@ -1,4 +1,4 @@ -package com.springboot101; +package com.mqtt; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/IotMqttProducerConfig.java b/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/IotMqttProducerConfig.java new file mode 100644 index 00000000..0d0d5d45 --- /dev/null +++ b/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/IotMqttProducerConfig.java @@ -0,0 +1,45 @@ +package com.mqtt.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.integration.annotation.ServiceActivator; +import org.springframework.integration.channel.DirectChannel; +import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory; +import org.springframework.integration.mqtt.core.MqttPahoClientFactory; +import org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.MessageHandler; + +/** + * @Author: xinzhifu + * @Description: + */ +@Configuration +public class IotMqttProducerConfig { + + @Autowired + private MqttConfig mqttConfig; + + @Bean + public MqttPahoClientFactory mqttClientFactory() { + DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory(); + factory.setServerURIs(mqttConfig.getServers()); + return factory; + } + + @Bean + public MessageChannel iotMqttInputChannel() { + return new DirectChannel(); + } + + @Bean + @ServiceActivator(inputChannel = "iotMqttInputChannel") + public MessageHandler mqttOutbound() { + MqttPahoMessageHandler messageHandler = new MqttPahoMessageHandler(mqttConfig.getServerClientId(), mqttClientFactory()); + messageHandler.setAsync(false); + messageHandler.setDefaultQos(2); + messageHandler.setDefaultTopic(mqttConfig.getDefaultTopic()); + return messageHandler; + } +} diff --git a/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/IotMqttSubscriberConfig.java b/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/IotMqttSubscriberConfig.java new file mode 100644 index 00000000..2411573b --- /dev/null +++ b/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/IotMqttSubscriberConfig.java @@ -0,0 +1,71 @@ +//package com.mqtt.config; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.integration.annotation.ServiceActivator; +//import org.springframework.integration.channel.DirectChannel; +//import org.springframework.integration.core.MessageProducer; +//import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory; +//import org.springframework.integration.mqtt.core.MqttPahoClientFactory; +//import org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter; +//import org.springframework.integration.mqtt.support.DefaultPahoMessageConverter; +//import org.springframework.messaging.MessageChannel; +//import org.springframework.messaging.MessageHandler; +//import org.springframework.messaging.MessagingException; +// +///** +// * @Author: xiaofu +// * @Description: 消息订阅配置 +// * @date 2020/6/8 18:24 +// */ +//@Configuration +//public class IotMqttSubscriberConfig { +// +// @Autowired +// private MqttConfig mqttConfig; +// +// @Bean +// public MqttPahoClientFactory mqttClientFactory() { +// DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory(); +// factory.setServerURIs(mqttConfig.getServers()); +// return factory; +// } +// +// @Bean +// public MessageChannel iotMqttInputChannel() { +// return new DirectChannel(); +// } +// +// @Bean +// public MessageProducer inbound() { +// MqttPahoMessageDrivenChannelAdapter adapter = new MqttPahoMessageDrivenChannelAdapter(mqttConfig.getClientId(), mqttClientFactory(), mqttConfig.getDefaultTopic()); +// adapter.setCompletionTimeout(5000); +// adapter.setConverter(new DefaultPahoMessageConverter()); +// adapter.setQos(2); +// adapter.setOutputChannel(iotMqttInputChannel()); +// return adapter; +// } +// +// /** +// * @author xiaofu +// * @description 消息订阅 +// * @date 2020/6/8 18:20 +// */ +// @Bean +// @ServiceActivator(inputChannel = "iotMqttInputChannel") +// public MessageHandler handlerTest() { +// +// return message -> { +// try { +// String string = message.getPayload().toString(); +// System.out.println("接收到消息:" + string); +// } catch (MessagingException ex) { +// //logger.info(ex.getMessage()); +// } +// }; +// +// } +//} +// +// diff --git a/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/MqttConfig.java b/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/MqttConfig.java new file mode 100644 index 00000000..77931329 --- /dev/null +++ b/springboot-mqtt-messagepush/src/main/java/com/mqtt/config/MqttConfig.java @@ -0,0 +1,40 @@ +package com.mqtt.config; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.integration.annotation.IntegrationComponentScan; +import org.springframework.stereotype.Component; + +/** + * @Author: xinzhifu + * @Description: 基础配置类 + * @date 2020/6/8 18:25 + */ +@Getter +@Setter +@Component +@IntegrationComponentScan +@ConfigurationProperties(prefix = "iot.mqtt") +public class MqttConfig { + + /** + * 服务地址 + */ + private String servers; + + /** + * 客户端id + */ + private String clientId; + + /** + * 服务端id + */ + private String serverClientId; + + /** + * 默认主题 + */ + private String defaultTopic; +} diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/producer/IotMqttController.java b/springboot-mqtt-messagepush/src/main/java/com/mqtt/producer/IotMqttController.java similarity index 91% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/producer/IotMqttController.java rename to springboot-mqtt-messagepush/src/main/java/com/mqtt/producer/IotMqttController.java index ca46615a..fc423a25 100644 --- a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/producer/IotMqttController.java +++ b/springboot-mqtt-messagepush/src/main/java/com/mqtt/producer/IotMqttController.java @@ -1,4 +1,4 @@ -package com.springboot101.producer; +package com.mqtt.producer; import org.springframework.beans.factory.annotation.Autowired; @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.ResponseBody; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: * @date 2020/6/8 18:26 */ diff --git a/springboot-mqtt-messagepush/src/main/java/com/mqtt/producer/IotMqttGateway.java b/springboot-mqtt-messagepush/src/main/java/com/mqtt/producer/IotMqttGateway.java new file mode 100644 index 00000000..906da84b --- /dev/null +++ b/springboot-mqtt-messagepush/src/main/java/com/mqtt/producer/IotMqttGateway.java @@ -0,0 +1,23 @@ +package com.mqtt.producer; + +import org.springframework.integration.annotation.MessagingGateway; +import org.springframework.integration.mqtt.support.MqttHeaders; +import org.springframework.messaging.handler.annotation.Header; + +/** + * @author xiaofu + * @description rabbitmq mqtt协议网关接口 + * @date 2020/6/8 18:26 + */ +@MessagingGateway(defaultRequestChannel = "iotMqttInputChannel") +public interface IotMqttGateway { + + void sendMessage2Mqtt(String data); + + void sendMessage2Mqtt(String data, @Header(MqttHeaders.TOPIC) String topic); + + void sendMessage2Mqtt(@Header(MqttHeaders.TOPIC) String topic, @Header(MqttHeaders.QOS) int qos, String payload); +} + + + diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/application.yml b/springboot-mqtt-messagepush/src/main/resources/application.yml similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/application.yml rename to springboot-mqtt-messagepush/src/main/resources/application.yml diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/js/follow.js b/springboot-mqtt-messagepush/src/main/resources/static/js/follow.js similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/js/follow.js rename to springboot-mqtt-messagepush/src/main/resources/static/js/follow.js diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/js/gg_bd_ad_720x90-2.js b/springboot-mqtt-messagepush/src/main/resources/static/js/gg_bd_ad_720x90-2.js similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/js/gg_bd_ad_720x90-2.js rename to springboot-mqtt-messagepush/src/main/resources/static/js/gg_bd_ad_720x90-2.js diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/js/gg_bd_ad_720x90.js b/springboot-mqtt-messagepush/src/main/resources/static/js/gg_bd_ad_720x90.js similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/js/gg_bd_ad_720x90.js rename to springboot-mqtt-messagepush/src/main/resources/static/js/gg_bd_ad_720x90.js diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/push.css b/springboot-mqtt-messagepush/src/main/resources/static/push.css similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/push.css rename to springboot-mqtt-messagepush/src/main/resources/static/push.css diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/style.css b/springboot-mqtt-messagepush/src/main/resources/static/style.css similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/static/style.css rename to springboot-mqtt-messagepush/src/main/resources/static/style.css diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/static/js/vue.min.js" b/springboot-mqtt-messagepush/src/main/resources/static/vue.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/vue.min.js" rename to springboot-mqtt-messagepush/src/main/resources/static/vue.min.js diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/templates/1.html b/springboot-mqtt-messagepush/src/main/resources/templates/1.html similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/templates/1.html rename to springboot-mqtt-messagepush/src/main/resources/templates/1.html diff --git a/springboot-mqtt-messagepush/src/main/resources/templates/2.html b/springboot-mqtt-messagepush/src/main/resources/templates/2.html new file mode 100644 index 00000000..e69de29b diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/templates/index.html b/springboot-mqtt-messagepush/src/main/resources/templates/index.html similarity index 100% rename from springboot101/MQTT/springboot-mqtt-messagepush/src/main/resources/templates/index.html rename to springboot-mqtt-messagepush/src/main/resources/templates/index.html diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/.gitignore" b/springboot-rabbitmq-confirm/.gitignore similarity index 100% rename from "springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/.gitignore" rename to springboot-rabbitmq-confirm/.gitignore diff --git a/springboot-rabbitmq-confirm/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-rabbitmq-confirm/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..e76d1f32 --- /dev/null +++ b/springboot-rabbitmq-confirm/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-rabbitmq-confirm/.mvn/wrapper/maven-wrapper.jar b/springboot-rabbitmq-confirm/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-rabbitmq-confirm/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-rabbitmq-confirm/.mvn/wrapper/maven-wrapper.properties b/springboot-rabbitmq-confirm/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-rabbitmq-confirm/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/springboot-rabbitmq-confirm/HELP.md b/springboot-rabbitmq-confirm/HELP.md new file mode 100644 index 00000000..8b853c16 --- /dev/null +++ b/springboot-rabbitmq-confirm/HELP.md @@ -0,0 +1,20 @@ +# 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.8.RELEASE/maven-plugin/) +* [Thymeleaf](https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/htmlsingle/#boot-features-spring-mvc-template-engines) +* [Spring Web](https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications) +* [Spring for RabbitMQ](https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/htmlsingle/#boot-features-amqp) + +### Guides +The following guides illustrate how to use some features concretely: + +* [Handling Form Submission](https://spring.io/guides/gs/handling-form-submission/) +* [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/) +* [Messaging with RabbitMQ](https://spring.io/guides/gs/messaging-rabbitmq/) + diff --git a/springboot-rabbitmq-confirm/mvnw b/springboot-rabbitmq-confirm/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/springboot-rabbitmq-confirm/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-rabbitmq-confirm/mvnw.cmd b/springboot-rabbitmq-confirm/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/springboot-rabbitmq-confirm/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/springboot-rabbitmq-confirm/pom.xml b/springboot-rabbitmq-confirm/pom.xml new file mode 100644 index 00000000..deda13d1 --- /dev/null +++ b/springboot-rabbitmq-confirm/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-rabbitmq-confirm + 0.0.1-SNAPSHOT + springboot-rabbitmq-confirm + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/SpringbootRabbitmqConfirmApplication.java b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/SpringbootRabbitmqConfirmApplication.java similarity index 90% rename from springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/SpringbootRabbitmqConfirmApplication.java rename to springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/SpringbootRabbitmqConfirmApplication.java index e9ad57de..7900dc70 100644 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/SpringbootRabbitmqConfirmApplication.java +++ b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/SpringbootRabbitmqConfirmApplication.java @@ -1,4 +1,4 @@ -package com.springboot101.confirm; +package com.xiaofu.confirm; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/callback/ConfirmCallbackService.java b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/callback/ConfirmCallbackService.java similarity index 83% rename from springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/callback/ConfirmCallbackService.java rename to springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/callback/ConfirmCallbackService.java index bd9f67af..2897489f 100644 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/callback/ConfirmCallbackService.java +++ b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/callback/ConfirmCallbackService.java @@ -1,8 +1,8 @@ -package com.springboot101.confirm.callback; +package com.xiaofu.confirm.callback; import lombok.extern.slf4j.Slf4j; -import org.springframework.amqp.rabbit.connection.CorrelationData; import org.springframework.amqp.rabbit.core.RabbitTemplate; +import org.springframework.amqp.rabbit.support.CorrelationData; import org.springframework.stereotype.Component; @Slf4j diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/callback/ReturnCallbackService.java b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/callback/ReturnCallbackService.java similarity index 87% rename from springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/callback/ReturnCallbackService.java rename to springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/callback/ReturnCallbackService.java index 9dd297cf..89a8fd5b 100644 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/callback/ReturnCallbackService.java +++ b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/callback/ReturnCallbackService.java @@ -1,4 +1,4 @@ -package com.springboot101.confirm.callback; +package com.xiaofu.confirm.callback; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.Message; @@ -6,7 +6,7 @@ import org.springframework.stereotype.Component; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: */ @Slf4j diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/config/QueueConfig.java b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/config/QueueConfig.java similarity index 96% rename from springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/config/QueueConfig.java rename to springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/config/QueueConfig.java index a8578aa5..f5ab8c8f 100644 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/config/QueueConfig.java +++ b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/config/QueueConfig.java @@ -1,4 +1,4 @@ -package com.springboot101.confirm.config; +package com.xiaofu.confirm.config; import org.springframework.amqp.core.Binding; import org.springframework.amqp.core.BindingBuilder; diff --git a/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/controller/TestController.java b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/controller/TestController.java new file mode 100644 index 00000000..0699f791 --- /dev/null +++ b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/controller/TestController.java @@ -0,0 +1,35 @@ +package com.xiaofu.confirm.controller; + +import com.xiaofu.confirm.sender.SendMessage; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * @Author: xiaofu + * @Description: + */ +@Controller +@RequestMapping +public class TestController { + + @Autowired + private SendMessage sendMessage; + + @RequestMapping(value = "/hello", method = RequestMethod.GET) + @ResponseBody + public String test() { + + //sendMessage.sendMessage("", "confirm_test_queue", "0" ); + + + for (int i = 0; i < 5; i++) { + + sendMessage.sendMessage("", "confirm_test_queue", "发送者消息"); + } + + return "success"; + } +} diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/receiver/ReceiverMessage.java b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/receiver/ReceiverMessage.java similarity index 94% rename from springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/receiver/ReceiverMessage.java rename to springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/receiver/ReceiverMessage.java index bf664a1d..1796bb19 100644 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/receiver/ReceiverMessage.java +++ b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/receiver/ReceiverMessage.java @@ -1,4 +1,4 @@ -package com.springboot101.confirm.receiver; +package com.xiaofu.confirm.receiver; import com.rabbitmq.client.Channel; import lombok.extern.slf4j.Slf4j; @@ -10,7 +10,7 @@ import java.io.IOException; /** - * @author 公众号:程序员小富 + * @author xiaofu * @description 消息消费 * @date 2020/6/29 16:31 */ diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/receiver/ReceiverMessage1.java b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/receiver/ReceiverMessage1.java similarity index 91% rename from springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/receiver/ReceiverMessage1.java rename to springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/receiver/ReceiverMessage1.java index 7c53cb56..c39583e7 100644 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/receiver/ReceiverMessage1.java +++ b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/receiver/ReceiverMessage1.java @@ -1,17 +1,17 @@ -package com.springboot101.confirm.receiver; +package com.xiaofu.confirm.receiver; import com.rabbitmq.client.Channel; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.Message; import org.springframework.amqp.rabbit.annotation.RabbitHandler; import org.springframework.amqp.rabbit.annotation.RabbitListener; -import org.springframework.amqp.rabbit.connection.CorrelationData; +import org.springframework.amqp.rabbit.support.CorrelationData; import org.springframework.stereotype.Component; import java.io.IOException; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: */ @Slf4j diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/sender/SendMessage.java b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/sender/SendMessage.java similarity index 84% rename from springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/sender/SendMessage.java rename to springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/sender/SendMessage.java index 6b9394a1..ce728b5b 100644 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/sender/SendMessage.java +++ b/springboot-rabbitmq-confirm/src/main/java/com/xiaofu/confirm/sender/SendMessage.java @@ -1,18 +1,18 @@ -package com.springboot101.confirm.sender; +package com.xiaofu.confirm.sender; -import com.springboot101.confirm.callback.ConfirmCallbackService; -import com.springboot101.confirm.callback.ReturnCallbackService; +import com.xiaofu.confirm.callback.ConfirmCallbackService; +import com.xiaofu.confirm.callback.ReturnCallbackService; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.MessageDeliveryMode; -import org.springframework.amqp.rabbit.connection.CorrelationData; import org.springframework.amqp.rabbit.core.RabbitTemplate; +import org.springframework.amqp.rabbit.support.CorrelationData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.UUID; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: */ @Slf4j @@ -32,7 +32,7 @@ public class SendMessage { * @param exchange 交换机 * @param routingKey 队列 * @param msg 消息体 - * @author 公众号:程序员小富 + * @author xiaofu * @description 发送消息 * @date 2020/6/29 16:22 */ diff --git a/springboot-rabbitmq-confirm/src/main/resources/application.properties b/springboot-rabbitmq-confirm/src/main/resources/application.properties new file mode 100644 index 00000000..0fbf8686 --- /dev/null +++ b/springboot-rabbitmq-confirm/src/main/resources/application.properties @@ -0,0 +1,23 @@ +spring.rabbitmq.host=127.0.0.1 +spring.rabbitmq.port=5672 +spring.rabbitmq.username=guest +spring.rabbitmq.password=guest +server.se +# \u53D1\u9001\u8005\u5F00\u542F confirm \u786E\u8BA4\u673A\u5236 +spring.rabbitmq.publisher-confirms=true +# \u5F00\u542F return \u786E\u8BA4\u673A\u5236 +spring.rabbitmq.publisher-returns=true + +#################################################### + +# \u6D88\u8D39\u7AEF\u5F00\u542Fack \u624B\u52A8\u5E94\u7B54 +spring.rabbitmq.listener.simple.acknowledge-mode=manual +# \u662F\u5426\u652F\u6301\u91CD\u8BD5 +spring.rabbitmq.listener.simple.retry.enabled=true +# \u6307\u5B9A\u6700\u5C0F\u7684\u6D88\u8D39\u8005\u6570\u91CF +#spring.rabbitmq.listener.simple.concurrency=1 +#\u6307\u5B9A\u6700\u5927\u7684\u6D88\u8D39\u8005\u6570\u91CF +#spring.rabbitmq.listener.simple.max-concurrency=1 + + + diff --git a/springboot-realtime-data/.gitignore b/springboot-realtime-data/.gitignore new file mode 100644 index 00000000..549e00a2 --- /dev/null +++ b/springboot-realtime-data/.gitignore @@ -0,0 +1,33 @@ +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/ diff --git a/springboot-realtime-data/README.md b/springboot-realtime-data/README.md new file mode 100644 index 00000000..f76e5518 --- /dev/null +++ b/springboot-realtime-data/README.md @@ -0,0 +1,256 @@ + +**大家好,我是小富~** + +我有一个朋友~ + +做了一个小破站,现在要实现一个站内信web消息推送的功能,对,就是下图这个小红点,一个很常用的功能。 + +![](https://files.mdnice.com/user/303/b713bf50-6512-464e-b684-29589f8677b9.png) + +不过他还没想好用什么方式做,这里我帮他整理了一下几种实现方案。 + +![](https://files.mdnice.com/user/303/130a09a0-70fa-4991-81a7-1f7ed0dfbfd9.png) + +### 什么是消息推送(push) + +消息推送(`push`)通常是指网站的运营工作等人员,通过某种工具对用户当前网页或移动设备APP进行的主动消息推送。 + +推送的场景比较多,比如有人关注我的公众号,这时我就会收到一条推送消息,以此来吸引我点击打开应用,消息推送一般又分为`web端消息推送`和`移动端消息推送`。 + +![](https://img-blog.csdnimg.cn/d5b8617c37fd489896603d562f8a98c1.png) + +上边的这种属于移动端消息推送,web端消息推送常见的诸如站内信、未读邮件数量、监控报警数量等,应用的也非常广泛。 + + +![](https://img-blog.csdnimg.cn/img_convert/15ead5d6e8b7afcfdccbcec02a181301.png) + + +在具体实现之前,咱们再来分析一下前边的需求,其实功能很简单,只要触发某个事件(主动分享了资源或者后台主动推送消息),web页面的通知小红点就会实时的`+1`就可以了。 + +消息推送无非是推(`push`)和拉(`pull`)两种形式。通常在服务端会有若干张消息推送表,用来记录用户触发不同事件所推送不同类型的消息,前端主动查询(拉)或者被动接收(推)用户所有未读的消息数。 + +![](https://img-blog.csdnimg.cn/img_convert/198443b7c2f609da3bdf5b507bca0918.png) + + +### 短轮询 + +轮询(`polling`)应该是实现消息推送方案中最简单的一种,这里我们暂且将轮询分为`短轮询`和`长轮询`。 + +短轮询很好理解,指定的时间间隔,由浏览器向服务器发出`HTTP`请求,服务器实时返回未读消息数据给客户端,浏览器再做渲染显示。 + + +![](https://files.mdnice.com/user/303/65699788-5f1c-4f9d-acea-9187a1f25b62.png) + + +一个简单的JS定时器就可以搞定,每秒钟请求一次未读消息数接口,返回的数据展示即可。 + +``` +setInterval(() => { + // 方法请求 + messageCount().then((res) => { + if (res.code === 200) { + this.messageCount = res.data + } + }) +}, 1000); +``` + + +是我们期望的效果,用短轮询实现固然简单,缺点也是显而易见,由于推送数据并不会频繁变更,无论后端此时是否有新的消息产生,客户端都会进行请求,势必会对服务端造成很大压力,浪费带宽和服务器资源。 + +![](https://files.mdnice.com/user/303/5738e243-a0fb-41fd-83fb-59f868b249b3.gif) + + +### 长轮询 + +长轮询是对上边短轮询的一种改进版本,之前我在[Nacos配置中心交互模型是 push 还是 pull ?(原理+源码分析)](https://mp.weixin.qq.com/s/94ftESkDoZI9gAGflLiGwg)一文中就详细介绍过,`Nacos`的配置中心就是基于长轮询方式实现的,可以说用的很溜了,感兴趣的可以了解下。 + + +短轮询的弊端是有太多无效的请求,那么如果控制住请求的频率是不是就行了? + +我们按照`Nacos`的思路简单实现一下,对于客户端发送的请求,服务端不再立即响应, + +![](https://files.mdnice.com/user/303/e60a84bc-029a-4d1b-b02d-49f0d9e98689.png) + + + + + + + + +https://mp.weixin.qq.com/s/94ftESkDoZI9gAGflLiGwg + +https://blog.csdn.net/xingxinggua9620/article/details/113565073 + +https://wenku.baidu.com/view/d4cb42deadf8941ea76e58fafab069dc502247a5.html + +### iframe流 + +iframe流就是在页面中插入一个隐藏的` +``` + +服务端直接组装html、js脚本数据向`response`写入就行了 + +``` +@Controller +@RequestMapping("/iframe") +public class IframeController { + @GetMapping(path = "message") + public void message(HttpServletResponse response) throws IOException, InterruptedException { + while (true) { + response.setHeader("Pragma", "no-cache"); + response.setDateHeader("Expires", 0); + response.setHeader("Cache-Control", "no-cache,no-store"); + response.setStatus(HttpServletResponse.SC_OK); + response.getWriter().print(" "); + } + } +} +``` + +但我个人不推荐,因为它在浏览器上会显示请求未加载完,图标会不停旋转,简直是强迫症杀手。 + +![](https://files.mdnice.com/user/303/c4887635-4e93-40a8-a929-5d1d8476f5ea.gif) + +### SSE (推荐的方式) + +很多人可能不知道,服务端向客户端推送消息,其实除了可以用`WebSocket`这种耳熟能详的机制外,还有一种服务器发送事件(`Server-sent events`),简称`SSE`。 + + +`SSE`它是基于`HTTP`协议的,我们知道一般意义上的HTTP协议是无法做到服务端主动向客户端推送消息的,但SSE是个例外,它变换了一种思路。 + +![](https://files.mdnice.com/user/303/785e576a-122c-4f7f-b494-f1e317fdd290.png) + + +SSE在服务器和客户端之间打开一个单向通道,服务端响应的不再是一次性的数据包而是`text/event-stream`类型的数据流信息,在有数据变更时从服务器流式传输到客户端。 + +整体的实现思路有点类似于在线视频播放,视频流会连续不断的推送到浏览器,你也可以理解成,客户端在完成一次用时很长(网络不畅)的下载。 + +![](https://files.mdnice.com/user/303/e51fb2c5-a713-450e-bdc3-98cee87b32e7.png) + +`SSE`与`WebSocket`作用相似,都可以建立服务端与浏览器之间的通信,实现服务端向客户端推送消息,但还是有些许不同: + +- SSE 是基于HTTP协议的,它们不需要特殊的协议或服务器实现即可工作;`WebSocket`需单独服务器来处理协议。 +- SSE 单向通信,只能由服务端向客户端单向通信;webSocket全双工通信,即通信的双方可以同时发送和接受信息。 +- SSE 实现简单开发成本低,无需引入其他组件;WebSocket传输数据需做二次解析,开发门槛高一些。 +- SSE 默认支持断线重连;WebSocket则需要自己实现。 +- SSE 只能传送文本消息,二进制数据需要经过编码后传送;WebSocket默认支持传送二进制数据。 + +**SSE与WebSocket该如何选择?** + +>技术并没有好坏之分,只有哪个更合适某个场景 + + +SSE 一直被隐藏起来的一个原因是因为后来的 API(如WebSockets )提供了更丰富的协议来执行双向、全双工通信。对于游戏、消息传递应用程序以及需要双向近乎实时更新的情况,拥有双向通道更具吸引力。但是,在某些情况下,不需要从客户端发送数据。您只需要一些服务器操作的更新。一些例子是朋友的状态更新、股票行情、新闻提要或其他自动数据推送机制(例如更新客户端 Web SQL 数据库或 IndexedDB 对象存储)。如果您需要将数据发送到服务器,XMLHttpRequest永远是朋友。 + +SSE 通过传统的 HTTP 发送。这意味着它们不需要特殊的协议或服务器实现即可工作。另一方面,WebSockets 需要全双工连接和新的 Web Socket 服务器来处理协议。此外,Server-Sent Events 具有 WebSockets 在设计上缺乏的多种功能,例如自动重新连接、事件 ID和发送任意事件的能力。 + +```javascript + +``` + +我们模拟服务端推送消息,看下客户端收到了消息,和我们预期的效果一致。 +![](https://files.mdnice.com/user/303/9d79d86d-c84d-43b1-aebc-53ecf384f7b8.gif) + + +SSE不支持 IE 浏览器,其他主流浏览器兼容性做的还不错。 +![](https://files.mdnice.com/user/303/27c6fd5d-a4c0-4a80-bb81-0aacd1c89f03.png) + + + +### MQTT + +### websocket + +http://demos.workerman.net/web-sender/ + + +### MQ + +### goEasy + +https://blog.csdn.net/windrainpy/article/details/105026780 + +https://www.kancloud.cn/fundebug/fundebug-blog/994905 + +https://www.cxyzjd.com/article/momolela/53113598 + +https://www.ruanyifeng.com/blog/2017/05/server-sent_events.html + +https://www.cnblogs.com/hzb462606/p/15422600.html + +https://developer.aliyun.com/article/693576 + +https://baijiahao.baidu.com/s?id=1710213737252683265&wfr=spider&for=pc + +https://blog.csdn.net/wuliu_forever/article/details/88883609 + +https://blog.csdn.net/hj7jay/article/details/89761047 \ No newline at end of file diff --git a/springboot-realtime-data/mvnw b/springboot-realtime-data/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/springboot-realtime-data/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-realtime-data/mvnw.cmd b/springboot-realtime-data/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/springboot-realtime-data/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/springboot-realtime-data/pom.xml b/springboot-realtime-data/pom.xml new file mode 100644 index 00000000..f45e3837 --- /dev/null +++ b/springboot-realtime-data/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-realtime-data + 0.0.1-SNAPSHOT + springboot-realtime-data + + + + org.springframework.boot + spring-boot-starter-websocket + + + com.google.guava + guava + 22.0 + + + + org.springframework.integration + spring-integration-mqtt + + + org.eclipse.paho + org.eclipse.paho.client.mqttv3 + [1.2.1,) + + + cn.hutool + hutool-all + 5.5.8 + compile + + + com.squareup.okhttp3 + okhttp + 4.9.0 + compile + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/SpringbootRealTimeApplication.java" b/springboot-realtime-data/src/main/java/com/realtime/SpringbootRealTimeApplication.java similarity index 94% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/SpringbootRealTimeApplication.java" rename to springboot-realtime-data/src/main/java/com/realtime/SpringbootRealTimeApplication.java index 50a4bfb6..dc6c4fce 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/SpringbootRealTimeApplication.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/SpringbootRealTimeApplication.java @@ -1,4 +1,4 @@ -package com.springboot101; +package com.realtime; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/springboot-realtime-data/src/main/java/com/realtime/config/IotMqttProducerConfig.java b/springboot-realtime-data/src/main/java/com/realtime/config/IotMqttProducerConfig.java new file mode 100644 index 00000000..18ac9ce0 --- /dev/null +++ b/springboot-realtime-data/src/main/java/com/realtime/config/IotMqttProducerConfig.java @@ -0,0 +1,45 @@ +package com.realtime.config; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.integration.annotation.ServiceActivator; +import org.springframework.integration.channel.DirectChannel; +import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory; +import org.springframework.integration.mqtt.core.MqttPahoClientFactory; +import org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler; +import org.springframework.messaging.MessageChannel; +import org.springframework.messaging.MessageHandler; + +/** + * @Author: xinzhifu + * @Description: + */ +@Configuration +public class IotMqttProducerConfig { + + @Autowired + private MqttConfig mqttConfig; + + @Bean + public MqttPahoClientFactory mqttClientFactory() { + DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory(); + factory.setServerURIs(mqttConfig.getServers()); + return factory; + } + + @Bean + public MessageChannel iotMqttInputChannel() { + return new DirectChannel(); + } + + @Bean + @ServiceActivator(inputChannel = "iotMqttInputChannel") + public MessageHandler mqttOutbound() { + MqttPahoMessageHandler messageHandler = new MqttPahoMessageHandler(mqttConfig.getServerClientId(), mqttClientFactory()); + messageHandler.setAsync(false); + messageHandler.setDefaultQos(2); + messageHandler.setDefaultTopic(mqttConfig.getDefaultTopic()); + return messageHandler; + } +} diff --git a/springboot-realtime-data/src/main/java/com/realtime/config/IotMqttSubscriberConfig.java b/springboot-realtime-data/src/main/java/com/realtime/config/IotMqttSubscriberConfig.java new file mode 100644 index 00000000..2411573b --- /dev/null +++ b/springboot-realtime-data/src/main/java/com/realtime/config/IotMqttSubscriberConfig.java @@ -0,0 +1,71 @@ +//package com.mqtt.config; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.integration.annotation.ServiceActivator; +//import org.springframework.integration.channel.DirectChannel; +//import org.springframework.integration.core.MessageProducer; +//import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory; +//import org.springframework.integration.mqtt.core.MqttPahoClientFactory; +//import org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter; +//import org.springframework.integration.mqtt.support.DefaultPahoMessageConverter; +//import org.springframework.messaging.MessageChannel; +//import org.springframework.messaging.MessageHandler; +//import org.springframework.messaging.MessagingException; +// +///** +// * @Author: xiaofu +// * @Description: 消息订阅配置 +// * @date 2020/6/8 18:24 +// */ +//@Configuration +//public class IotMqttSubscriberConfig { +// +// @Autowired +// private MqttConfig mqttConfig; +// +// @Bean +// public MqttPahoClientFactory mqttClientFactory() { +// DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory(); +// factory.setServerURIs(mqttConfig.getServers()); +// return factory; +// } +// +// @Bean +// public MessageChannel iotMqttInputChannel() { +// return new DirectChannel(); +// } +// +// @Bean +// public MessageProducer inbound() { +// MqttPahoMessageDrivenChannelAdapter adapter = new MqttPahoMessageDrivenChannelAdapter(mqttConfig.getClientId(), mqttClientFactory(), mqttConfig.getDefaultTopic()); +// adapter.setCompletionTimeout(5000); +// adapter.setConverter(new DefaultPahoMessageConverter()); +// adapter.setQos(2); +// adapter.setOutputChannel(iotMqttInputChannel()); +// return adapter; +// } +// +// /** +// * @author xiaofu +// * @description 消息订阅 +// * @date 2020/6/8 18:20 +// */ +// @Bean +// @ServiceActivator(inputChannel = "iotMqttInputChannel") +// public MessageHandler handlerTest() { +// +// return message -> { +// try { +// String string = message.getPayload().toString(); +// System.out.println("接收到消息:" + string); +// } catch (MessagingException ex) { +// //logger.info(ex.getMessage()); +// } +// }; +// +// } +//} +// +// diff --git a/springboot-realtime-data/src/main/java/com/realtime/config/MqttConfig.java b/springboot-realtime-data/src/main/java/com/realtime/config/MqttConfig.java new file mode 100644 index 00000000..cba7ab5a --- /dev/null +++ b/springboot-realtime-data/src/main/java/com/realtime/config/MqttConfig.java @@ -0,0 +1,40 @@ +package com.realtime.config; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.integration.annotation.IntegrationComponentScan; +import org.springframework.stereotype.Component; + +/** + * @Author: xinzhifu + * @Description: 基础配置类 + * @date 2020/6/8 18:25 + */ +@Getter +@Setter +@Component +@IntegrationComponentScan +@ConfigurationProperties(prefix = "iot.mqtt") +public class MqttConfig { + + /** + * 服务地址 + */ + private String servers; + + /** + * 客户端id + */ + private String clientId; + + /** + * 服务端id + */ + private String serverClientId; + + /** + * 默认主题 + */ + private String defaultTopic; +} diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/iframe/IframeController.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/iframe/IframeController.java similarity index 81% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/iframe/IframeController.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/iframe/IframeController.java index 6f9bfaf0..f59debcb 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/iframe/IframeController.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/iframe/IframeController.java @@ -1,10 +1,16 @@ -package com.springboot101.controller.iframe; +package com.realtime.controller.iframe; +import com.realtime.controller.sse.SseEmitterUtils; +import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.Calendar; +import java.util.Timer; +import java.util.TimerTask; import java.util.concurrent.atomic.AtomicInteger; @CrossOrigin("*") diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/mqtt/MqttController.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/mqtt/MqttController.java similarity index 87% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/mqtt/MqttController.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/mqtt/MqttController.java index 92a24bf4..72e9b9b6 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/mqtt/MqttController.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/mqtt/MqttController.java @@ -1,7 +1,7 @@ -package com.springboot101.controller.mqtt; +package com.realtime.controller.mqtt; -import com.springboot101.producer.IotMqttGateway; +import com.realtime.producer.IotMqttGateway; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.CrossOrigin; @@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.ResponseBody; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: * @date 2020/6/8 18:26 */ diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/AsyncConfig.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/polling/AsyncConfig.java similarity index 95% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/AsyncConfig.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/polling/AsyncConfig.java index 8291bebe..856077ab 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/AsyncConfig.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/polling/AsyncConfig.java @@ -1,4 +1,4 @@ -package com.springboot101.controller.polling; +package com.realtime.controller.polling; import org.springframework.context.annotation.Bean; diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/AsyncRequestTimeoutHandler.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/polling/AsyncRequestTimeoutHandler.java similarity index 94% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/AsyncRequestTimeoutHandler.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/polling/AsyncRequestTimeoutHandler.java index e0d1d85e..979f352a 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/AsyncRequestTimeoutHandler.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/polling/AsyncRequestTimeoutHandler.java @@ -1,4 +1,4 @@ -package com.springboot101.controller.polling; +package com.realtime.controller.polling; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ControllerAdvice; diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/PollingController.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/polling/PollingController.java similarity index 92% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/PollingController.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/polling/PollingController.java index c0638e2b..8e87f443 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/polling/PollingController.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/polling/PollingController.java @@ -1,18 +1,20 @@ -package com.springboot101.controller.polling; +package com.realtime.controller.polling; import cn.hutool.core.date.DateUtil; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; +import org.apache.commons.lang3.time.DateUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import org.springframework.web.context.request.async.AsyncRequestTimeoutException; import org.springframework.web.context.request.async.DeferredResult; +import java.io.IOException; import java.util.Collection; import java.util.Date; -import static com.springboot101.controller.polling.AsyncConfig.TIME_OUT; +import static com.realtime.controller.polling.AsyncConfig.TIME_OUT; @CrossOrigin("*") @Controller diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/SocketOpsController.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/socket/SocketOpsController.java similarity index 94% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/SocketOpsController.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/socket/SocketOpsController.java index 09350ca5..feb87797 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/SocketOpsController.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/socket/SocketOpsController.java @@ -1,4 +1,4 @@ -package com.springboot101.controller.socket; +package com.realtime.controller.socket; import com.alibaba.fastjson.JSONObject; import org.springframework.stereotype.Controller; diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/WebSocketConfig.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/socket/WebSocketConfig.java similarity index 85% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/WebSocketConfig.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/socket/WebSocketConfig.java index 255ad80d..21677e0b 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/WebSocketConfig.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/socket/WebSocketConfig.java @@ -1,11 +1,11 @@ -package com.springboot101.controller.socket; +package com.realtime.controller.socket; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.socket.server.standard.ServerEndpointExporter; /** - * @Auther: 公众号:程序员小富 + * @Auther: xiaofu * @Date: 2022/7/18 14:20 * @Description: */ diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/WebSocketServer.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/socket/WebSocketServer.java similarity index 98% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/WebSocketServer.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/socket/WebSocketServer.java index 003dc59c..c14182b8 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/socket/WebSocketServer.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/socket/WebSocketServer.java @@ -1,4 +1,4 @@ -package com.springboot101.controller.socket; +package com.realtime.controller.socket; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/sse/SSEController.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/sse/SSEController.java similarity index 96% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/sse/SSEController.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/sse/SSEController.java index d56135af..a31eb5ea 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/sse/SSEController.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/sse/SSEController.java @@ -1,4 +1,4 @@ -package com.springboot101.controller.sse; +package com.realtime.controller.sse; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/sse/SseEmitterUtils.java" b/springboot-realtime-data/src/main/java/com/realtime/controller/sse/SseEmitterUtils.java similarity index 97% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/sse/SseEmitterUtils.java" rename to springboot-realtime-data/src/main/java/com/realtime/controller/sse/SseEmitterUtils.java index f72f0bce..11c5c2c2 100644 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/controller/sse/SseEmitterUtils.java" +++ b/springboot-realtime-data/src/main/java/com/realtime/controller/sse/SseEmitterUtils.java @@ -1,9 +1,10 @@ -package com.springboot101.controller.sse; +package com.realtime.controller.sse; import cn.hutool.core.map.MapUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; import org.springframework.stereotype.Component; +import org.springframework.web.context.request.async.AsyncRequestTimeoutException; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; import java.io.IOException; @@ -16,7 +17,7 @@ import java.util.function.Consumer; /** - * @Auther: 公众号:程序员小富 + * @Auther: xiaofu * @Date: 2022/7/12 14:16 * @Description: */ diff --git a/springboot-realtime-data/src/main/java/com/realtime/producer/IotMqttGateway.java b/springboot-realtime-data/src/main/java/com/realtime/producer/IotMqttGateway.java new file mode 100644 index 00000000..4b5464e9 --- /dev/null +++ b/springboot-realtime-data/src/main/java/com/realtime/producer/IotMqttGateway.java @@ -0,0 +1,23 @@ +package com.realtime.producer; + +import org.springframework.integration.annotation.MessagingGateway; +import org.springframework.integration.mqtt.support.MqttHeaders; +import org.springframework.messaging.handler.annotation.Header; + +/** + * @author xiaofu + * @description rabbitmq mqtt协议网关接口 + * @date 2020/6/8 18:26 + */ +@MessagingGateway(defaultRequestChannel = "iotMqttInputChannel") +public interface IotMqttGateway { + + void sendMessage2Mqtt(String data); + + void sendMessage2Mqtt(String data, @Header(MqttHeaders.TOPIC) String topic); + + void sendMessage2Mqtt(@Header(MqttHeaders.TOPIC) String topic, @Header(MqttHeaders.QOS) int qos, String payload); +} + + + diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/application.yml" b/springboot-realtime-data/src/main/resources/application.yml similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/application.yml" rename to springboot-realtime-data/src/main/resources/application.yml diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/js/follow.js" b/springboot-realtime-data/src/main/resources/static/js/follow.js similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/js/follow.js" rename to springboot-realtime-data/src/main/resources/static/js/follow.js diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/js/gg_bd_ad_720x90-2.js" b/springboot-realtime-data/src/main/resources/static/js/gg_bd_ad_720x90-2.js similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/js/gg_bd_ad_720x90-2.js" rename to springboot-realtime-data/src/main/resources/static/js/gg_bd_ad_720x90-2.js diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/js/gg_bd_ad_720x90.js" b/springboot-realtime-data/src/main/resources/static/js/gg_bd_ad_720x90.js similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/js/gg_bd_ad_720x90.js" rename to springboot-realtime-data/src/main/resources/static/js/gg_bd_ad_720x90.js diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/js/index.js" b/springboot-realtime-data/src/main/resources/static/js/index.js similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/js/index.js" rename to springboot-realtime-data/src/main/resources/static/js/index.js diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/push.css" b/springboot-realtime-data/src/main/resources/static/push.css similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/push.css" rename to springboot-realtime-data/src/main/resources/static/push.css diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/style.css" b/springboot-realtime-data/src/main/resources/static/style.css similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/style.css" rename to springboot-realtime-data/src/main/resources/static/style.css diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/vue.min.js" b/springboot-realtime-data/src/main/resources/static/vue.min.js similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/static/vue.min.js" rename to springboot-realtime-data/src/main/resources/static/vue.min.js diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/1.html" b/springboot-realtime-data/src/main/resources/templates/1.html similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/1.html" rename to springboot-realtime-data/src/main/resources/templates/1.html diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/iframe.html" b/springboot-realtime-data/src/main/resources/templates/iframe.html similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/iframe.html" rename to springboot-realtime-data/src/main/resources/templates/iframe.html diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/mqtt.html" b/springboot-realtime-data/src/main/resources/templates/mqtt.html similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/mqtt.html" rename to springboot-realtime-data/src/main/resources/templates/mqtt.html diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/polling.html" b/springboot-realtime-data/src/main/resources/templates/polling.html similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/polling.html" rename to springboot-realtime-data/src/main/resources/templates/polling.html diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/socket.html" b/springboot-realtime-data/src/main/resources/templates/socket.html similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/socket.html" rename to springboot-realtime-data/src/main/resources/templates/socket.html diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/sse.html" b/springboot-realtime-data/src/main/resources/templates/sse.html similarity index 100% rename from "springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/resources/templates/sse.html" rename to springboot-realtime-data/src/main/resources/templates/sse.html diff --git a/springboot-redisson-lock/.gitignore b/springboot-redisson-lock/.gitignore new file mode 100644 index 00000000..549e00a2 --- /dev/null +++ b/springboot-redisson-lock/.gitignore @@ -0,0 +1,33 @@ +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/ diff --git a/springboot-redisson-lock/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-redisson-lock/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..1d45a896 --- /dev/null +++ b/springboot-redisson-lock/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-redisson-lock/.mvn/wrapper/maven-wrapper.jar b/springboot-redisson-lock/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-redisson-lock/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-redisson-lock/.mvn/wrapper/maven-wrapper.properties b/springboot-redisson-lock/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-redisson-lock/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/springboot-redisson-lock/mvnw b/springboot-redisson-lock/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/springboot-redisson-lock/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-redisson-lock/mvnw.cmd b/springboot-redisson-lock/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/springboot-redisson-lock/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/springboot-redisson-lock/pom.xml b/springboot-redisson-lock/pom.xml new file mode 100644 index 00000000..b8ea6b98 --- /dev/null +++ b/springboot-redisson-lock/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-redisson-lock + 0.0.1-SNAPSHOT + springboot-redisson-lock + + + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.redisson + redisson-spring-boot-starter + 3.11.4 + + + + org.springframework.boot + spring-boot-starter-data-redis + 2.3.1.RELEASE + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/SpringbootRedissonLockApplication.java b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/SpringbootRedissonLockApplication.java similarity index 89% rename from springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/SpringbootRedissonLockApplication.java rename to springboot-redisson-lock/src/main/java/com/xiaofu/redisson/SpringbootRedissonLockApplication.java index d0b726e1..3928f33a 100644 --- a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/SpringbootRedissonLockApplication.java +++ b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/SpringbootRedissonLockApplication.java @@ -1,4 +1,4 @@ -package com.springboot101.redisson; +package com.xiaofu.redisson; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/config/RedissonConfig.java b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/config/RedissonConfig.java similarity index 80% rename from springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/config/RedissonConfig.java rename to springboot-redisson-lock/src/main/java/com/xiaofu/redisson/config/RedissonConfig.java index efad9475..6a48d14a 100644 --- a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/config/RedissonConfig.java +++ b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/config/RedissonConfig.java @@ -1,4 +1,4 @@ -package com.springboot101.redisson.config; +package com.xiaofu.redisson.config; import org.redisson.Redisson; import org.redisson.api.RedissonClient; @@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: */ @Configuration diff --git a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/controller/LiveObjectController.java b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/controller/LiveObjectController.java similarity index 92% rename from springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/controller/LiveObjectController.java rename to springboot-redisson-lock/src/main/java/com/xiaofu/redisson/controller/LiveObjectController.java index e87c03b6..c37a7cfc 100644 --- a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/controller/LiveObjectController.java +++ b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/controller/LiveObjectController.java @@ -1,7 +1,7 @@ -package com.springboot101.redisson.controller; +package com.xiaofu.redisson.controller; -import com.springboot101.redisson.entity.OrderInfo; +import com.xiaofu.redisson.entity.OrderInfo; import org.redisson.api.RLiveObjectService; import org.redisson.api.RedissonClient; import org.springframework.beans.factory.annotation.Autowired; @@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.ResponseBody; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: */ @Controller diff --git a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/controller/LockController.java b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/controller/LockController.java similarity index 98% rename from springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/controller/LockController.java rename to springboot-redisson-lock/src/main/java/com/xiaofu/redisson/controller/LockController.java index 5ed87564..37db368e 100644 --- a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/controller/LockController.java +++ b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/controller/LockController.java @@ -1,4 +1,4 @@ -package com.springboot101.redisson.controller; +package com.xiaofu.redisson.controller; import org.redisson.api.RFuture; import org.redisson.api.RLock; @@ -13,7 +13,7 @@ import java.util.concurrent.TimeUnit; /** - * @Author: 公众号:程序员小富 + * @Author: xiaofu * @Description: */ @Controller diff --git a/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/entity/OrderInfo.java b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/entity/OrderInfo.java new file mode 100644 index 00000000..19101865 --- /dev/null +++ b/springboot-redisson-lock/src/main/java/com/xiaofu/redisson/entity/OrderInfo.java @@ -0,0 +1,46 @@ +package com.xiaofu.redisson.entity; + +import org.redisson.api.annotation.REntity; +import org.redisson.api.annotation.RId; +import org.redisson.api.annotation.RIndex; + +/** + * @Author: xiaofu + * @Description: + */ +@REntity +public class OrderInfo { + + @RId + private Integer id; + + @RIndex + private String name; + + @RIndex + private Integer age; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getAge() { + return age; + } + + public void setAge(Integer age) { + this.age = age; + } +} diff --git a/springboot101/redis/springboot-redisson-lock/src/main/resources/application.yml b/springboot-redisson-lock/src/main/resources/application.yml similarity index 100% rename from springboot101/redis/springboot-redisson-lock/src/main/resources/application.yml rename to springboot-redisson-lock/src/main/resources/application.yml diff --git a/springboot101/redis/springboot-redisson-lock/src/main/resources/redisson.yml b/springboot-redisson-lock/src/main/resources/redisson.yml similarity index 88% rename from springboot101/redis/springboot-redisson-lock/src/main/resources/redisson.yml rename to springboot-redisson-lock/src/main/resources/redisson.yml index 77d09ba2..1e6a8a18 100644 --- a/springboot101/redis/springboot-redisson-lock/src/main/resources/redisson.yml +++ b/springboot-redisson-lock/src/main/resources/redisson.yml @@ -6,10 +6,10 @@ "timeout":3000, "retryAttempts":3, "retryInterval":1500, - "password":"redispw", + "password":"123456", "subscriptionsPerConnection":5, "clientName":null, - "address": "redis://127.0.0.1:55001", + "address": "redis://127.0.0.1:6379", "subscriptionConnectionMinimumIdleSize":1, "subscriptionConnectionPoolSize":50, "connectionMinimumIdleSize":32, diff --git a/springboot-seata-transaction/README.md b/springboot-seata-transaction/README.md new file mode 100644 index 00000000..3faacbc0 --- /dev/null +++ b/springboot-seata-transaction/README.md @@ -0,0 +1,397 @@ +# springboot-seata-transaction +### 概览 +##### 1.整合seata的demo,此demo都配置好了,拉下来按照步骤,直接可以跑起来观察效果。 + +##### 2.自己项目整合Seata,主要步骤如下: +- 1.[下载seata-server](https://github.com/seata/seata/releases),修改server配置 +- 2.client端(你自己的项目),引入配置文件,修改配置文件(注意不要遗漏,可参考下方几个关键步骤) +- 3.数据源代理设置 +- 4.创建数据库表 +- 5.启动注册中心,启动server,启动client + +##### 关于调用成环和seata-server HA,见最后部分 + +### 1.此demo技术选型及版本信息 + +注册中心:eureka + +服务间调用:feign + +持久层:mybatis + +数据库:mysql 5.7.20 + +Springboot:2.1.7.RELEASE + +Springcloud:Greenwich.SR2 + +jdk:1.8 + +seata:0.8 + +使用不同组件,配置情况不同,可参考其他sample; + +### 2.demo概况 +demo分为四个项目,单独启动。 + +- eureka:作为注册中心 +- order:订单服务,用户下单后,会创建一个订单添加在order数据库,同时会扣减库存storage,扣减账户account; +- storage:库存服务,用户扣减库存; +- account:账户服务,用于扣减账户余额; + +order服务关键代码如下: +```java + @Override + @GlobalTransactional(name = "fsp-create-order",rollbackFor = Exception.class) //此注解开启全局事务 + public void create(Order order) { + //本地方法 创建订单 + orderDao.create(order); + //远程方法 扣减库存 + storageApi.decrease(order.getProductId(),order.getCount()); + //远程方法 扣减账户余额 可在accountServiceImpl中模拟异常 + accountApi.decrease(order.getUserId(),order.getMoney()); + } +``` +### 3.使用步骤 +- 1.拉取本demo代码 git clone xxxx; +- 2.[下载seata-server](https://github.com/seata/seata/releases); +- 3.执行每个项目下的建表语句,resource下xx.sql文件; +- 4.seata相关建表语句见下文说明; + +### 4.seata server端配置信息修改 +seata-server中,/conf目录下,有两个配置文件,需要结合自己的情况来修改: + +##### 1.file.conf + +里面有事务组配置,锁配置,事务日志存储等相关配置信息,由于此demo使用db存储事务信息,我们这里要修改store中的配置: +```java +## transaction log store +store { + ## store mode: file、db + mode = "db" 修改这里,表明事务信息用db存储 + + ## file store 当mode=db时,此部分配置就不生效了,这是mode=file的配置 + file { + dir = "sessionStore" + + # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions + max-branch-session-size = 16384 + # globe session size , if exceeded throws exceptions + max-global-session-size = 512 + # file buffer size , if exceeded allocate new buffer + file-write-buffer-cache-size = 16384 + # when recover batch read size + session.reload.read_size = 100 + # async, sync + flush-disk-mode = async + } + + ## database store mode=db时,事务日志存储会存储在这个配置的数据库里 + db { + ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp) etc. + datasource = "dbcp" + ## mysql/oracle/h2/oceanbase etc. + db-type = "mysql" + driver-class-name = "com.mysql.jdbc.Driver" + url = "jdbc:mysql://116.62.62.26/seat-server" 修改这里 + user = "root" 修改这里 + password = "root" 修改这里 + min-conn = 1 + max-conn = 3 + global.table = "global_table" + branch.table = "branch_table" + lock-table = "lock_table" + query-limit = 100 + } +} +``` + +由于此demo我们使用db模式存储事务日志,所以,我们要创建三张表:global_table,branch_table,lock_table,建表sql在seata/seata/script/server/db/mysql.sql; + +由于存储undo_log是在业务库中,所以在每个业务库中,还要创建undo_log表,建表sql在/conf/db_undo_log.sql中。 + +由于我自定义了事务组名称,所以这里也做了修改: +```java +service { + #vgroup->rgroup + vgroup_mapping.fsp_tx_group = "default" 修改这里,fsp_tx_group这个事务组名称是我自定义的,一定要与client端的这个配置一致!否则会报错! + #only support single node + default.grouplist = "127.0.0.1:8091" 此配置作用参考:https://blog.csdn.net/weixin_39800144/article/details/100726116 + #degrade current not support + enableDegrade = false + #disable + disable = false + #unit ms,s,m,h,d represents milliseconds, seconds, minutes, hours, days, default permanent + max.commit.retry.timeout = "-1" + max.rollback.retry.timeout = "-1" +} +``` +其他的可以先使用默认值。 + +##### 2.registry.conf + +registry{}中是注册中心相关配置,config{}中是配置中心相关配置。seata中,注册中心和配置中心是分开实现的,是两个东西。 + +我们这里用eureka作注册中心,所以,只用修改registry{}中的: +```java +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" 修改这里,指明注册中心使用什么 + + nacos { + serverAddr = "localhost" + namespace = "" + cluster = "default" + } + eureka { + serviceUrl = "http://localhost:8761/eureka" 修改这里 + application = "default" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } + etcd3 { + cluster = "default" + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + application = "default" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + cluster = "default" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } +} +``` +其他的配置可以暂时使用默认值。 + +如果是在windows下启动seata-server,现在已经完成配置修改了,等eureka启动后,就可以启动seata-server了:执行/bin/seata-server.bat即可。 + +### 5.client端相关配置 +#### 1.普通配置 +client端的几个服务,都是普通的springboot整合了springCloud组件的正常服务,所以,你需要配置eureka,数据库,mapper扫描等,即使不使用seata,你也需要做,这里不做特殊说明,看代码就好。 + +#### 2.特殊配置 +##### 1.application.yml +以order服务为例,除了常规配置外,这里还要配置下事务组信息: +```java +spring: + application: + name: order-server + cloud: + alibaba: + seata: + tx-service-group: fsp_tx_group 这个fsp_tx_group自定义命名很重要,server,client都要保持一致 +``` +##### 2.file.conf +自己新建的项目是没有这个配置文件的,copy过来,修改下面配置: +```java +service { + #vgroup->rgroup + vgroup_mapping.fsp_tx_group = "default" 这个fsp_tx_group自定义命名很重要,server,client都要保持一致 + #only support single node + default.grouplist = "127.0.0.1:8091" + #degrade current not support + enableDegrade = false + #disable + disable = false + disableGlobalTransaction = false +} +``` +##### 3.registry.conf + +使用eureka做注册中心,仅需要修改eureka的配置即可: +```java +registry { + # file 、nacos 、eureka、redis、zk + type = "eureka" 修改这里 + + nacos { + serverAddr = "localhost" + namespace = "public" + cluster = "default" + } + eureka { + serviceUrl = "http://localhost:8761/eureka" 修改这里 + application = "default" + weight = "1" + } + redis { + serverAddr = "localhost:6381" + db = "0" + } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + } + file { + name = "file.conf" + } +} +``` +其他的使用默认值就好。 + +#### 3.数据源代理 +这个是要特别注意的地方,seata对数据源做了代理和接管,在每个参与分布式事务的服务中,都要做如下配置: +```java +/** + * 数据源代理 + * @author wangzhongxiang + */ +@Configuration +public class DataSourceConfiguration { + + @Bean + @ConfigurationProperties(prefix = "spring.datasource") + public DataSource druidDataSource(){ + DruidDataSource druidDataSource = new DruidDataSource(); + return druidDataSource; + } + + @Primary + @Bean("dataSource") + public DataSourceProxy dataSource(DataSource druidDataSource){ + return new DataSourceProxy(druidDataSource); + } + + @Bean + public SqlSessionFactory sqlSessionFactory(DataSourceProxy dataSourceProxy)throws Exception{ + SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); + sqlSessionFactoryBean.setDataSource(dataSourceProxy); + sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver() + .getResources("classpath*:/mapper/*.xml")); + sqlSessionFactoryBean.setTransactionFactory(new SpringManagedTransactionFactory()); + return sqlSessionFactoryBean.getObject(); + } + +} +``` + +### 6.启动测试 +- 1.启动eureka; +- 2.启动seata-server; +- 3.启动order,storage,account服务; +- 4.访问:http://localhost:8180/order/create?userId=1&productId=1&count=10&money=100 + +然后可以模拟正常情况,异常情况,超时情况等,观察数据库即可。 + +这个demo,未做各种优化,如果压测,需要修改和优化一些配置,压测出错了,不一定是seata的锅,自己先排查,再去群里问问。 + +### 7.日志 +正常情况: +##### 1.order +```java +2019-09-06 15:44:33.536 INFO 53904 --- [io-8080-exec-10] i.seata.tm.api.DefaultGlobalTransaction : Begin new global transaction [192.168.158.133:8091:2021468859] +2019-09-06 15:44:33.536 INFO 53904 --- [io-8080-exec-10] c.j.order.service.OrderServiceImpl : ------->交易开始 +2019-09-06 15:44:34.376 INFO 53904 --- [io-8080-exec-10] c.j.order.service.OrderServiceImpl : ------->交易结束 +2019-09-06 15:44:34.593 INFO 53904 --- [io-8080-exec-10] i.seata.tm.api.DefaultGlobalTransaction : [192.168.158.133:8091:2021468859] commit status:Committed +2019-09-06 15:44:35.296 INFO 53904 --- [atch_RMROLE_6_8] i.s.core.rpc.netty.RmMessageListener : onMessage:xid=192.168.158.133:8091:2021468859,branchId=2021468861,branchType=AT,resourceId=jdbc:mysql://116.62.62.26/seat-order,applicationData=null +2019-09-06 15:44:35.297 INFO 53904 --- [atch_RMROLE_6_8] io.seata.rm.AbstractRMHandler : Branch committing: 192.168.158.133:8091:2021468859 2021468861 jdbc:mysql://116.62.62.26/seat-order null +2019-09-06 15:44:35.297 INFO 53904 --- [atch_RMROLE_6_8] io.seata.rm.AbstractRMHandler : Branch commit result: PhaseTwo_Committed +``` +##### 2.storage +```java +2019-09-06 15:44:33.776 INFO 9704 --- [nio-8082-exec-1] c.j.storage.service.StorageServiceImpl : ------->扣减库存开始 +2019-09-06 15:44:34.030 INFO 9704 --- [nio-8082-exec-1] c.j.storage.service.StorageServiceImpl : ------->扣减库存结束 +2019-09-06 15:44:35.422 INFO 9704 --- [atch_RMROLE_5_8] i.s.core.rpc.netty.RmMessageListener : onMessage:xid=192.168.158.133:8091:2021468859,branchId=2021468864,branchType=AT,resourceId=jdbc:mysql://116.62.62.26/seat-storage,applicationData=null +2019-09-06 15:44:35.423 INFO 9704 --- [atch_RMROLE_5_8] io.seata.rm.AbstractRMHandler : Branch committing: 192.168.158.133:8091:2021468859 2021468864 jdbc:mysql://116.62.62.26/seat-storage null +2019-09-06 15:44:35.423 INFO 9704 --- [atch_RMROLE_5_8] io.seata.rm.AbstractRMHandler : Branch commit result: PhaseTwo_Committed +``` + +##### 3.account +```java +2019-09-06 15:44:34.039 INFO 36556 --- [nio-8081-exec-5] c.j.account.service.AccountServiceImpl : ------->扣减账户开始 +2019-09-06 15:44:34.039 INFO 36556 --- [nio-8081-exec-5] c.j.account.service.AccountServiceImpl : ------->扣减账户结束 +2019-09-06 15:44:35.545 INFO 36556 --- [atch_RMROLE_3_8] i.s.core.rpc.netty.RmMessageListener : onMessage:xid=192.168.158.133:8091:2021468859,branchId=2021468867,branchType=AT,resourceId=jdbc:mysql://116.62.62.26/seat-account,applicationData=null +2019-09-06 15:44:35.545 INFO 36556 --- [atch_RMROLE_3_8] io.seata.rm.AbstractRMHandler : Branch committing: 192.168.158.133:8091:2021468859 2021468867 jdbc:mysql://116.62.62.26/seat-account null +2019-09-06 15:44:35.545 INFO 36556 --- [atch_RMROLE_3_8] io.seata.rm.AbstractRMHandler : Branch commit result: PhaseTwo_Committed +``` +### 8.模拟异常 +在AccountServiceImpl中模拟异常情况,然后可以查看日志 +```java + /** + * 扣减账户余额 + * @param userId 用户id + * @param money 金额 + */ + @Override + public void decrease(Long userId, BigDecimal money) { + LOGGER.info("------->扣减账户开始"); +// try { +// Thread.sleep(30*1000); +// } catch (InterruptedException e) { +// e.printStackTrace(); +// } + LOGGER.info("------->扣减账户结束"); + accountDao.decrease(userId,money); + } +``` +### 9.调用成环 +前面的调用链为order->storage->account; +这里测试的成环是指order->storage->account->order, +这里的account服务又会回头去修改order在前面添加的数据。 +经过测试,是支持此种场景的。 +```java + /** + * 扣减账户余额 + * @param userId 用户id + * @param money 金额 + */ + @Override + public void decrease(Long userId, BigDecimal money) { + LOGGER.info("------->扣减账户开始account中"); + //模拟超时异常,全局事务回滚 +// try { +// Thread.sleep(30*1000); +// } catch (InterruptedException e) { +// e.printStackTrace(); +// } + accountDao.decrease(userId,money); + LOGGER.info("------->扣减账户结束account中"); + + //修改订单状态,此调用会导致调用成环 + LOGGER.info("修改订单状态开始"); + String mes = orderApi.update(userId, money.multiply(new BigDecimal("0.09")),0); + LOGGER.info("修改订单状态结束:{}",mes); + } +``` +在最初的order会创建一个订单,然后扣减库存,然后扣减账户,账户扣减完,会回头修改订单的金额和状态,这样调用就成环了。 + +### 10.seata-server HA +下载seata server包,地址:https://github.com/seata/seata/releases; + +部署集群,第一台和第二台配置相同,在server端的registry.conf中,注意: +```java +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" +...... + eureka { + serviceUrl = "http://192.168.xx.xx:8761/eureka" //两台tcc相同,注册中心的地址 + application = "default" //两台tc相同 + weight = "1" //权重,截至0.9版本,暂时不支持此参数 + } + ...... +``` +注意上述配置和client的配置要一致,2台和多台情况相同。 + +0.9及之前版本,多tc时,tc会误报异常,此问题0.9之后已经修复,之后的版本应该不会出现此问题。 diff --git a/springboot-seata-transaction/account-server/.idea/checkstyle-idea.xml b/springboot-seata-transaction/account-server/.idea/checkstyle-idea.xml new file mode 100644 index 00000000..034029da --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/checkstyle-idea.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/compiler.xml b/springboot-seata-transaction/account-server/.idea/compiler.xml new file mode 100644 index 00000000..d9ba108c --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/encodings.xml b/springboot-seata-transaction/account-server/.idea/encodings.xml new file mode 100644 index 00000000..b26911bd --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/inspectionProfiles/Project_Default.xml b/springboot-seata-transaction/account-server/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..6560a989 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/kotlinc.xml b/springboot-seata-transaction/account-server/.idea/kotlinc.xml new file mode 100644 index 00000000..1c24f9a8 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml new file mode 100644 index 00000000..b8d93d8e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml new file mode 100644 index 00000000..30ff5cb7 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__cglib_cglib_3_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__cglib_cglib_3_1.xml new file mode 100644 index 00000000..bd3cddd6 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__cglib_cglib_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml new file mode 100644 index 00000000..6fec8f43 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml new file mode 100644 index 00000000..9eb8596a --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml new file mode 100644 index 00000000..cd1d1f55 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml new file mode 100644 index 00000000..4c277844 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml new file mode 100644 index 00000000..74fcd43e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml new file mode 100644 index 00000000..169a0af7 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml new file mode 100644 index 00000000..bbd3a886 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml new file mode 100644 index 00000000..06441f49 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml new file mode 100644 index 00000000..55b3f7bf --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml new file mode 100644 index 00000000..4970251e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml new file mode 100644 index 00000000..7fc80365 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml new file mode 100644 index 00000000..23c806cf --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml new file mode 100644 index 00000000..fe2eb1bd --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml new file mode 100644 index 00000000..c08dcae2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml new file mode 100644 index 00000000..04210c56 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml new file mode 100644 index 00000000..b1ec3959 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml new file mode 100644 index 00000000..0bc971a4 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml new file mode 100644 index 00000000..1c380d0b --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml new file mode 100644 index 00000000..2888f96d --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml new file mode 100644 index 00000000..df0c40d4 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml new file mode 100644 index 00000000..36e948e2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml new file mode 100644 index 00000000..e631133b --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml new file mode 100644 index 00000000..4e15702e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml new file mode 100644 index 00000000..e956197d --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml new file mode 100644 index 00000000..c06f9997 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml new file mode 100644 index 00000000..06e92304 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml new file mode 100644 index 00000000..f19f6eb3 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml new file mode 100644 index 00000000..bd9061c2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml new file mode 100644 index 00000000..0a20711e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml new file mode 100644 index 00000000..0adf6784 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml new file mode 100644 index 00000000..588dca0f --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml new file mode 100644 index 00000000..a1a320cd --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml new file mode 100644 index 00000000..85ba8c99 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml new file mode 100644 index 00000000..c8b512e3 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml new file mode 100644 index 00000000..09c6f6e0 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml new file mode 100644 index 00000000..28cf8800 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml new file mode 100644 index 00000000..eff738de --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml new file mode 100644 index 00000000..4b0af0d6 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml new file mode 100644 index 00000000..13122699 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml new file mode 100644 index 00000000..a1ff3f02 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml new file mode 100644 index 00000000..658fe0c2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml new file mode 100644 index 00000000..837985aa --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml new file mode 100644 index 00000000..2061d8cf --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml new file mode 100644 index 00000000..2b077bc2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml new file mode 100644 index 00000000..91d65b20 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml new file mode 100644 index 00000000..be9a331e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml new file mode 100644 index 00000000..cc787214 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml new file mode 100644 index 00000000..b8581a6f --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml new file mode 100644 index 00000000..8f760a20 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml new file mode 100644 index 00000000..4c8ff546 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml new file mode 100644 index 00000000..13afda29 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml new file mode 100644 index 00000000..772d6fed --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml new file mode 100644 index 00000000..3b9dcc07 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_io_commons_io_2_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_io_commons_io_2_2.xml new file mode 100644 index 00000000..f8084ec2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_io_commons_io_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml new file mode 100644 index 00000000..18168957 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml new file mode 100644 index 00000000..2ec83767 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml new file mode 100644 index 00000000..83936486 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_core_10_2_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_core_10_2_3.xml new file mode 100644 index 00000000..5e039876 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_core_10_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_hystrix_10_2_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_hystrix_10_2_3.xml new file mode 100644 index 00000000..6b0b799e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_hystrix_10_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_slf4j_10_2_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_slf4j_10_2_3.xml new file mode 100644 index 00000000..43f04075 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_feign_slf4j_10_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_3_8_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_3_8_0.xml new file mode 100644 index 00000000..05344763 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_3_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml new file mode 100644 index 00000000..47e101ee --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml new file mode 100644 index 00000000..f57b6272 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml new file mode 100644 index 00000000..cda742ba --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml new file mode 100644 index 00000000..82613f4c --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml new file mode 100644 index 00000000..1ce62ff2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml new file mode 100644 index 00000000..f9da5f75 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml new file mode 100644 index 00000000..db5d5ce8 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml new file mode 100644 index 00000000..e74f3ab2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml new file mode 100644 index 00000000..93cf65ab --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml new file mode 100644 index 00000000..6978c0b2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml new file mode 100644 index 00000000..a0c4d766 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml new file mode 100644 index 00000000..7f95f995 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__junit_junit_4_12.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 00000000..d4110417 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml new file mode 100644 index 00000000..6c3a8221 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml new file mode 100644 index 00000000..cc556d13 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml new file mode 100644 index 00000000..d7404f23 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml new file mode 100644 index 00000000..b3d38583 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml new file mode 100644 index 00000000..10830235 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml new file mode 100644 index 00000000..fd0779a3 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml new file mode 100644 index 00000000..6998bac1 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml new file mode 100644 index 00000000..8f3e3159 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml new file mode 100644 index 00000000..34993494 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml new file mode 100644 index 00000000..c76dc2de --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml new file mode 100644 index 00000000..e95289ea --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml new file mode 100644 index 00000000..fe93f544 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml new file mode 100644 index 00000000..889bf4fb --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml new file mode 100644 index 00000000..b2884158 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml new file mode 100644 index 00000000..bae48d4f --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml new file mode 100644 index 00000000..7d9badb9 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml new file mode 100644 index 00000000..d51ce493 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml new file mode 100644 index 00000000..4d16d46c --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml new file mode 100644 index 00000000..3cc14932 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml new file mode 100644 index 00000000..f6ca3adf --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml new file mode 100644 index 00000000..ad0d4fd2 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml new file mode 100644 index 00000000..ca43e29a --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml new file mode 100644 index 00000000..5c3a057c --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml new file mode 100644 index 00000000..b5106423 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 00000000..f58bbc11 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml new file mode 100644 index 00000000..78dbe458 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml new file mode 100644 index 00000000..04cc8040 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml new file mode 100644 index 00000000..4025781f --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml new file mode 100644 index 00000000..cb848ae7 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml new file mode 100644 index 00000000..159204fc --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml new file mode 100644 index 00000000..9cb741b9 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml new file mode 100644 index 00000000..9b048c42 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml new file mode 100644 index 00000000..a9a5f328 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml new file mode 100644 index 00000000..dffb199e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml new file mode 100644 index 00000000..af41e3b6 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml new file mode 100644 index 00000000..b5e37489 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml new file mode 100644 index 00000000..9843fa42 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml new file mode 100644 index 00000000..c4c54d6d --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml new file mode 100644 index 00000000..53e9a9ec --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml new file mode 100644 index 00000000..72d40685 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml new file mode 100644 index 00000000..ddfe7f92 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..1c516036 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml new file mode 100644 index 00000000..b91c0647 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml new file mode 100644 index 00000000..6575b9b4 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml new file mode 100644 index 00000000..45a509ce --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml new file mode 100644 index 00000000..721da6f4 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml new file mode 100644 index 00000000..0412331d --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml new file mode 100644 index 00000000..b666ecb5 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml new file mode 100644 index 00000000..156a23f3 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml new file mode 100644 index 00000000..628b06c8 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml new file mode 100644 index 00000000..5d113d9c --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..bda681c9 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml new file mode 100644 index 00000000..02cd66c5 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml new file mode 100644 index 00000000..97edcec0 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml new file mode 100644 index 00000000..8a002ede --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml new file mode 100644 index 00000000..22b5d3c6 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml new file mode 100644 index 00000000..1bf99020 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml new file mode 100644 index 00000000..23416676 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_openfeign_core_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_openfeign_core_2_1_2_RELEASE.xml new file mode 100644 index 00000000..e1012461 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_openfeign_core_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml new file mode 100644 index 00000000..69d0f46a --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml new file mode 100644 index 00000000..2bf506fe --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml new file mode 100644 index 00000000..399eb16a --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml new file mode 100644 index 00000000..806fa37a --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_openfeign_2_1_2_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_openfeign_2_1_2_RELEASE.xml new file mode 100644 index 00000000..e79a4e01 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_openfeign_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml new file mode 100644 index 00000000..d09449fc --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml new file mode 100644 index 00000000..dbf9b606 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml new file mode 100644 index 00000000..3ce8ae72 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml new file mode 100644 index 00000000..71780d87 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml new file mode 100644 index 00000000..da2e132a --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml new file mode 100644 index 00000000..224ad695 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml new file mode 100644 index 00000000..e71b57d7 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml new file mode 100644 index 00000000..f50d9e85 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml new file mode 100644 index 00000000..096a5b09 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml new file mode 100644 index 00000000..6e85969d --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml new file mode 100644 index 00000000..42759eef --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml new file mode 100644 index 00000000..29e7d751 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml new file mode 100644 index 00000000..67c298f4 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml new file mode 100644 index 00000000..aed7fe22 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml new file mode 100644 index 00000000..7e63769b --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml new file mode 100644 index 00000000..0b13335e --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml new file mode 100644 index 00000000..0f2d9ef4 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml b/springboot-seata-transaction/account-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml new file mode 100644 index 00000000..6726a2d6 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/misc.xml b/springboot-seata-transaction/account-server/.idea/misc.xml new file mode 100644 index 00000000..16fa57af --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/misc.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + C:\Users\51536\AppData\Roaming\Subversion + + + + + + + + + + + + + 1.8 + + + + + + + + 1.8 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/modules.xml b/springboot-seata-transaction/account-server/.idea/modules.xml new file mode 100644 index 00000000..150c8cd0 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/0/3/03eddd0ff6c310698da6f69112602db4bba625eb b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/0/3/03eddd0ff6c310698da6f69112602db4bba625eb new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/0/f/0f7acc3ae54f9c086f900ee1f0b1f95b5bf50111 b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/0/f/0f7acc3ae54f9c086f900ee1f0b1f95b5bf50111 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/1/8/1882134801d7fbcd6f1929e8aecaf313cfe7eb0c b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/1/8/1882134801d7fbcd6f1929e8aecaf313cfe7eb0c new file mode 100644 index 00000000..1dad6872 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/1/8/1882134801d7fbcd6f1929e8aecaf313cfe7eb0c @@ -0,0 +1,4 @@ + +i squid:S2184'"FCast one of the operands of this multiplication operation to a "long".(�Я������8�����. +F squid:S1148)"#Use a logger to log this exception.(��ԅ�����8�����. +d squid:S2142("FEither re-interrupt this method or rethrow the "InterruptedException".(䠹�8�����. \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/2/e/2e79c0637af2469626d313390a5efe876d94aade b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/2/e/2e79c0637af2469626d313390a5efe876d94aade new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/6/3/638145d656cbeb3e231a6037f13a0a77457baf29 b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/6/3/638145d656cbeb3e231a6037f13a0a77457baf29 new file mode 100644 index 00000000..77903e11 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/6/3/638145d656cbeb3e231a6037f13a0a77457baf29 @@ -0,0 +1,2 @@ + +Z squid:S3752">Add a "method" parameter to this "@RequestMapping" annotation.(�Ϣ������ \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/b/7/b7e11a15290aae3ac8165f50dbb0f8d414315eca b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/b/7/b7e11a15290aae3ac8165f50dbb0f8d414315eca new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a new file mode 100644 index 00000000..419308ed --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a @@ -0,0 +1,2 @@ + +~ squid:S1488"gImmediately return this expression instead of assigning it to the temporary variable "druidDataSource".(���� \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/e/c/ec06142e303dcefed86b135789c049d94ead6817 b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/e/c/ec06142e303dcefed86b135789c049d94ead6817 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/index.pb b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 00000000..a6ee37d1 --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/sonarlint/issuestore/index.pb @@ -0,0 +1,17 @@ + +a +1src/main/java/io/seata/sample/dao/AccountDao.java,e\c\ec06142e303dcefed86b135789c049d94ead6817 +a +1src/main/java/io/seata/sample/entity/Account.java,b\7\b7e11a15290aae3ac8165f50dbb0f8d414315eca +a +1src/main/java/io/seata/sample/feign/OrderApi.java,2\e\2e79c0637af2469626d313390a5efe876d94aade +j +:src/main/java/io/seata/sample/DataSourceConfiguration.java,d\a\da4e76600ea0322632342fb429ad35044cd5ed2a +o +?src/main/java/io/seata/sample/controller/AccountController.java,6\3\638145d656cbeb3e231a6037f13a0a77457baf29 +i +9src/main/java/io/seata/sample/service/AccountService.java,0\3\03eddd0ff6c310698da6f69112602db4bba625eb +k +;src/main/java/io/seata/sample/AccountServerApplication.java,0\f\0f7acc3ae54f9c086f900ee1f0b1f95b5bf50111 +m +=src/main/java/io/seata/sample/service/AccountServiceImpl.java,1\8\1882134801d7fbcd6f1929e8aecaf313cfe7eb0c \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/vcs.xml b/springboot-seata-transaction/account-server/.idea/vcs.xml new file mode 100644 index 00000000..b2bdec2d --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/.idea/workspace.xml b/springboot-seata-transaction/account-server/.idea/workspace.xml new file mode 100644 index 00000000..8c5e413f --- /dev/null +++ b/springboot-seata-transaction/account-server/.idea/workspace.xml @@ -0,0 +1,742 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IT云清 + wangzhongxiang + default + + + + 小富 ,公众号:程序员内点事 + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1605507876497 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/pom.xml b/springboot-seata-transaction/account-server/pom.xml new file mode 100644 index 00000000..996c06e4 --- /dev/null +++ b/springboot-seata-transaction/account-server/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + io.seata.sample + springboot-seata-transaction + 0.0.1-SNAPSHOT + + + io.seata.sample + account-server + 0.0.1-SNAPSHOT + account-server + Demo project for Spring Boot + + + 1.8 + Greenwich.SR2 + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/AccountServerApplication.java b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/AccountServerApplication.java new file mode 100644 index 00000000..5a34e510 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/AccountServerApplication.java @@ -0,0 +1,24 @@ +package io.seata.sample; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +/** + * 账户服务 + * @author 小富 ,公众号:程序员内点事 + */ +@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) +@MapperScan("io.seata.sample.dao") +@EnableDiscoveryClient +@EnableFeignClients +public class AccountServerApplication { + + public static void main(String[] args) { + SpringApplication.run(AccountServerApplication.class, args); + } + +} diff --git a/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/DataSourceConfiguration.java b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/DataSourceConfiguration.java new file mode 100644 index 00000000..17ffcfaa --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/DataSourceConfiguration.java @@ -0,0 +1,47 @@ +package io.seata.sample; + +import com.alibaba.druid.pool.DruidDataSource; +import io.seata.rm.datasource.DataSourceProxy; +import org.apache.ibatis.session.SqlSessionFactory; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.mybatis.spring.transaction.SpringManagedTransactionFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; + +import javax.sql.DataSource; + +/** + * 数据源代理 + * @author 小富 ,公众号:程序员内点事 + */ +@Configuration +public class DataSourceConfiguration { + + @Bean + @ConfigurationProperties(prefix = "spring.datasource") + public DataSource druidDataSource(){ + DruidDataSource druidDataSource = new DruidDataSource(); + return druidDataSource; + } + + @Primary + @Bean("dataSource") + public DataSourceProxy dataSource(DataSource druidDataSource){ + return new DataSourceProxy(druidDataSource); + } + + + @Bean + public SqlSessionFactory sqlSessionFactory(DataSourceProxy dataSourceProxy)throws Exception{ + SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); + sqlSessionFactoryBean.setDataSource(dataSourceProxy); + sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver() + .getResources("classpath*:/mapper/*.xml")); + sqlSessionFactoryBean.setTransactionFactory(new SpringManagedTransactionFactory()); + return sqlSessionFactoryBean.getObject(); + } + +} diff --git a/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/controller/AccountController.java b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/controller/AccountController.java new file mode 100644 index 00000000..280c3eb5 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/controller/AccountController.java @@ -0,0 +1,32 @@ +package io.seata.sample.controller; + +import io.seata.sample.service.AccountService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@RestController +@RequestMapping("account") +public class AccountController { + + @Autowired + private AccountService accountServiceImpl; + + /** + * 扣减账户余额 + * @param userId 用户id + * @param money 金额 + * @return + */ + @RequestMapping("decrease") + public String decrease(@RequestParam("userId") Long userId,@RequestParam("money") BigDecimal money){ + accountServiceImpl.decrease(userId,money); + return "Account decrease success"; + } +} diff --git a/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/dao/AccountDao.java b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/dao/AccountDao.java new file mode 100644 index 00000000..10874e08 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/dao/AccountDao.java @@ -0,0 +1,18 @@ +package io.seata.sample.dao; + +import org.apache.ibatis.annotations.Param; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +public interface AccountDao { + + /** + * 扣减账户余额 + * @param userId 用户id + * @param money 金额 + */ + void decrease(@Param("userId") Long userId, @Param("money") BigDecimal money); +} diff --git a/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/entity/Account.java b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/entity/Account.java new file mode 100644 index 00000000..ed7e3a57 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/entity/Account.java @@ -0,0 +1,26 @@ +package io.seata.sample.entity; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@Data +public class Account { + + private Long id; + + /**用户id*/ + private Long userId; + + /**总额度*/ + private BigDecimal total; + + /**已用额度*/ + private BigDecimal used; + + /**剩余额度*/ + private BigDecimal residue; +} diff --git a/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/feign/OrderApi.java b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/feign/OrderApi.java new file mode 100644 index 00000000..8afeeb45 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/feign/OrderApi.java @@ -0,0 +1,24 @@ +package io.seata.sample.feign; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@FeignClient(value = "order-server") +public interface OrderApi { + + /** + * 修改订单金额 + * @param userId + * @param money + * @param status + * @return + */ + @RequestMapping("/order/update") + String update(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money, @RequestParam("status") Integer status); +} diff --git a/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/service/AccountService.java b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/service/AccountService.java new file mode 100644 index 00000000..45c9ab64 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/service/AccountService.java @@ -0,0 +1,16 @@ +package io.seata.sample.service; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +public interface AccountService { + + /** + * 扣减账户余额 + * @param userId 用户id + * @param money 金额 + */ + void decrease(Long userId, BigDecimal money); +} diff --git a/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/service/AccountServiceImpl.java b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/service/AccountServiceImpl.java new file mode 100644 index 00000000..02b0f5b0 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/java/io/seata/sample/service/AccountServiceImpl.java @@ -0,0 +1,51 @@ +package io.seata.sample.service; + +import io.seata.core.context.RootContext; +import io.seata.sample.dao.AccountDao; +import io.seata.sample.feign.OrderApi; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@Service("accountServiceImpl") +public class AccountServiceImpl implements AccountService{ + + private static final Logger LOGGER = LoggerFactory.getLogger(AccountServiceImpl.class); + @Autowired + private AccountDao accountDao; + @Autowired + private OrderApi orderApi; + + /** + * 扣减账户余额 + * @param userId 用户id + * @param money 金额 + */ + @Override + public void decrease(Long userId, BigDecimal money) { + + String xid = RootContext.getXID(); + LOGGER.info("全局事务 xid: {}", xid); + + LOGGER.info("------->扣减账户开始account中"); + //模拟超时异常,全局事务回滚 + try { + Thread.sleep(30*1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + accountDao.decrease(userId,money); + LOGGER.info("------->扣减账户结束account中"); + + //修改订单状态,此调用会导致调用成环 + LOGGER.info("修改订单状态开始"); + String mes = orderApi.update(userId, money.multiply(new BigDecimal("0.09")),0); + LOGGER.info("修改订单状态结束:{}",mes); + } +} diff --git a/springboot-seata-transaction/account-server/src/main/resources/account.sql b/springboot-seata-transaction/account-server/src/main/resources/account.sql new file mode 100644 index 00000000..b170929d --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/resources/account.sql @@ -0,0 +1,10 @@ +CREATE TABLE `account` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'id', + `user_id` bigint(11) DEFAULT NULL COMMENT '用户id', + `total` decimal(10,0) DEFAULT NULL COMMENT '总额度', + `used` decimal(10,0) DEFAULT NULL COMMENT '已用余额', + `residue` decimal(10,0) DEFAULT '0' COMMENT '剩余可用额度', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; + +INSERT INTO `seat-account`.`account` (`id`, `user_id`, `total`, `used`, `residue`) VALUES ('1', '1', '1000', '0', '100'); diff --git a/springboot-seata-transaction/account-server/src/main/resources/application.yml b/springboot-seata-transaction/account-server/src/main/resources/application.yml new file mode 100644 index 00000000..1efbb632 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/resources/application.yml @@ -0,0 +1,35 @@ +eureka: + instance: + hostname: 47.93.6.5 + prefer-ip-address: true + client: + serviceUrl: + defaultZone: http://${eureka.instance.hostname}:8761/eureka/ +feign: + client: + config: + default: + connectTimeout: 5000 + readTimeout: 10000 +server: + port: 8181 +spring: + application: + name: account-server + cloud: + alibaba: + seata: + tx-service-group: my_test_tx_group + datasource: + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://47.93.6.5:3306/seat-account + username: root + password: xinzhifu521 + +logging: + level: + io: + seata: info +mybatis: + mapperLocations: classpath:mapper/*.xml + typeAliasesPackage: io.seata.sample.entity \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/src/main/resources/file.conf b/springboot-seata-transaction/account-server/src/main/resources/file.conf new file mode 100644 index 00000000..e38ee829 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/resources/file.conf @@ -0,0 +1,66 @@ +transport { + # tcp udt unix-domain-socket + type = "TCP" + #NIO NATIVE + server = "NIO" + #enable heartbeat + heartbeat = true + # the client batch send request enable + enableClientBatchSendRequest = true + #thread factory for netty + threadFactory { + bossThreadPrefix = "NettyBoss" + workerThreadPrefix = "NettyServerNIOWorker" + serverExecutorThread-prefix = "NettyServerBizHandler" + shareBossWorker = false + clientSelectorThreadPrefix = "NettyClientSelector" + clientSelectorThreadSize = 1 + clientWorkerThreadPrefix = "NettyClientWorkerThread" + # netty boss thread size,will not be used for UDT + bossThreadSize = 1 + #auto default pin or 8 + workerThreadSize = "default" + } + shutdown { + # when destroy server, wait seconds + wait = 3 + } + serialization = "seata" + compressor = "none" +} +service { + #transaction service group mapping + vgroupMapping.my_test_tx_group = "default" + #only support when registry.type=file, please don't set multiple addresses + default.grouplist = "127.0.0.1:8091" + #degrade, current not support + enableDegrade = false + #disable seata + disableGlobalTransaction = false +} + +client { + rm { + asyncCommitBufferLimit = 10000 + lock { + retryInterval = 10 + retryTimes = 30 + retryPolicyBranchRollbackOnConflict = true + } + reportRetryCount = 5 + tableMetaCheckEnable = false + reportSuccessEnable = false + } + tm { + commitRetryCount = 5 + rollbackRetryCount = 5 + } + undo { + dataValidation = true + logSerialization = "jackson" + logTable = "undo_log" + } + log { + exceptionRate = 100 + } +} \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/src/main/resources/mapper/AccountMapper.xml b/springboot-seata-transaction/account-server/src/main/resources/mapper/AccountMapper.xml new file mode 100644 index 00000000..5873ec16 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/resources/mapper/AccountMapper.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + UPDATE account SET residue = residue - #{money},used = used + #{money} where user_id = #{userId}; + + diff --git a/springboot-seata-transaction/account-server/src/main/resources/registry.conf b/springboot-seata-transaction/account-server/src/main/resources/registry.conf new file mode 100644 index 00000000..2630f694 --- /dev/null +++ b/springboot-seata-transaction/account-server/src/main/resources/registry.conf @@ -0,0 +1,82 @@ +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" + + nacos { + serverAddr = "localhost" + namespace = "" + cluster = "default" + } + eureka { + serviceUrl = "http://47.93.6.5:8761/eureka" + application = "SEATA_SERVER" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + password = "" + cluster = "default" + timeout = "0" + } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } + etcd3 { + cluster = "default" + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + application = "default" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + cluster = "default" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "" + group = "SEATA_GROUP" + } + consul { + serverAddr = "127.0.0.1:8500" + } + apollo { + app.id = "seata-server" + apollo.meta = "http://192.168.1.204:8801" + namespace = "application" + } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + file { + name = "file.conf" + } +} diff --git a/springboot-seata-transaction/account-server/src/test/java/io/seata/sample/AccountServerApplicationTests.java b/springboot-seata-transaction/account-server/src/test/java/io/seata/sample/AccountServerApplicationTests.java new file mode 100644 index 00000000..21e1570a --- /dev/null +++ b/springboot-seata-transaction/account-server/src/test/java/io/seata/sample/AccountServerApplicationTests.java @@ -0,0 +1,16 @@ +package io.seata.sample; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class AccountServerApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/springboot-seata-transaction/account-server/target/classes/account.sql b/springboot-seata-transaction/account-server/target/classes/account.sql new file mode 100644 index 00000000..b170929d --- /dev/null +++ b/springboot-seata-transaction/account-server/target/classes/account.sql @@ -0,0 +1,10 @@ +CREATE TABLE `account` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'id', + `user_id` bigint(11) DEFAULT NULL COMMENT '用户id', + `total` decimal(10,0) DEFAULT NULL COMMENT '总额度', + `used` decimal(10,0) DEFAULT NULL COMMENT '已用余额', + `residue` decimal(10,0) DEFAULT '0' COMMENT '剩余可用额度', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; + +INSERT INTO `seat-account`.`account` (`id`, `user_id`, `total`, `used`, `residue`) VALUES ('1', '1', '1000', '0', '100'); diff --git a/springboot-seata-transaction/account-server/target/classes/application.yml b/springboot-seata-transaction/account-server/target/classes/application.yml new file mode 100644 index 00000000..1efbb632 --- /dev/null +++ b/springboot-seata-transaction/account-server/target/classes/application.yml @@ -0,0 +1,35 @@ +eureka: + instance: + hostname: 47.93.6.5 + prefer-ip-address: true + client: + serviceUrl: + defaultZone: http://${eureka.instance.hostname}:8761/eureka/ +feign: + client: + config: + default: + connectTimeout: 5000 + readTimeout: 10000 +server: + port: 8181 +spring: + application: + name: account-server + cloud: + alibaba: + seata: + tx-service-group: my_test_tx_group + datasource: + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://47.93.6.5:3306/seat-account + username: root + password: xinzhifu521 + +logging: + level: + io: + seata: info +mybatis: + mapperLocations: classpath:mapper/*.xml + typeAliasesPackage: io.seata.sample.entity \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/target/classes/file.conf b/springboot-seata-transaction/account-server/target/classes/file.conf new file mode 100644 index 00000000..e38ee829 --- /dev/null +++ b/springboot-seata-transaction/account-server/target/classes/file.conf @@ -0,0 +1,66 @@ +transport { + # tcp udt unix-domain-socket + type = "TCP" + #NIO NATIVE + server = "NIO" + #enable heartbeat + heartbeat = true + # the client batch send request enable + enableClientBatchSendRequest = true + #thread factory for netty + threadFactory { + bossThreadPrefix = "NettyBoss" + workerThreadPrefix = "NettyServerNIOWorker" + serverExecutorThread-prefix = "NettyServerBizHandler" + shareBossWorker = false + clientSelectorThreadPrefix = "NettyClientSelector" + clientSelectorThreadSize = 1 + clientWorkerThreadPrefix = "NettyClientWorkerThread" + # netty boss thread size,will not be used for UDT + bossThreadSize = 1 + #auto default pin or 8 + workerThreadSize = "default" + } + shutdown { + # when destroy server, wait seconds + wait = 3 + } + serialization = "seata" + compressor = "none" +} +service { + #transaction service group mapping + vgroupMapping.my_test_tx_group = "default" + #only support when registry.type=file, please don't set multiple addresses + default.grouplist = "127.0.0.1:8091" + #degrade, current not support + enableDegrade = false + #disable seata + disableGlobalTransaction = false +} + +client { + rm { + asyncCommitBufferLimit = 10000 + lock { + retryInterval = 10 + retryTimes = 30 + retryPolicyBranchRollbackOnConflict = true + } + reportRetryCount = 5 + tableMetaCheckEnable = false + reportSuccessEnable = false + } + tm { + commitRetryCount = 5 + rollbackRetryCount = 5 + } + undo { + dataValidation = true + logSerialization = "jackson" + logTable = "undo_log" + } + log { + exceptionRate = 100 + } +} \ No newline at end of file diff --git a/springboot-seata-transaction/account-server/target/classes/mapper/AccountMapper.xml b/springboot-seata-transaction/account-server/target/classes/mapper/AccountMapper.xml new file mode 100644 index 00000000..5873ec16 --- /dev/null +++ b/springboot-seata-transaction/account-server/target/classes/mapper/AccountMapper.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + UPDATE account SET residue = residue - #{money},used = used + #{money} where user_id = #{userId}; + + diff --git a/springboot-seata-transaction/account-server/target/classes/registry.conf b/springboot-seata-transaction/account-server/target/classes/registry.conf new file mode 100644 index 00000000..2630f694 --- /dev/null +++ b/springboot-seata-transaction/account-server/target/classes/registry.conf @@ -0,0 +1,82 @@ +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" + + nacos { + serverAddr = "localhost" + namespace = "" + cluster = "default" + } + eureka { + serviceUrl = "http://47.93.6.5:8761/eureka" + application = "SEATA_SERVER" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + password = "" + cluster = "default" + timeout = "0" + } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } + etcd3 { + cluster = "default" + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + application = "default" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + cluster = "default" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "" + group = "SEATA_GROUP" + } + consul { + serverAddr = "127.0.0.1:8500" + } + apollo { + app.id = "seata-server" + apollo.meta = "http://192.168.1.204:8801" + namespace = "application" + } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + file { + name = "file.conf" + } +} diff --git a/springboot-seata-transaction/branch_table.sql b/springboot-seata-transaction/branch_table.sql new file mode 100644 index 00000000..ed62c197 --- /dev/null +++ b/springboot-seata-transaction/branch_table.sql @@ -0,0 +1,16 @@ +CREATE TABLE `branch_table` ( + `branch_id` bigint(20) NOT NULL, + `xid` varchar(128) NOT NULL, + `transaction_id` bigint(20) DEFAULT NULL, + `resource_group_id` varchar(32) DEFAULT NULL, + `resource_id` varchar(256) DEFAULT NULL, + `branch_type` varchar(8) DEFAULT NULL, + `status` tinyint(4) DEFAULT NULL, + `client_id` varchar(64) DEFAULT NULL, + `application_data` varchar(2000) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + PRIMARY KEY (`branch_id`), + KEY `idx_xid` (`xid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + diff --git a/springboot-seata-transaction/eureka-server/.idea/checkstyle-idea.xml b/springboot-seata-transaction/eureka-server/.idea/checkstyle-idea.xml new file mode 100644 index 00000000..034029da --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/checkstyle-idea.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/compiler.xml b/springboot-seata-transaction/eureka-server/.idea/compiler.xml new file mode 100644 index 00000000..57b57e62 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/encodings.xml b/springboot-seata-transaction/eureka-server/.idea/encodings.xml new file mode 100644 index 00000000..b26911bd --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/inspectionProfiles/Project_Default.xml b/springboot-seata-transaction/eureka-server/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..6560a989 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml new file mode 100644 index 00000000..b8d93d8e --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml new file mode 100644 index 00000000..30ff5cb7 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml new file mode 100644 index 00000000..6fec8f43 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml new file mode 100644 index 00000000..9eb8596a --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml new file mode 100644 index 00000000..bbd3a886 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml new file mode 100644 index 00000000..06441f49 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml new file mode 100644 index 00000000..55b3f7bf --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml new file mode 100644 index 00000000..4970251e --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_xml_2_9_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_xml_2_9_9.xml new file mode 100644 index 00000000..4f1f89cd --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_xml_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml new file mode 100644 index 00000000..7fc80365 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml new file mode 100644 index 00000000..23c806cf --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_9_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_9_9.xml new file mode 100644 index 00000000..a72961c3 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml new file mode 100644 index 00000000..fe2eb1bd --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml new file mode 100644 index 00000000..c08dcae2 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml new file mode 100644 index 00000000..04210c56 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml new file mode 100644 index 00000000..0bc971a4 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_1.xml new file mode 100644 index 00000000..09453c91 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml new file mode 100644 index 00000000..2888f96d --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_guava_guava_16_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_guava_guava_16_0.xml new file mode 100644 index 00000000..91cff2f5 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_guava_guava_16_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml new file mode 100644 index 00000000..e956197d --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml new file mode 100644 index 00000000..f19f6eb3 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml new file mode 100644 index 00000000..bd9061c2 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml new file mode 100644 index 00000000..0a20711e --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml new file mode 100644 index 00000000..0adf6784 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml new file mode 100644 index 00000000..588dca0f --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml new file mode 100644 index 00000000..a1a320cd --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml new file mode 100644 index 00000000..85ba8c99 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml new file mode 100644 index 00000000..c8b512e3 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml new file mode 100644 index 00000000..09c6f6e0 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml new file mode 100644 index 00000000..28cf8800 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml new file mode 100644 index 00000000..eff738de --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml new file mode 100644 index 00000000..4b0af0d6 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml new file mode 100644 index 00000000..13122699 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml new file mode 100644 index 00000000..a1ff3f02 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml new file mode 100644 index 00000000..658fe0c2 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml new file mode 100644 index 00000000..837985aa --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml new file mode 100644 index 00000000..2061d8cf --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml new file mode 100644 index 00000000..2b077bc2 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml new file mode 100644 index 00000000..91d65b20 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_server_1_19_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_server_1_19_1.xml new file mode 100644 index 00000000..b4ad3ded --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_server_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_servlet_1_19_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_servlet_1_19_1.xml new file mode 100644 index 00000000..943df5a5 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_sun_jersey_jersey_servlet_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml new file mode 100644 index 00000000..be9a331e --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml new file mode 100644 index 00000000..b8581a6f --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml new file mode 100644 index 00000000..4c8ff546 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml new file mode 100644 index 00000000..13afda29 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml new file mode 100644 index 00000000..772d6fed --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml new file mode 100644 index 00000000..18168957 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml new file mode 100644 index 00000000..2ec83767 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_micrometer_micrometer_core_1_1_6.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_micrometer_micrometer_core_1_1_6.xml new file mode 100644 index 00000000..983a664b --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_micrometer_micrometer_core_1_1_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml new file mode 100644 index 00000000..cda742ba --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml new file mode 100644 index 00000000..82613f4c --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml new file mode 100644 index 00000000..1ce62ff2 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml new file mode 100644 index 00000000..f9da5f75 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml new file mode 100644 index 00000000..e74f3ab2 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml new file mode 100644 index 00000000..93cf65ab --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml new file mode 100644 index 00000000..6978c0b2 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml new file mode 100644 index 00000000..a0c4d766 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml new file mode 100644 index 00000000..7f95f995 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__junit_junit_4_12.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 00000000..d4110417 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml new file mode 100644 index 00000000..cc556d13 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml new file mode 100644 index 00000000..d7404f23 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml new file mode 100644 index 00000000..b3d38583 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml new file mode 100644 index 00000000..10830235 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml new file mode 100644 index 00000000..fd0779a3 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml new file mode 100644 index 00000000..6998bac1 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml new file mode 100644 index 00000000..8f3e3159 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml new file mode 100644 index 00000000..c76dc2de --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml new file mode 100644 index 00000000..e95289ea --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml new file mode 100644 index 00000000..fe93f544 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml new file mode 100644 index 00000000..889bf4fb --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml new file mode 100644 index 00000000..b2884158 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml new file mode 100644 index 00000000..bae48d4f --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml new file mode 100644 index 00000000..7d9badb9 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml new file mode 100644 index 00000000..d51ce493 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml new file mode 100644 index 00000000..4d16d46c --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml new file mode 100644 index 00000000..3cc14932 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml new file mode 100644 index 00000000..f6ca3adf --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml new file mode 100644 index 00000000..ca43e29a --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml new file mode 100644 index 00000000..b5106423 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_freemarker_freemarker_2_3_29.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_freemarker_freemarker_2_3_29.xml new file mode 100644 index 00000000..a2d193b7 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_freemarker_freemarker_2_3_29.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 00000000..f58bbc11 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml new file mode 100644 index 00000000..78dbe458 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml new file mode 100644 index 00000000..04cc8040 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml new file mode 100644 index 00000000..4025781f --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml new file mode 100644 index 00000000..cb848ae7 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_latencyutils_LatencyUtils_2_0_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_latencyutils_LatencyUtils_2_0_3.xml new file mode 100644 index 00000000..bf681698 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_latencyutils_LatencyUtils_2_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml new file mode 100644 index 00000000..159204fc --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml new file mode 100644 index 00000000..af41e3b6 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml new file mode 100644 index 00000000..0bf8cf2b --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml new file mode 100644 index 00000000..c4c54d6d --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml new file mode 100644 index 00000000..53e9a9ec --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml new file mode 100644 index 00000000..72d40685 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml new file mode 100644 index 00000000..ddfe7f92 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_2_1_8_RELEASE.xml new file mode 100644 index 00000000..68807e49 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..5f47e233 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..1c516036 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml new file mode 100644 index 00000000..b91c0647 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_actuator_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_actuator_2_1_8_RELEASE.xml new file mode 100644 index 00000000..313d4d3b --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_actuator_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml new file mode 100644 index 00000000..6575b9b4 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_freemarker_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_freemarker_2_1_8_RELEASE.xml new file mode 100644 index 00000000..7a98f26e --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_freemarker_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml new file mode 100644 index 00000000..721da6f4 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml new file mode 100644 index 00000000..0412331d --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml new file mode 100644 index 00000000..b666ecb5 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml new file mode 100644 index 00000000..156a23f3 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml new file mode 100644 index 00000000..628b06c8 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml new file mode 100644 index 00000000..5d113d9c --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..bda681c9 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml new file mode 100644 index 00000000..02cd66c5 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml new file mode 100644 index 00000000..97edcec0 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml new file mode 100644 index 00000000..8a002ede --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml new file mode 100644 index 00000000..22b5d3c6 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_server_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_server_2_1_2_RELEASE.xml new file mode 100644 index 00000000..2209302a --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_server_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml new file mode 100644 index 00000000..1bf99020 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml new file mode 100644 index 00000000..23416676 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml new file mode 100644 index 00000000..69d0f46a --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml new file mode 100644 index 00000000..2bf506fe --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_server_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_server_2_1_2_RELEASE.xml new file mode 100644 index 00000000..8725a8a9 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_server_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml new file mode 100644 index 00000000..806fa37a --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml new file mode 100644 index 00000000..d09449fc --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml new file mode 100644 index 00000000..dbf9b606 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml new file mode 100644 index 00000000..3ce8ae72 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml new file mode 100644 index 00000000..71780d87 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml new file mode 100644 index 00000000..da2e132a --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_context_support_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_context_support_5_1_9_RELEASE.xml new file mode 100644 index 00000000..3ee481d3 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_context_support_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml new file mode 100644 index 00000000..224ad695 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml new file mode 100644 index 00000000..e71b57d7 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml new file mode 100644 index 00000000..f50d9e85 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml new file mode 100644 index 00000000..6e85969d --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml new file mode 100644 index 00000000..29e7d751 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml new file mode 100644 index 00000000..67c298f4 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml new file mode 100644 index 00000000..aed7fe22 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml new file mode 100644 index 00000000..7e63769b --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml new file mode 100644 index 00000000..0b13335e --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml new file mode 100644 index 00000000..0f2d9ef4 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml new file mode 100644 index 00000000..6726a2d6 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/misc.xml b/springboot-seata-transaction/eureka-server/.idea/misc.xml new file mode 100644 index 00000000..0d36b021 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/misc.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + C:\Users\51536\AppData\Roaming\Subversion + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/modules.xml b/springboot-seata-transaction/eureka-server/.idea/modules.xml new file mode 100644 index 00000000..965cf63d --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/sonarlint/issuestore/9/2/927cec6d2658a8a0f46150ed4ffc4a1386d3ea53 b/springboot-seata-transaction/eureka-server/.idea/sonarlint/issuestore/9/2/927cec6d2658a8a0f46150ed4ffc4a1386d3ea53 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/eureka-server/.idea/sonarlint/issuestore/index.pb b/springboot-seata-transaction/eureka-server/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 00000000..a7c2b6da --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/sonarlint/issuestore/index.pb @@ -0,0 +1,3 @@ + +j +:src/main/java/io/seata/sample/EurekaServerApplication.java,9\2\927cec6d2658a8a0f46150ed4ffc4a1386d3ea53 \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/.idea/workspace.xml b/springboot-seata-transaction/eureka-server/.idea/workspace.xml new file mode 100644 index 00000000..ebd80eac --- /dev/null +++ b/springboot-seata-transaction/eureka-server/.idea/workspace.xml @@ -0,0 +1,836 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1605507883984 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Spring + + + + + + + + + + + + + + + 1.8 + + + + + + + + eureka-server + + + + + + + + 1.8 + + + + + + + + Maven: antlr:antlr:2.7.7 + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/eureka-server.iml b/springboot-seata-transaction/eureka-server/eureka-server.iml new file mode 100644 index 00000000..90e5473f --- /dev/null +++ b/springboot-seata-transaction/eureka-server/eureka-server.iml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/pom.xml b/springboot-seata-transaction/eureka-server/pom.xml new file mode 100644 index 00000000..d9eb9f0e --- /dev/null +++ b/springboot-seata-transaction/eureka-server/pom.xml @@ -0,0 +1,57 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.8.RELEASE + + + io.seata.sample + eureka-server + 0.0.1-SNAPSHOT + eureka-server + Demo project for Spring Boot + + + 1.8 + Greenwich.SR2 + + + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-server + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/springboot-seata-transaction/eureka-server/src/main/java/io/seata/sample/EurekaServerApplication.java b/springboot-seata-transaction/eureka-server/src/main/java/io/seata/sample/EurekaServerApplication.java new file mode 100644 index 00000000..1aa6271a --- /dev/null +++ b/springboot-seata-transaction/eureka-server/src/main/java/io/seata/sample/EurekaServerApplication.java @@ -0,0 +1,18 @@ +package io.seata.sample; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; + +/** + * @author wangzhongxiang + */ +@EnableEurekaServer +@SpringBootApplication +public class EurekaServerApplication { + + public static void main(String[] args) { + SpringApplication.run(EurekaServerApplication.class, args); + } + +} diff --git a/springboot-seata-transaction/eureka-server/src/main/resources/application.yml b/springboot-seata-transaction/eureka-server/src/main/resources/application.yml new file mode 100644 index 00000000..9960c859 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/src/main/resources/application.yml @@ -0,0 +1,13 @@ +server: + port: 8761 +spring: + application: + name: eureka-server +eureka: + instance: + hostname: 47.93.6.5 + client: + register-with-eureka: false + fetch-registry: false + service-url: + defultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/src/test/java/io/seata/sample/EurekaServerApplicationTests.java b/springboot-seata-transaction/eureka-server/src/test/java/io/seata/sample/EurekaServerApplicationTests.java new file mode 100644 index 00000000..e526814f --- /dev/null +++ b/springboot-seata-transaction/eureka-server/src/test/java/io/seata/sample/EurekaServerApplicationTests.java @@ -0,0 +1,16 @@ +package io.seata.sample; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class EurekaServerApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/springboot-seata-transaction/eureka-server/target/classes/application.yml b/springboot-seata-transaction/eureka-server/target/classes/application.yml new file mode 100644 index 00000000..9960c859 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/target/classes/application.yml @@ -0,0 +1,13 @@ +server: + port: 8761 +spring: + application: + name: eureka-server +eureka: + instance: + hostname: 47.93.6.5 + client: + register-with-eureka: false + fetch-registry: false + service-url: + defultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/target/classes/io/seata/sample/EurekaServerApplication.class b/springboot-seata-transaction/eureka-server/target/classes/io/seata/sample/EurekaServerApplication.class new file mode 100644 index 00000000..50210f66 Binary files /dev/null and b/springboot-seata-transaction/eureka-server/target/classes/io/seata/sample/EurekaServerApplication.class differ diff --git a/springboot-seata-transaction/eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar b/springboot-seata-transaction/eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar new file mode 100644 index 00000000..28038420 Binary files /dev/null and b/springboot-seata-transaction/eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar differ diff --git a/springboot-seata-transaction/eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar.original b/springboot-seata-transaction/eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar.original new file mode 100644 index 00000000..cddf2060 Binary files /dev/null and b/springboot-seata-transaction/eureka-server/target/eureka-server-0.0.1-SNAPSHOT.jar.original differ diff --git a/springboot-seata-transaction/eureka-server/target/maven-archiver/pom.properties b/springboot-seata-transaction/eureka-server/target/maven-archiver/pom.properties new file mode 100644 index 00000000..139199f9 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +version=0.0.1-SNAPSHOT +groupId=io.seata.sample +artifactId=eureka-server diff --git a/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 00000000..8f6b138b --- /dev/null +++ b/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1 @@ +E:\studyProject\seata-samples\springboot-seata-transaction\eureka-server\src\main\java\io\seata\sample\EurekaServerApplication.java diff --git a/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 00000000..e92525ed --- /dev/null +++ b/springboot-seata-transaction/eureka-server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +E:\studyProject\seata-samples\springboot-seata-transaction\eureka-server\src\test\java\io\seata\sample\EurekaServerApplicationTests.java diff --git a/springboot-seata-transaction/eureka-server/target/surefire-reports/TEST-io.seata.sample.EurekaServerApplicationTests.xml b/springboot-seata-transaction/eureka-server/target/surefire-reports/TEST-io.seata.sample.EurekaServerApplicationTests.xml new file mode 100644 index 00000000..07b01b70 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/target/surefire-reports/TEST-io.seata.sample.EurekaServerApplicationTests.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/eureka-server/target/surefire-reports/io.seata.sample.EurekaServerApplicationTests.txt b/springboot-seata-transaction/eureka-server/target/surefire-reports/io.seata.sample.EurekaServerApplicationTests.txt new file mode 100644 index 00000000..46b273e0 --- /dev/null +++ b/springboot-seata-transaction/eureka-server/target/surefire-reports/io.seata.sample.EurekaServerApplicationTests.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: io.seata.sample.EurekaServerApplicationTests +------------------------------------------------------------------------------- +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.79 s - in io.seata.sample.EurekaServerApplicationTests diff --git a/springboot-seata-transaction/eureka-server/target/test-classes/io/seata/sample/EurekaServerApplicationTests.class b/springboot-seata-transaction/eureka-server/target/test-classes/io/seata/sample/EurekaServerApplicationTests.class new file mode 100644 index 00000000..3cd5ebf1 Binary files /dev/null and b/springboot-seata-transaction/eureka-server/target/test-classes/io/seata/sample/EurekaServerApplicationTests.class differ diff --git a/springboot-seata-transaction/global_table.sql b/springboot-seata-transaction/global_table.sql new file mode 100644 index 00000000..2c76a6e0 --- /dev/null +++ b/springboot-seata-transaction/global_table.sql @@ -0,0 +1,17 @@ +CREATE TABLE `global_table` ( + `xid` varchar(128) NOT NULL, + `transaction_id` bigint(20) DEFAULT NULL, + `status` tinyint(4) NOT NULL, + `application_id` varchar(32) DEFAULT NULL, + `transaction_service_group` varchar(32) DEFAULT NULL, + `transaction_name` varchar(128) DEFAULT NULL, + `timeout` int(11) DEFAULT NULL, + `begin_time` bigint(20) DEFAULT NULL, + `application_data` varchar(2000) DEFAULT NULL, + `gmt_create` datetime DEFAULT NULL, + `gmt_modified` datetime DEFAULT NULL, + PRIMARY KEY (`xid`), + KEY `idx_gmt_modified_status` (`gmt_modified`,`status`), + KEY `idx_transaction_id` (`transaction_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + diff --git a/springboot-seata-transaction/lock_table.sql b/springboot-seata-transaction/lock_table.sql new file mode 100644 index 00000000..c69dc5ed --- /dev/null +++ b/springboot-seata-transaction/lock_table.sql @@ -0,0 +1,14 @@ +CREATE TABLE `lock_table` ( + `row_key` varchar(128) NOT NULL, + `xid` varchar(96) DEFAULT NULL, + `transaction_id` bigint(20) DEFAULT NULL, + `branch_id` bigint(20) NOT NULL, + `resource_id` varchar(256) DEFAULT NULL, + `table_name` varchar(32) DEFAULT NULL, + `pk` varchar(36) DEFAULT NULL, + `gmt_create` datetime DEFAULT NULL, + `gmt_modified` datetime DEFAULT NULL, + PRIMARY KEY (`row_key`), + KEY `idx_branch_id` (`branch_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + diff --git a/springboot-seata-transaction/order-server/.idea/checkstyle-idea.xml b/springboot-seata-transaction/order-server/.idea/checkstyle-idea.xml new file mode 100644 index 00000000..034029da --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/checkstyle-idea.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/compiler.xml b/springboot-seata-transaction/order-server/.idea/compiler.xml new file mode 100644 index 00000000..ed955edc --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/encodings.xml b/springboot-seata-transaction/order-server/.idea/encodings.xml new file mode 100644 index 00000000..b26911bd --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/inspectionProfiles/Project_Default.xml b/springboot-seata-transaction/order-server/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..6560a989 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/kotlinc.xml b/springboot-seata-transaction/order-server/.idea/kotlinc.xml new file mode 100644 index 00000000..1c24f9a8 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml new file mode 100644 index 00000000..b8d93d8e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml new file mode 100644 index 00000000..30ff5cb7 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__cglib_cglib_3_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__cglib_cglib_3_1.xml new file mode 100644 index 00000000..bd3cddd6 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__cglib_cglib_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml new file mode 100644 index 00000000..6fec8f43 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml new file mode 100644 index 00000000..9eb8596a --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml new file mode 100644 index 00000000..cd1d1f55 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml new file mode 100644 index 00000000..4c277844 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml new file mode 100644 index 00000000..74fcd43e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml new file mode 100644 index 00000000..169a0af7 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml new file mode 100644 index 00000000..bbd3a886 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml new file mode 100644 index 00000000..06441f49 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml new file mode 100644 index 00000000..55b3f7bf --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml new file mode 100644 index 00000000..4970251e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml new file mode 100644 index 00000000..7fc80365 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml new file mode 100644 index 00000000..23c806cf --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml new file mode 100644 index 00000000..fe2eb1bd --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml new file mode 100644 index 00000000..c08dcae2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml new file mode 100644 index 00000000..04210c56 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml new file mode 100644 index 00000000..b1ec3959 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml new file mode 100644 index 00000000..0bc971a4 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml new file mode 100644 index 00000000..1c380d0b --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml new file mode 100644 index 00000000..2888f96d --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml new file mode 100644 index 00000000..df0c40d4 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml new file mode 100644 index 00000000..36e948e2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml new file mode 100644 index 00000000..e631133b --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml new file mode 100644 index 00000000..4e15702e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml new file mode 100644 index 00000000..e956197d --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml new file mode 100644 index 00000000..c06f9997 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml new file mode 100644 index 00000000..06e92304 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml new file mode 100644 index 00000000..f19f6eb3 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml new file mode 100644 index 00000000..bd9061c2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml new file mode 100644 index 00000000..0a20711e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml new file mode 100644 index 00000000..0adf6784 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml new file mode 100644 index 00000000..588dca0f --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml new file mode 100644 index 00000000..a1a320cd --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml new file mode 100644 index 00000000..85ba8c99 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml new file mode 100644 index 00000000..c8b512e3 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml new file mode 100644 index 00000000..09c6f6e0 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml new file mode 100644 index 00000000..28cf8800 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml new file mode 100644 index 00000000..eff738de --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml new file mode 100644 index 00000000..4b0af0d6 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml new file mode 100644 index 00000000..13122699 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml new file mode 100644 index 00000000..a1ff3f02 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml new file mode 100644 index 00000000..658fe0c2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml new file mode 100644 index 00000000..837985aa --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml new file mode 100644 index 00000000..2061d8cf --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml new file mode 100644 index 00000000..2b077bc2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml new file mode 100644 index 00000000..91d65b20 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml new file mode 100644 index 00000000..be9a331e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml new file mode 100644 index 00000000..cc787214 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml new file mode 100644 index 00000000..b8581a6f --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml new file mode 100644 index 00000000..8f760a20 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml new file mode 100644 index 00000000..4c8ff546 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml new file mode 100644 index 00000000..13afda29 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml new file mode 100644 index 00000000..772d6fed --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml new file mode 100644 index 00000000..3b9dcc07 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_io_commons_io_2_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_io_commons_io_2_2.xml new file mode 100644 index 00000000..f8084ec2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_io_commons_io_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml new file mode 100644 index 00000000..18168957 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml new file mode 100644 index 00000000..2ec83767 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml new file mode 100644 index 00000000..83936486 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_core_10_2_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_core_10_2_3.xml new file mode 100644 index 00000000..5e039876 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_core_10_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_hystrix_10_2_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_hystrix_10_2_3.xml new file mode 100644 index 00000000..6b0b799e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_hystrix_10_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_slf4j_10_2_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_slf4j_10_2_3.xml new file mode 100644 index 00000000..43f04075 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_feign_slf4j_10_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_3_8_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_3_8_0.xml new file mode 100644 index 00000000..05344763 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_3_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml new file mode 100644 index 00000000..47e101ee --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml new file mode 100644 index 00000000..f57b6272 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml new file mode 100644 index 00000000..cda742ba --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml new file mode 100644 index 00000000..82613f4c --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml new file mode 100644 index 00000000..1ce62ff2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml new file mode 100644 index 00000000..f9da5f75 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml new file mode 100644 index 00000000..db5d5ce8 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml new file mode 100644 index 00000000..e74f3ab2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml new file mode 100644 index 00000000..93cf65ab --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml new file mode 100644 index 00000000..6978c0b2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml new file mode 100644 index 00000000..a0c4d766 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml new file mode 100644 index 00000000..7f95f995 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__junit_junit_4_12.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 00000000..d4110417 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml new file mode 100644 index 00000000..6c3a8221 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml new file mode 100644 index 00000000..cc556d13 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml new file mode 100644 index 00000000..d7404f23 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml new file mode 100644 index 00000000..b3d38583 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml new file mode 100644 index 00000000..10830235 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml new file mode 100644 index 00000000..fd0779a3 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml new file mode 100644 index 00000000..6998bac1 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml new file mode 100644 index 00000000..8f3e3159 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml new file mode 100644 index 00000000..34993494 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml new file mode 100644 index 00000000..c76dc2de --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml new file mode 100644 index 00000000..e95289ea --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml new file mode 100644 index 00000000..fe93f544 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml new file mode 100644 index 00000000..889bf4fb --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml new file mode 100644 index 00000000..b2884158 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml new file mode 100644 index 00000000..bae48d4f --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml new file mode 100644 index 00000000..7d9badb9 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml new file mode 100644 index 00000000..d51ce493 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml new file mode 100644 index 00000000..4d16d46c --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml new file mode 100644 index 00000000..3cc14932 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml new file mode 100644 index 00000000..f6ca3adf --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml new file mode 100644 index 00000000..ad0d4fd2 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml new file mode 100644 index 00000000..ca43e29a --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml new file mode 100644 index 00000000..5c3a057c --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml new file mode 100644 index 00000000..b5106423 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 00000000..f58bbc11 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml new file mode 100644 index 00000000..78dbe458 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml new file mode 100644 index 00000000..04cc8040 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml new file mode 100644 index 00000000..4025781f --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml new file mode 100644 index 00000000..cb848ae7 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml new file mode 100644 index 00000000..159204fc --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml new file mode 100644 index 00000000..9cb741b9 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml new file mode 100644 index 00000000..9b048c42 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml new file mode 100644 index 00000000..a9a5f328 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml new file mode 100644 index 00000000..dffb199e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml new file mode 100644 index 00000000..af41e3b6 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml new file mode 100644 index 00000000..b5e37489 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml new file mode 100644 index 00000000..9843fa42 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml new file mode 100644 index 00000000..c4c54d6d --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml new file mode 100644 index 00000000..53e9a9ec --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml new file mode 100644 index 00000000..72d40685 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml new file mode 100644 index 00000000..ddfe7f92 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..1c516036 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml new file mode 100644 index 00000000..b91c0647 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml new file mode 100644 index 00000000..6575b9b4 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml new file mode 100644 index 00000000..45a509ce --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml new file mode 100644 index 00000000..721da6f4 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml new file mode 100644 index 00000000..0412331d --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml new file mode 100644 index 00000000..b666ecb5 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml new file mode 100644 index 00000000..156a23f3 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml new file mode 100644 index 00000000..628b06c8 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml new file mode 100644 index 00000000..5d113d9c --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..bda681c9 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml new file mode 100644 index 00000000..02cd66c5 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml new file mode 100644 index 00000000..97edcec0 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml new file mode 100644 index 00000000..8a002ede --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml new file mode 100644 index 00000000..22b5d3c6 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml new file mode 100644 index 00000000..1bf99020 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml new file mode 100644 index 00000000..23416676 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_openfeign_core_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_openfeign_core_2_1_2_RELEASE.xml new file mode 100644 index 00000000..e1012461 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_openfeign_core_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml new file mode 100644 index 00000000..69d0f46a --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml new file mode 100644 index 00000000..2bf506fe --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml new file mode 100644 index 00000000..399eb16a --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml new file mode 100644 index 00000000..806fa37a --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_openfeign_2_1_2_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_openfeign_2_1_2_RELEASE.xml new file mode 100644 index 00000000..e79a4e01 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_openfeign_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml new file mode 100644 index 00000000..d09449fc --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml new file mode 100644 index 00000000..dbf9b606 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml new file mode 100644 index 00000000..3ce8ae72 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml new file mode 100644 index 00000000..71780d87 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml new file mode 100644 index 00000000..da2e132a --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml new file mode 100644 index 00000000..224ad695 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml new file mode 100644 index 00000000..e71b57d7 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml new file mode 100644 index 00000000..f50d9e85 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml new file mode 100644 index 00000000..096a5b09 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml new file mode 100644 index 00000000..6e85969d --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml new file mode 100644 index 00000000..42759eef --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml new file mode 100644 index 00000000..29e7d751 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml new file mode 100644 index 00000000..67c298f4 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml new file mode 100644 index 00000000..aed7fe22 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml new file mode 100644 index 00000000..7e63769b --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml new file mode 100644 index 00000000..0b13335e --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml new file mode 100644 index 00000000..0f2d9ef4 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml b/springboot-seata-transaction/order-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml new file mode 100644 index 00000000..6726a2d6 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/misc.xml b/springboot-seata-transaction/order-server/.idea/misc.xml new file mode 100644 index 00000000..16fa57af --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/misc.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + C:\Users\51536\AppData\Roaming\Subversion + + + + + + + + + + + + + 1.8 + + + + + + + + 1.8 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/modules.xml b/springboot-seata-transaction/order-server/.idea/modules.xml new file mode 100644 index 00000000..8a195b8f --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/0/3/03f9ae9f4a8d1118ca57f54e40ee713b48a92b66 b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/0/3/03f9ae9f4a8d1118ca57f54e40ee713b48a92b66 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/1/1/11aef519e2ce5d945da19a88e628a300fa265343 b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/1/1/11aef519e2ce5d945da19a88e628a300fa265343 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/2/1/21ecc019a75a37e0958c31d33e2ca606c953c76c b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/2/1/21ecc019a75a37e0958c31d33e2ca606c953c76c new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/2/3/2343176ac24fd7aa0f5b42dc8517df0c36bd5aed b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/2/3/2343176ac24fd7aa0f5b42dc8517df0c36bd5aed new file mode 100644 index 00000000..ea9ec317 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/2/3/2343176ac24fd7aa0f5b42dc8517df0c36bd5aed @@ -0,0 +1,5 @@ + +nsquid:CommentedOutCodeLine-"Add a "method" parameter to this "@RequestMapping" annotation.(��؜ +6 squid:S3751*"Make this method "public".(������� \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/d/8/d81b6e4a59ee2d232b9954fa471c555d3f23af26 b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/d/8/d81b6e4a59ee2d232b9954fa471c555d3f23af26 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a new file mode 100644 index 00000000..419308ed --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a @@ -0,0 +1,2 @@ + +~ squid:S1488"gImmediately return this expression instead of assigning it to the temporary variable "druidDataSource".(���� \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/e/9/e97574efa88640596a9251f8d7863442b6af6f2c b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/e/9/e97574efa88640596a9251f8d7863442b6af6f2c new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/index.pb b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 00000000..3ab7ff1d --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/sonarlint/issuestore/index.pb @@ -0,0 +1,21 @@ + +i +9src/main/java/io/seata/sample/OrderServerApplication.java,a\b\abc1ff10250977a08cc27dc5d295d33dd22822d1 +j +:src/main/java/io/seata/sample/DataSourceConfiguration.java,d\a\da4e76600ea0322632342fb429ad35044cd5ed2a +7 +pom.xml,4\4\442292b8a7efeabbe4cc176709b833b1792140ec +c +3src/main/java/io/seata/sample/feign/StorageApi.java,0\3\03f9ae9f4a8d1118ca57f54e40ee713b48a92b66 +_ +/src/main/java/io/seata/sample/entity/Order.java,d\8\d81b6e4a59ee2d232b9954fa471c555d3f23af26 +c +3src/main/java/io/seata/sample/feign/AccountApi.java,1\1\11aef519e2ce5d945da19a88e628a300fa265343 +k +;src/main/java/io/seata/sample/service/OrderServiceImpl.java,2\3\2343176ac24fd7aa0f5b42dc8517df0c36bd5aed +m +=src/main/java/io/seata/sample/controller/OrderController.java,b\a\ba416e6ba3c559bee4319dec6ef49bee89e714fb +g +7src/main/java/io/seata/sample/service/OrderService.java,2\1\21ecc019a75a37e0958c31d33e2ca606c953c76c +_ +/src/main/java/io/seata/sample/dao/OrderDao.java,e\9\e97574efa88640596a9251f8d7863442b6af6f2c \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/.idea/workspace.xml b/springboot-seata-transaction/order-server/.idea/workspace.xml new file mode 100644 index 00000000..402cfa24 --- /dev/null +++ b/springboot-seata-transaction/order-server/.idea/workspace.xml @@ -0,0 +1,925 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wangzhongxiang + IT云清 + 程序员内点事 + http://localhost:8761/eureka + sea + se + seat + seata + 修改订单状态 + + + + 程序员内点事 + 小富 ,公众号:程序员内点事 + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1605507894174 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/pom.xml b/springboot-seata-transaction/order-server/pom.xml new file mode 100644 index 00000000..740384fb --- /dev/null +++ b/springboot-seata-transaction/order-server/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + + io.seata.sample + springboot-seata-transaction + 0.0.1-SNAPSHOT + + + io.seata.sample + order-server + 0.0.1-SNAPSHOT + order-server + Demo project for Spring Boot + + + + 1.8 + Greenwich.SR2 + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/DataSourceConfiguration.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/DataSourceConfiguration.java new file mode 100644 index 00000000..4df01189 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/DataSourceConfiguration.java @@ -0,0 +1,46 @@ +package io.seata.sample; + +import com.alibaba.druid.pool.DruidDataSource; +import io.seata.rm.datasource.DataSourceProxy; +import org.apache.ibatis.session.SqlSessionFactory; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.mybatis.spring.transaction.SpringManagedTransactionFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; + +import javax.sql.DataSource; + +/** + * 数据源代理 + * @author 小富 ,公众号:程序员内点事 + */ +@Configuration +public class DataSourceConfiguration { + + @Bean + @ConfigurationProperties(prefix = "spring.datasource") + public DataSource druidDataSource(){ + DruidDataSource druidDataSource = new DruidDataSource(); + return druidDataSource; + } + + @Primary + @Bean("dataSource") + public DataSourceProxy dataSource(DataSource druidDataSource){ + return new DataSourceProxy(druidDataSource); + } + + @Bean + public SqlSessionFactory sqlSessionFactory(DataSourceProxy dataSourceProxy)throws Exception{ + SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); + sqlSessionFactoryBean.setDataSource(dataSourceProxy); + sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver() + .getResources("classpath*:/mapper/*.xml")); + sqlSessionFactoryBean.setTransactionFactory(new SpringManagedTransactionFactory()); + return sqlSessionFactoryBean.getObject(); + } + +} diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/OrderServerApplication.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/OrderServerApplication.java new file mode 100644 index 00000000..2e7d9344 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/OrderServerApplication.java @@ -0,0 +1,24 @@ +package io.seata.sample; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +/** + * 订单服务 + * @author 小富 ,公众号:程序员内点事 + */ +@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) +@MapperScan("io.seata.sample.dao") +@EnableDiscoveryClient +@EnableFeignClients +public class OrderServerApplication { + + public static void main(String[] args) { + SpringApplication.run(OrderServerApplication.class, args); + } + +} diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/controller/OrderController.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/controller/OrderController.java new file mode 100644 index 00000000..69bb0e7b --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/controller/OrderController.java @@ -0,0 +1,46 @@ +package io.seata.sample.controller; + +import io.seata.sample.entity.Order; +import io.seata.sample.service.OrderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@RestController +@RequestMapping(value = "order") +public class OrderController { + + @Autowired + private OrderService orderService; + + /** + * 创建订单 + * @param order + * @return + */ + @GetMapping("create") + public String create(Order order){ + orderService.create(order); + return "Create order success"; + } + + /** + * 修改订单状态 + * @param userId + * @param money + * @param status + * @return + */ + @RequestMapping("update") + String update(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money, @RequestParam("status") Integer status){ + orderService.update(userId,money,status); + return "订单状态修改成功"; + } +} diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/dao/OrderDao.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/dao/OrderDao.java new file mode 100644 index 00000000..8e3ad67f --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/dao/OrderDao.java @@ -0,0 +1,28 @@ +package io.seata.sample.dao; + +import io.seata.sample.entity.Order; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@Repository +public interface OrderDao { + + /** + * 创建订单 + * @param order + * @return + */ + void create(Order order); + + /** + * 修改订单金额 + * @param userId + * @param money + */ + void update(@Param("userId") Long userId,@Param("money") BigDecimal money, @Param("status") Integer status); +} diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/entity/Order.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/entity/Order.java new file mode 100644 index 00000000..e83aac99 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/entity/Order.java @@ -0,0 +1,28 @@ +package io.seata.sample.entity; + + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 订单 + * @author 小富 ,公众号:程序员内点事 + */ +@Data +public class Order { + + private Long id; + + private Long userId; + + private Long productId; + + private Integer count; + + private BigDecimal money; + + /**订单状态:0:创建中;1:已完结*/ + private Integer status; + +} diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/feign/AccountApi.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/feign/AccountApi.java new file mode 100644 index 00000000..b550fd3e --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/feign/AccountApi.java @@ -0,0 +1,23 @@ +package io.seata.sample.feign; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@FeignClient(value = "account-server") +public interface AccountApi { + + /** + * 扣减账户余额 + * @param userId 用户id + * @param money 金额 + * @return + */ + @RequestMapping("/account/decrease") + String decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money); +} diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/feign/StorageApi.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/feign/StorageApi.java new file mode 100644 index 00000000..39eeae35 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/feign/StorageApi.java @@ -0,0 +1,21 @@ +package io.seata.sample.feign; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@FeignClient(value = "storage-server") +public interface StorageApi { + + /** + * 扣减库存 + * @param productId + * @param count + * @return + */ + @GetMapping(value = "/storage/decrease") + String decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count); +} diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/service/OrderService.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/service/OrderService.java new file mode 100644 index 00000000..89105623 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/service/OrderService.java @@ -0,0 +1,25 @@ +package io.seata.sample.service; + +import io.seata.sample.entity.Order; +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +public interface OrderService { + + /** + * 创建订单 + * @param order + * @return + */ + void create(Order order); + + /** + * 修改订单状态 + * @param userId + * @param money + * @param status + */ + void update(Long userId,BigDecimal money,Integer status); +} diff --git a/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/service/OrderServiceImpl.java b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/service/OrderServiceImpl.java new file mode 100644 index 00000000..a9b66567 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/java/io/seata/sample/service/OrderServiceImpl.java @@ -0,0 +1,69 @@ +package io.seata.sample.service; + +import io.seata.core.context.RootContext; +import io.seata.sample.dao.OrderDao; +import io.seata.sample.entity.Order; +import io.seata.sample.feign.AccountApi; +import io.seata.sample.feign.StorageApi; +import io.seata.spring.annotation.GlobalTransactional; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@Service("orderServiceImpl") +public class OrderServiceImpl implements OrderService { + + private static final Logger LOGGER = LoggerFactory.getLogger(OrderServiceImpl.class); + + @Autowired + private OrderDao orderDao; + @Autowired + private StorageApi storageApi; + @Autowired + private AccountApi accountApi; + + /** + * 创建订单 + * + * @param order + * @return 测试结果: + * 1.添加本地事务:仅仅扣减库存 + * 2.不添加本地事务:创建订单,扣减库存 + */ + @Override + @GlobalTransactional(name = "fsp-create-order", rollbackFor = Exception.class) + public void create(Order order) { + + String xid = RootContext.getXID(); + + //LOGGER.info("------->交易开始"); + //本地方法 + orderDao.create(order); + + //远程方法 扣减库存 + storageApi.decrease(order.getProductId(), order.getCount()); + + //远程方法 扣减账户余额 + //LOGGER.info("------->扣减账户开始order中"); + accountApi.decrease(order.getUserId(), order.getMoney()); + //LOGGER.info("------->扣减账户结束order中"); + + //LOGGER.info("------->交易结束"); + LOGGER.info("全局事务 xid: {}", xid); + } + + /** + * 修改订单状态 + */ + @Override + public void update(Long userId, BigDecimal money, Integer status) { + LOGGER.info("修改订单状态,入参为:userId={},money={},status={}", userId, money, status); + orderDao.update(userId, money, status); + } +} diff --git a/springboot-seata-transaction/order-server/src/main/resources/application.yml b/springboot-seata-transaction/order-server/src/main/resources/application.yml new file mode 100644 index 00000000..570af5f0 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/resources/application.yml @@ -0,0 +1,40 @@ +logging: + level: + io: + seata: info +server: + port: 8180 + +eureka: + instance: + hostname: 47.93.6.5 + prefer-ip-address: true + client: + serviceUrl: + defaultZone: http://${eureka.instance.hostname}:8761/eureka/ +feign: + hystrix: + enabled: false + client: + config: + default: + connectTimeout: 5000 + readTimeout: 10000 + +spring: + application: + name: order-server + cloud: + alibaba: + seata: + tx-service-group: my_test_tx_group + datasource: + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://47.93.6.5:3306/seat-order + username: root + password: xinzhifu521 + +mybatis: + mapperLocations: classpath:mapper/*.xml + typeAliasesPackage: io.seata.sample.entity + diff --git a/springboot-seata-transaction/order-server/src/main/resources/file.conf b/springboot-seata-transaction/order-server/src/main/resources/file.conf new file mode 100644 index 00000000..e38ee829 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/resources/file.conf @@ -0,0 +1,66 @@ +transport { + # tcp udt unix-domain-socket + type = "TCP" + #NIO NATIVE + server = "NIO" + #enable heartbeat + heartbeat = true + # the client batch send request enable + enableClientBatchSendRequest = true + #thread factory for netty + threadFactory { + bossThreadPrefix = "NettyBoss" + workerThreadPrefix = "NettyServerNIOWorker" + serverExecutorThread-prefix = "NettyServerBizHandler" + shareBossWorker = false + clientSelectorThreadPrefix = "NettyClientSelector" + clientSelectorThreadSize = 1 + clientWorkerThreadPrefix = "NettyClientWorkerThread" + # netty boss thread size,will not be used for UDT + bossThreadSize = 1 + #auto default pin or 8 + workerThreadSize = "default" + } + shutdown { + # when destroy server, wait seconds + wait = 3 + } + serialization = "seata" + compressor = "none" +} +service { + #transaction service group mapping + vgroupMapping.my_test_tx_group = "default" + #only support when registry.type=file, please don't set multiple addresses + default.grouplist = "127.0.0.1:8091" + #degrade, current not support + enableDegrade = false + #disable seata + disableGlobalTransaction = false +} + +client { + rm { + asyncCommitBufferLimit = 10000 + lock { + retryInterval = 10 + retryTimes = 30 + retryPolicyBranchRollbackOnConflict = true + } + reportRetryCount = 5 + tableMetaCheckEnable = false + reportSuccessEnable = false + } + tm { + commitRetryCount = 5 + rollbackRetryCount = 5 + } + undo { + dataValidation = true + logSerialization = "jackson" + logTable = "undo_log" + } + log { + exceptionRate = 100 + } +} \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/src/main/resources/mapper/OrderMapper.xml b/springboot-seata-transaction/order-server/src/main/resources/mapper/OrderMapper.xml new file mode 100644 index 00000000..15e3f272 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/resources/mapper/OrderMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + INSERT INTO `order` (`id`,`user_id`,`product_id`,`count`,`money`,`status`) + VALUES(NULL, #{userId}, #{productId}, #{count}, #{money},0); + + + + UPDATE `order` SET money = money - #{money},status = 1 + where user_id = #{userId} and status = #{status}; + + diff --git a/springboot-seata-transaction/order-server/src/main/resources/order.sql b/springboot-seata-transaction/order-server/src/main/resources/order.sql new file mode 100644 index 00000000..6f2ddb9b --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/resources/order.sql @@ -0,0 +1,12 @@ +CREATE TABLE `order` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT, + `user_id` bigint(11) DEFAULT NULL COMMENT '用户id', + `product_id` bigint(11) DEFAULT NULL COMMENT '产品id', + `count` int(11) DEFAULT NULL COMMENT '数量', + `money` decimal(11,0) DEFAULT NULL COMMENT '金额', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; + +ALTER TABLE `order` ADD COLUMN `status` int(1) DEFAULT NULL COMMENT '订单状态:0:创建中;1:已完结' AFTER `money` ; + + diff --git a/springboot-seata-transaction/order-server/src/main/resources/registry.conf b/springboot-seata-transaction/order-server/src/main/resources/registry.conf new file mode 100644 index 00000000..2630f694 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/main/resources/registry.conf @@ -0,0 +1,82 @@ +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" + + nacos { + serverAddr = "localhost" + namespace = "" + cluster = "default" + } + eureka { + serviceUrl = "http://47.93.6.5:8761/eureka" + application = "SEATA_SERVER" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + password = "" + cluster = "default" + timeout = "0" + } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } + etcd3 { + cluster = "default" + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + application = "default" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + cluster = "default" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "" + group = "SEATA_GROUP" + } + consul { + serverAddr = "127.0.0.1:8500" + } + apollo { + app.id = "seata-server" + apollo.meta = "http://192.168.1.204:8801" + namespace = "application" + } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + file { + name = "file.conf" + } +} diff --git a/springboot-seata-transaction/order-server/src/test/java/io/seata/sample/OrderServerApplicationTests.java b/springboot-seata-transaction/order-server/src/test/java/io/seata/sample/OrderServerApplicationTests.java new file mode 100644 index 00000000..895333e2 --- /dev/null +++ b/springboot-seata-transaction/order-server/src/test/java/io/seata/sample/OrderServerApplicationTests.java @@ -0,0 +1,16 @@ +package io.seata.sample; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class OrderServerApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/springboot-seata-transaction/order-server/target/classes/application.yml b/springboot-seata-transaction/order-server/target/classes/application.yml new file mode 100644 index 00000000..570af5f0 --- /dev/null +++ b/springboot-seata-transaction/order-server/target/classes/application.yml @@ -0,0 +1,40 @@ +logging: + level: + io: + seata: info +server: + port: 8180 + +eureka: + instance: + hostname: 47.93.6.5 + prefer-ip-address: true + client: + serviceUrl: + defaultZone: http://${eureka.instance.hostname}:8761/eureka/ +feign: + hystrix: + enabled: false + client: + config: + default: + connectTimeout: 5000 + readTimeout: 10000 + +spring: + application: + name: order-server + cloud: + alibaba: + seata: + tx-service-group: my_test_tx_group + datasource: + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://47.93.6.5:3306/seat-order + username: root + password: xinzhifu521 + +mybatis: + mapperLocations: classpath:mapper/*.xml + typeAliasesPackage: io.seata.sample.entity + diff --git a/springboot-seata-transaction/order-server/target/classes/file.conf b/springboot-seata-transaction/order-server/target/classes/file.conf new file mode 100644 index 00000000..e38ee829 --- /dev/null +++ b/springboot-seata-transaction/order-server/target/classes/file.conf @@ -0,0 +1,66 @@ +transport { + # tcp udt unix-domain-socket + type = "TCP" + #NIO NATIVE + server = "NIO" + #enable heartbeat + heartbeat = true + # the client batch send request enable + enableClientBatchSendRequest = true + #thread factory for netty + threadFactory { + bossThreadPrefix = "NettyBoss" + workerThreadPrefix = "NettyServerNIOWorker" + serverExecutorThread-prefix = "NettyServerBizHandler" + shareBossWorker = false + clientSelectorThreadPrefix = "NettyClientSelector" + clientSelectorThreadSize = 1 + clientWorkerThreadPrefix = "NettyClientWorkerThread" + # netty boss thread size,will not be used for UDT + bossThreadSize = 1 + #auto default pin or 8 + workerThreadSize = "default" + } + shutdown { + # when destroy server, wait seconds + wait = 3 + } + serialization = "seata" + compressor = "none" +} +service { + #transaction service group mapping + vgroupMapping.my_test_tx_group = "default" + #only support when registry.type=file, please don't set multiple addresses + default.grouplist = "127.0.0.1:8091" + #degrade, current not support + enableDegrade = false + #disable seata + disableGlobalTransaction = false +} + +client { + rm { + asyncCommitBufferLimit = 10000 + lock { + retryInterval = 10 + retryTimes = 30 + retryPolicyBranchRollbackOnConflict = true + } + reportRetryCount = 5 + tableMetaCheckEnable = false + reportSuccessEnable = false + } + tm { + commitRetryCount = 5 + rollbackRetryCount = 5 + } + undo { + dataValidation = true + logSerialization = "jackson" + logTable = "undo_log" + } + log { + exceptionRate = 100 + } +} \ No newline at end of file diff --git a/springboot-seata-transaction/order-server/target/classes/mapper/OrderMapper.xml b/springboot-seata-transaction/order-server/target/classes/mapper/OrderMapper.xml new file mode 100644 index 00000000..15e3f272 --- /dev/null +++ b/springboot-seata-transaction/order-server/target/classes/mapper/OrderMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + INSERT INTO `order` (`id`,`user_id`,`product_id`,`count`,`money`,`status`) + VALUES(NULL, #{userId}, #{productId}, #{count}, #{money},0); + + + + UPDATE `order` SET money = money - #{money},status = 1 + where user_id = #{userId} and status = #{status}; + + diff --git a/springboot-seata-transaction/order-server/target/classes/order.sql b/springboot-seata-transaction/order-server/target/classes/order.sql new file mode 100644 index 00000000..6f2ddb9b --- /dev/null +++ b/springboot-seata-transaction/order-server/target/classes/order.sql @@ -0,0 +1,12 @@ +CREATE TABLE `order` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT, + `user_id` bigint(11) DEFAULT NULL COMMENT '用户id', + `product_id` bigint(11) DEFAULT NULL COMMENT '产品id', + `count` int(11) DEFAULT NULL COMMENT '数量', + `money` decimal(11,0) DEFAULT NULL COMMENT '金额', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; + +ALTER TABLE `order` ADD COLUMN `status` int(1) DEFAULT NULL COMMENT '订单状态:0:创建中;1:已完结' AFTER `money` ; + + diff --git a/springboot-seata-transaction/order-server/target/classes/registry.conf b/springboot-seata-transaction/order-server/target/classes/registry.conf new file mode 100644 index 00000000..2630f694 --- /dev/null +++ b/springboot-seata-transaction/order-server/target/classes/registry.conf @@ -0,0 +1,82 @@ +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" + + nacos { + serverAddr = "localhost" + namespace = "" + cluster = "default" + } + eureka { + serviceUrl = "http://47.93.6.5:8761/eureka" + application = "SEATA_SERVER" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + password = "" + cluster = "default" + timeout = "0" + } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } + etcd3 { + cluster = "default" + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + application = "default" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + cluster = "default" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "" + group = "SEATA_GROUP" + } + consul { + serverAddr = "127.0.0.1:8500" + } + apollo { + app.id = "seata-server" + apollo.meta = "http://192.168.1.204:8801" + namespace = "application" + } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + file { + name = "file.conf" + } +} diff --git a/springboot-seata-transaction/pom.xml b/springboot-seata-transaction/pom.xml new file mode 100644 index 00000000..96589ada --- /dev/null +++ b/springboot-seata-transaction/pom.xml @@ -0,0 +1,96 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + io.seata.sample + springboot-seata-transaction + 0.0.1-SNAPSHOT + pom + + springboot-seata-transaction + Demo project for Spring Boot + + + order-server + account-server + storage-server + + + + 1.8 + 5.1.37 + 2.0.0 + 1.1.10 + 1.18.8 + 1.4.0 + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-spring-boot-starter.version} + + + + mysql + mysql-connector-java + ${mysql-connector-java.version} + + + + com.alibaba + druid-spring-boot-starter + ${druid-spring-boot-starter.version} + + + + org.projectlombok + lombok + ${lombok.version} + + + + com.alibaba.cloud + spring-cloud-alibaba-seata + 2.1.0.RELEASE + + + seata-all + io.seata + + + + + io.seata + seata-all + ${seata.version} + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot-seata-transaction/storage-server/.idea/checkstyle-idea.xml b/springboot-seata-transaction/storage-server/.idea/checkstyle-idea.xml new file mode 100644 index 00000000..034029da --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/checkstyle-idea.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/compiler.xml b/springboot-seata-transaction/storage-server/.idea/compiler.xml new file mode 100644 index 00000000..00853d1a --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/encodings.xml b/springboot-seata-transaction/storage-server/.idea/encodings.xml new file mode 100644 index 00000000..b26911bd --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/inspectionProfiles/Project_Default.xml b/springboot-seata-transaction/storage-server/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..6560a989 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/kotlinc.xml b/springboot-seata-transaction/storage-server/.idea/kotlinc.xml new file mode 100644 index 00000000..1c24f9a8 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml new file mode 100644 index 00000000..b8d93d8e --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__antlr_antlr_2_7_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml new file mode 100644 index 00000000..30ff5cb7 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__cglib_cglib_3_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__cglib_cglib_3_1.xml new file mode 100644 index 00000000..bd3cddd6 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__cglib_cglib_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml new file mode 100644 index 00000000..6fec8f43 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml new file mode 100644 index 00000000..9eb8596a --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml new file mode 100644 index 00000000..cd1d1f55 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_cloud_spring_cloud_alibaba_seata_2_1_0_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml new file mode 100644 index 00000000..4c277844 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_druid_1_1_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml new file mode 100644 index 00000000..74fcd43e --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml new file mode 100644 index 00000000..169a0af7 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml new file mode 100644 index 00000000..bbd3a886 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml new file mode 100644 index 00000000..06441f49 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml new file mode 100644 index 00000000..55b3f7bf --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml new file mode 100644 index 00000000..4970251e --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml new file mode 100644 index 00000000..7fc80365 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml new file mode 100644 index 00000000..23c806cf --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml new file mode 100644 index 00000000..fe2eb1bd --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml new file mode 100644 index 00000000..c08dcae2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml new file mode 100644 index 00000000..04210c56 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_andrewoma_dexx_dexx_collections_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml new file mode 100644 index 00000000..b1ec3959 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_ben_manes_caffeine_caffeine_2_6_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml new file mode 100644 index 00000000..0bc971a4 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_github_vlsi_compactmap_compactmap_1_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml new file mode 100644 index 00000000..1c380d0b --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml new file mode 100644 index 00000000..2888f96d --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_code_gson_gson_2_8_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml new file mode 100644 index 00000000..df0c40d4 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml new file mode 100644 index 00000000..36e948e2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml new file mode 100644 index 00000000..e631133b --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_guava_27_0_1_jre.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml new file mode 100644 index 00000000..4e15702e --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml new file mode 100644 index 00000000..e956197d --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_inject_guice_4_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml new file mode 100644 index 00000000..c06f9997 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml new file mode 100644 index 00000000..06e92304 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_google_protobuf_protobuf_java_3_7_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml new file mode 100644 index 00000000..f19f6eb3 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml new file mode 100644 index 00000000..bd9061c2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml new file mode 100644 index 00000000..0a20711e --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_eureka_eureka_client_1_9_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml new file mode 100644 index 00000000..0adf6784 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_eureka_eureka_core_1_9_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml new file mode 100644 index 00000000..588dca0f --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml new file mode 100644 index 00000000..a1a320cd --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml new file mode 100644 index 00000000..85ba8c99 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_eventbus_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml new file mode 100644 index 00000000..c8b512e3 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_infix_0_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml new file mode 100644 index 00000000..09c6f6e0 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml new file mode 100644 index 00000000..28cf8800 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml new file mode 100644 index 00000000..eff738de --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml new file mode 100644 index 00000000..4b0af0d6 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_eureka_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml new file mode 100644 index 00000000..13122699 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml new file mode 100644 index 00000000..a1ff3f02 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml new file mode 100644 index 00000000..658fe0c2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml new file mode 100644 index 00000000..837985aa --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml new file mode 100644 index 00000000..2061d8cf --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml new file mode 100644 index 00000000..2b077bc2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml new file mode 100644 index 00000000..91d65b20 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml new file mode 100644 index 00000000..be9a331e --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml new file mode 100644 index 00000000..cc787214 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_typesafe_config_1_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml new file mode 100644 index 00000000..b8581a6f --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml new file mode 100644 index 00000000..8f760a20 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml new file mode 100644 index 00000000..4c8ff546 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml new file mode 100644 index 00000000..13afda29 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml new file mode 100644 index 00000000..772d6fed --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml new file mode 100644 index 00000000..18168957 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_jxpath_commons_jxpath_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml new file mode 100644 index 00000000..2ec83767 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml new file mode 100644 index 00000000..83936486 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml new file mode 100644 index 00000000..f57b6272 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_netty_netty_all_4_1_39_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml new file mode 100644 index 00000000..cda742ba --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml new file mode 100644 index 00000000..82613f4c --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml new file mode 100644 index 00000000..1ce62ff2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml new file mode 100644 index 00000000..f9da5f75 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml new file mode 100644 index 00000000..db5d5ce8 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__io_seata_seata_all_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml new file mode 100644 index 00000000..e74f3ab2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml new file mode 100644 index 00000000..93cf65ab --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_inject_javax_inject_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml new file mode 100644 index 00000000..6978c0b2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml new file mode 100644 index 00000000..a0c4d766 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml new file mode 100644 index 00000000..7f95f995 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__joda_time_joda_time_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__junit_junit_4_12.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 00000000..d4110417 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml new file mode 100644 index 00000000..6c3a8221 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_37.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml new file mode 100644 index 00000000..cc556d13 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml new file mode 100644 index 00000000..d7404f23 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml new file mode 100644 index 00000000..b3d38583 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml new file mode 100644 index 00000000..10830235 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml new file mode 100644 index 00000000..fd0779a3 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_antlr_antlr_runtime_3_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml new file mode 100644 index 00000000..6998bac1 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_antlr_stringtemplate_3_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml new file mode 100644 index 00000000..8f3e3159 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_commons_commons_math_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml new file mode 100644 index 00000000..34993494 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml new file mode 100644 index 00000000..c76dc2de --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml new file mode 100644 index 00000000..e95289ea --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml new file mode 100644 index 00000000..fe93f544 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml new file mode 100644 index 00000000..889bf4fb --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml new file mode 100644 index 00000000..b2884158 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml new file mode 100644 index 00000000..bae48d4f --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml new file mode 100644 index 00000000..7d9badb9 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_24.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml new file mode 100644 index 00000000..d51ce493 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml new file mode 100644 index 00000000..4d16d46c --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml new file mode 100644 index 00000000..3cc14932 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_60.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml new file mode 100644 index 00000000..f6ca3adf --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_60.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml new file mode 100644 index 00000000..ad0d4fd2 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_checkerframework_checker_qual_2_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml new file mode 100644 index 00000000..ca43e29a --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_jettison_jettison_1_3_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml new file mode 100644 index 00000000..5c3a057c --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_17.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml new file mode 100644 index 00000000..b5106423 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 00000000..f58bbc11 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml new file mode 100644 index 00000000..78dbe458 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml new file mode 100644 index 00000000..04cc8040 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml new file mode 100644 index 00000000..4025781f --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_17_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml new file mode 100644 index 00000000..cb848ae7 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_3_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml new file mode 100644 index 00000000..159204fc --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml new file mode 100644 index 00000000..9cb741b9 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_mybatis_3_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml new file mode 100644 index 00000000..9b048c42 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml new file mode 100644 index 00000000..a9a5f328 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml new file mode 100644 index 00000000..dffb199e --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml new file mode 100644 index 00000000..af41e3b6 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml new file mode 100644 index 00000000..b5e37489 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_ow2_asm_asm_4_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml new file mode 100644 index 00000000..9843fa42 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml new file mode 100644 index 00000000..c4c54d6d --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml new file mode 100644 index 00000000..53e9a9ec --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_28.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml new file mode 100644 index 00000000..72d40685 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_28.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml new file mode 100644 index 00000000..ddfe7f92 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..1c516036 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml new file mode 100644 index 00000000..b91c0647 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml new file mode 100644 index 00000000..6575b9b4 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml new file mode 100644 index 00000000..45a509ce --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml new file mode 100644 index 00000000..721da6f4 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml new file mode 100644 index 00000000..0412331d --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml new file mode 100644 index 00000000..b666ecb5 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml new file mode 100644 index 00000000..156a23f3 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml new file mode 100644 index 00000000..628b06c8 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml new file mode 100644 index 00000000..5d113d9c --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml new file mode 100644 index 00000000..bda681c9 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_8_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml new file mode 100644 index 00000000..02cd66c5 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml new file mode 100644 index 00000000..97edcec0 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml new file mode 100644 index 00000000..8a002ede --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml new file mode 100644 index 00000000..22b5d3c6 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_eureka_client_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml new file mode 100644 index 00000000..1bf99020 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_hystrix_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml new file mode 100644 index 00000000..23416676 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml new file mode 100644 index 00000000..69d0f46a --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml new file mode 100644 index 00000000..2bf506fe --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml new file mode 100644 index 00000000..399eb16a --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_eureka_client_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml new file mode 100644 index 00000000..806fa37a --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml new file mode 100644 index 00000000..d09449fc --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_5_1_6_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml new file mode 100644 index 00000000..dbf9b606 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_7_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml new file mode 100644 index 00000000..3ce8ae72 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_aop_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml new file mode 100644 index 00000000..71780d87 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_beans_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml new file mode 100644 index 00000000..da2e132a --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_context_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml new file mode 100644 index 00000000..224ad695 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_core_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml new file mode 100644 index 00000000..e71b57d7 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_expression_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml new file mode 100644 index 00000000..f50d9e85 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml new file mode 100644 index 00000000..096a5b09 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml new file mode 100644 index 00000000..6e85969d --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_test_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml new file mode 100644 index 00000000..42759eef --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_tx_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml new file mode 100644 index 00000000..29e7d751 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_web_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml new file mode 100644 index 00000000..67c298f4 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml new file mode 100644 index 00000000..aed7fe22 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml new file mode 100644 index 00000000..7e63769b --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml new file mode 100644 index 00000000..0b13335e --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__stax_stax_api_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml new file mode 100644 index 00000000..0f2d9ef4 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml new file mode 100644 index 00000000..6726a2d6 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/misc.xml b/springboot-seata-transaction/storage-server/.idea/misc.xml new file mode 100644 index 00000000..16fa57af --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/misc.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + C:\Users\51536\AppData\Roaming\Subversion + + + + + + + + + + + + + 1.8 + + + + + + + + 1.8 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/modules.xml b/springboot-seata-transaction/storage-server/.idea/modules.xml new file mode 100644 index 00000000..98b4b1bb --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/2/f/2f324c84c21629927ce8ebdbc706c0e10adb83aa b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/2/f/2f324c84c21629927ce8ebdbc706c0e10adb83aa new file mode 100644 index 00000000..ff1e34f3 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/2/f/2f324c84c21629927ce8ebdbc706c0e10adb83aa @@ -0,0 +1,2 @@ + +Z squid:S3752">Add a "method" parameter to this "@RequestMapping" annotation.(�Ϣ������ \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/3/8/3860200eca3be1cd9d6c07d5200754a342fc6166 b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/3/8/3860200eca3be1cd9d6c07d5200754a342fc6166 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/4/4/442292b8a7efeabbe4cc176709b833b1792140ec b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/4/4/442292b8a7efeabbe4cc176709b833b1792140ec new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/5/5/556e1dc47bd6550c5abebb4017da0759b6059a47 b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/5/5/556e1dc47bd6550c5abebb4017da0759b6059a47 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/d/7/d7381c0880607c2f17713fe2fe39ae807d3e2d4c b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/d/7/d7381c0880607c2f17713fe2fe39ae807d3e2d4c new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a new file mode 100644 index 00000000..419308ed --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/d/a/da4e76600ea0322632342fb429ad35044cd5ed2a @@ -0,0 +1,2 @@ + +~ squid:S1488"gImmediately return this expression instead of assigning it to the temporary variable "druidDataSource".(���� \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/e/4/e483aafa036024410e892b20d79613f53dcd2c40 b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/e/4/e483aafa036024410e892b20d79613f53dcd2c40 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/e/7/e76a21c945bcae708dad165873fb48a205326a88 b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/e/7/e76a21c945bcae708dad165873fb48a205326a88 new file mode 100644 index 00000000..e69de29b diff --git a/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/index.pb b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 00000000..5f9adc01 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/sonarlint/issuestore/index.pb @@ -0,0 +1,17 @@ + +k +;src/main/java/io/seata/sample/StorageServerApplication.java,d\7\d7381c0880607c2f17713fe2fe39ae807d3e2d4c +o +?src/main/java/io/seata/sample/controller/StorageController.java,2\f\2f324c84c21629927ce8ebdbc706c0e10adb83aa +j +:src/main/java/io/seata/sample/DataSourceConfiguration.java,d\a\da4e76600ea0322632342fb429ad35044cd5ed2a +a +1src/main/java/io/seata/sample/entity/Storage.java,e\4\e483aafa036024410e892b20d79613f53dcd2c40 +i +9src/main/java/io/seata/sample/service/StorageService.java,3\8\3860200eca3be1cd9d6c07d5200754a342fc6166 +7 +pom.xml,4\4\442292b8a7efeabbe4cc176709b833b1792140ec +a +1src/main/java/io/seata/sample/dao/StorageDao.java,5\5\556e1dc47bd6550c5abebb4017da0759b6059a47 +m +=src/main/java/io/seata/sample/service/StorageServiceImpl.java,e\7\e76a21c945bcae708dad165873fb48a205326a88 \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/.idea/workspace.xml b/springboot-seata-transaction/storage-server/.idea/workspace.xml new file mode 100644 index 00000000..c0863ec5 --- /dev/null +++ b/springboot-seata-transaction/storage-server/.idea/workspace.xml @@ -0,0 +1,864 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + registry + wangzhongxiang + IT云清 + 程序员内点事 + s + seat + default + + + + 程序员内点事 + 小富 ,公众号:程序员内点事 + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1605507908111 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/pom.xml b/springboot-seata-transaction/storage-server/pom.xml new file mode 100644 index 00000000..bbac8c50 --- /dev/null +++ b/springboot-seata-transaction/storage-server/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + + io.seata.sample + springboot-seata-transaction + 0.0.1-SNAPSHOT + + + io.seata.sample + storage-server + 0.0.1-SNAPSHOT + storage-server + Demo project for Spring Boot + + + 1.8 + Greenwich.SR2 + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.cloud + spring-cloud-starter-netflix-eureka-client + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/DataSourceConfiguration.java b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/DataSourceConfiguration.java new file mode 100644 index 00000000..9f2f361d --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/DataSourceConfiguration.java @@ -0,0 +1,46 @@ +package io.seata.sample; + +import com.alibaba.druid.pool.DruidDataSource; +import io.seata.rm.datasource.DataSourceProxy; +import org.apache.ibatis.session.SqlSessionFactory; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.mybatis.spring.transaction.SpringManagedTransactionFactory; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; + +import javax.sql.DataSource; + +/** + * 数据源代理 + * @author 小富 ,公众号:程序员内点事 + */ +@Configuration +public class DataSourceConfiguration { + + @Bean + @ConfigurationProperties(prefix = "spring.datasource") + public DataSource druidDataSource(){ + DruidDataSource druidDataSource = new DruidDataSource(); + return druidDataSource; + } + + @Primary + @Bean("dataSource") + public DataSourceProxy dataSource(DataSource druidDataSource){ + return new DataSourceProxy(druidDataSource); + } + + @Bean + public SqlSessionFactory sqlSessionFactory(DataSourceProxy dataSourceProxy)throws Exception{ + SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); + sqlSessionFactoryBean.setDataSource(dataSourceProxy); + sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver() + .getResources("classpath*:/mapper/*.xml")); + sqlSessionFactoryBean.setTransactionFactory(new SpringManagedTransactionFactory()); + return sqlSessionFactoryBean.getObject(); + } + +} diff --git a/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/StorageServerApplication.java b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/StorageServerApplication.java new file mode 100644 index 00000000..2626af5e --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/StorageServerApplication.java @@ -0,0 +1,20 @@ +package io.seata.sample; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; + +/** + * 库存服务 + * @author 小富 ,公众号:程序员内点事 + */ +@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) +@MapperScan("io.seata.sample.dao") +public class StorageServerApplication { + + public static void main(String[] args) { + SpringApplication.run(StorageServerApplication.class, args); + } + +} diff --git a/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/controller/StorageController.java b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/controller/StorageController.java new file mode 100644 index 00000000..13e3e0ee --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/controller/StorageController.java @@ -0,0 +1,31 @@ +package io.seata.sample.controller; + + +import io.seata.sample.service.StorageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@RestController +@RequestMapping("storage") +public class StorageController { + + @Autowired + private StorageService storageServiceImpl; + + /** + * 扣减库存 + * @param productId 产品id + * @param count 数量 + * @return + */ + @RequestMapping("decrease") + public String decrease(@RequestParam("productId") Long productId,@RequestParam("count") Integer count){ + storageServiceImpl.decrease(productId,count); + return "Decrease storage success"; + } +} diff --git a/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/dao/StorageDao.java b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/dao/StorageDao.java new file mode 100644 index 00000000..ee9e58c1 --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/dao/StorageDao.java @@ -0,0 +1,19 @@ +package io.seata.sample.dao; + +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@Repository +public interface StorageDao { + + /** + * 扣减库存 + * @param productId 产品id + * @param count 数量 + * @return + */ + void decrease(@Param("productId") Long productId, @Param("count") Integer count); +} diff --git a/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/entity/Storage.java b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/entity/Storage.java new file mode 100644 index 00000000..63790e0f --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/entity/Storage.java @@ -0,0 +1,24 @@ +package io.seata.sample.entity; + +import lombok.Data; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@Data +public class Storage { + + private Long id; + + /**产品id*/ + private Long productId; + + /**总库存*/ + private Integer total; + + /**已用库存*/ + private Integer used; + + /**剩余库存*/ + private Integer residue; +} diff --git a/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/service/StorageService.java b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/service/StorageService.java new file mode 100644 index 00000000..46f7cb4e --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/service/StorageService.java @@ -0,0 +1,15 @@ +package io.seata.sample.service; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +public interface StorageService { + + /** + * 扣减库存 + * @param productId 产品id + * @param count 数量 + * @return + */ + void decrease(Long productId, Integer count); +} diff --git a/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/service/StorageServiceImpl.java b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/service/StorageServiceImpl.java new file mode 100644 index 00000000..fb991fc0 --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/java/io/seata/sample/service/StorageServiceImpl.java @@ -0,0 +1,35 @@ +package io.seata.sample.service; + +import io.seata.core.context.RootContext; +import io.seata.sample.dao.StorageDao; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author 小富 ,公众号:程序员内点事 + */ +@Service("storageServiceImpl") +public class StorageServiceImpl implements StorageService { + + private static final Logger LOGGER = LoggerFactory.getLogger(StorageServiceImpl.class); + + @Autowired + private StorageDao storageDao; + + /** + * 扣减库存 + * @param productId 产品id + * @param count 数量 + * @return + */ + @Override + public void decrease(Long productId, Integer count) { + String xid = RootContext.getXID(); + LOGGER.info("全局事务 xid: {}", xid); + LOGGER.info("------->扣减库存开始"); + storageDao.decrease(productId,count); + LOGGER.info("------->扣减库存结束"); + } +} diff --git a/springboot-seata-transaction/storage-server/src/main/resources/application.yml b/springboot-seata-transaction/storage-server/src/main/resources/application.yml new file mode 100644 index 00000000..dedafe3b --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/resources/application.yml @@ -0,0 +1,36 @@ +server: + port: 8182 + +# seata 日志级别 +logging: + level: + io: + seata: info + +# 数据源 seata 事务分组 +spring: + application: + name: storage-server + cloud: + alibaba: + seata: + tx-service-group: my_test_tx_group + datasource: + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://47.93.6.5:3306/seat-storage + username: root + password: xinzhifu521 + +# eureka 注册中心 +eureka: + client: + serviceUrl: + defaultZone: http://${eureka.instance.hostname}:8761/eureka/ + instance: + hostname: 47.93.6.5 + prefer-ip-address: true + +# mybatis 配置 +mybatis: + mapperLocations: classpath:mapper/*.xml + typeAliasesPackage: io.seata.sample.entity \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/src/main/resources/file.conf b/springboot-seata-transaction/storage-server/src/main/resources/file.conf new file mode 100644 index 00000000..e38ee829 --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/resources/file.conf @@ -0,0 +1,66 @@ +transport { + # tcp udt unix-domain-socket + type = "TCP" + #NIO NATIVE + server = "NIO" + #enable heartbeat + heartbeat = true + # the client batch send request enable + enableClientBatchSendRequest = true + #thread factory for netty + threadFactory { + bossThreadPrefix = "NettyBoss" + workerThreadPrefix = "NettyServerNIOWorker" + serverExecutorThread-prefix = "NettyServerBizHandler" + shareBossWorker = false + clientSelectorThreadPrefix = "NettyClientSelector" + clientSelectorThreadSize = 1 + clientWorkerThreadPrefix = "NettyClientWorkerThread" + # netty boss thread size,will not be used for UDT + bossThreadSize = 1 + #auto default pin or 8 + workerThreadSize = "default" + } + shutdown { + # when destroy server, wait seconds + wait = 3 + } + serialization = "seata" + compressor = "none" +} +service { + #transaction service group mapping + vgroupMapping.my_test_tx_group = "default" + #only support when registry.type=file, please don't set multiple addresses + default.grouplist = "127.0.0.1:8091" + #degrade, current not support + enableDegrade = false + #disable seata + disableGlobalTransaction = false +} + +client { + rm { + asyncCommitBufferLimit = 10000 + lock { + retryInterval = 10 + retryTimes = 30 + retryPolicyBranchRollbackOnConflict = true + } + reportRetryCount = 5 + tableMetaCheckEnable = false + reportSuccessEnable = false + } + tm { + commitRetryCount = 5 + rollbackRetryCount = 5 + } + undo { + dataValidation = true + logSerialization = "jackson" + logTable = "undo_log" + } + log { + exceptionRate = 100 + } +} \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/src/main/resources/mapper/StorageMapper.xml b/springboot-seata-transaction/storage-server/src/main/resources/mapper/StorageMapper.xml new file mode 100644 index 00000000..639ff7d0 --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/resources/mapper/StorageMapper.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + UPDATE storage SET used = used + #{count},residue = residue - #{count} WHERE product_id = #{productId} + + diff --git a/springboot-seata-transaction/storage-server/src/main/resources/registry.conf b/springboot-seata-transaction/storage-server/src/main/resources/registry.conf new file mode 100644 index 00000000..2630f694 --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/resources/registry.conf @@ -0,0 +1,82 @@ +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" + + nacos { + serverAddr = "localhost" + namespace = "" + cluster = "default" + } + eureka { + serviceUrl = "http://47.93.6.5:8761/eureka" + application = "SEATA_SERVER" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + password = "" + cluster = "default" + timeout = "0" + } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } + etcd3 { + cluster = "default" + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + application = "default" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + cluster = "default" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "" + group = "SEATA_GROUP" + } + consul { + serverAddr = "127.0.0.1:8500" + } + apollo { + app.id = "seata-server" + apollo.meta = "http://192.168.1.204:8801" + namespace = "application" + } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + file { + name = "file.conf" + } +} diff --git a/springboot-seata-transaction/storage-server/src/main/resources/storage.sql b/springboot-seata-transaction/storage-server/src/main/resources/storage.sql new file mode 100644 index 00000000..2c5afb1d --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/main/resources/storage.sql @@ -0,0 +1,10 @@ +CREATE TABLE `storage` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT, + `product_id` bigint(11) DEFAULT NULL COMMENT '产品id', + `total` int(11) DEFAULT NULL COMMENT '总库存', + `used` int(11) DEFAULT NULL COMMENT '已用库存', + `residue` int(11) DEFAULT NULL COMMENT '剩余库存', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; + +INSERT INTO `seat-storage`.`storage` (`id`, `product_id`, `total`, `used`, `residue`) VALUES ('1', '1', '100', '0', '100'); diff --git a/springboot-seata-transaction/storage-server/src/test/java/io/seata/sample/StorageServerApplicationTests.java b/springboot-seata-transaction/storage-server/src/test/java/io/seata/sample/StorageServerApplicationTests.java new file mode 100644 index 00000000..a92acc4b --- /dev/null +++ b/springboot-seata-transaction/storage-server/src/test/java/io/seata/sample/StorageServerApplicationTests.java @@ -0,0 +1,16 @@ +package io.seata.sample; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class StorageServerApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/springboot-seata-transaction/storage-server/target/classes/application.yml b/springboot-seata-transaction/storage-server/target/classes/application.yml new file mode 100644 index 00000000..dedafe3b --- /dev/null +++ b/springboot-seata-transaction/storage-server/target/classes/application.yml @@ -0,0 +1,36 @@ +server: + port: 8182 + +# seata 日志级别 +logging: + level: + io: + seata: info + +# 数据源 seata 事务分组 +spring: + application: + name: storage-server + cloud: + alibaba: + seata: + tx-service-group: my_test_tx_group + datasource: + driver-class-name: com.mysql.jdbc.Driver + url: jdbc:mysql://47.93.6.5:3306/seat-storage + username: root + password: xinzhifu521 + +# eureka 注册中心 +eureka: + client: + serviceUrl: + defaultZone: http://${eureka.instance.hostname}:8761/eureka/ + instance: + hostname: 47.93.6.5 + prefer-ip-address: true + +# mybatis 配置 +mybatis: + mapperLocations: classpath:mapper/*.xml + typeAliasesPackage: io.seata.sample.entity \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/target/classes/file.conf b/springboot-seata-transaction/storage-server/target/classes/file.conf new file mode 100644 index 00000000..e38ee829 --- /dev/null +++ b/springboot-seata-transaction/storage-server/target/classes/file.conf @@ -0,0 +1,66 @@ +transport { + # tcp udt unix-domain-socket + type = "TCP" + #NIO NATIVE + server = "NIO" + #enable heartbeat + heartbeat = true + # the client batch send request enable + enableClientBatchSendRequest = true + #thread factory for netty + threadFactory { + bossThreadPrefix = "NettyBoss" + workerThreadPrefix = "NettyServerNIOWorker" + serverExecutorThread-prefix = "NettyServerBizHandler" + shareBossWorker = false + clientSelectorThreadPrefix = "NettyClientSelector" + clientSelectorThreadSize = 1 + clientWorkerThreadPrefix = "NettyClientWorkerThread" + # netty boss thread size,will not be used for UDT + bossThreadSize = 1 + #auto default pin or 8 + workerThreadSize = "default" + } + shutdown { + # when destroy server, wait seconds + wait = 3 + } + serialization = "seata" + compressor = "none" +} +service { + #transaction service group mapping + vgroupMapping.my_test_tx_group = "default" + #only support when registry.type=file, please don't set multiple addresses + default.grouplist = "127.0.0.1:8091" + #degrade, current not support + enableDegrade = false + #disable seata + disableGlobalTransaction = false +} + +client { + rm { + asyncCommitBufferLimit = 10000 + lock { + retryInterval = 10 + retryTimes = 30 + retryPolicyBranchRollbackOnConflict = true + } + reportRetryCount = 5 + tableMetaCheckEnable = false + reportSuccessEnable = false + } + tm { + commitRetryCount = 5 + rollbackRetryCount = 5 + } + undo { + dataValidation = true + logSerialization = "jackson" + logTable = "undo_log" + } + log { + exceptionRate = 100 + } +} \ No newline at end of file diff --git a/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/DataSourceConfiguration.class b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/DataSourceConfiguration.class new file mode 100644 index 00000000..25594dc5 Binary files /dev/null and b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/DataSourceConfiguration.class differ diff --git a/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/StorageServerApplication.class b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/StorageServerApplication.class new file mode 100644 index 00000000..640ea415 Binary files /dev/null and b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/StorageServerApplication.class differ diff --git a/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/controller/StorageController.class b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/controller/StorageController.class new file mode 100644 index 00000000..5bf91c85 Binary files /dev/null and b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/controller/StorageController.class differ diff --git a/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/dao/StorageDao.class b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/dao/StorageDao.class new file mode 100644 index 00000000..4c0bc286 Binary files /dev/null and b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/dao/StorageDao.class differ diff --git a/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/entity/Storage.class b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/entity/Storage.class new file mode 100644 index 00000000..a048fce4 Binary files /dev/null and b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/entity/Storage.class differ diff --git a/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/service/StorageService.class b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/service/StorageService.class new file mode 100644 index 00000000..a7df6c71 Binary files /dev/null and b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/service/StorageService.class differ diff --git a/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/service/StorageServiceImpl.class b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/service/StorageServiceImpl.class new file mode 100644 index 00000000..2031f70f Binary files /dev/null and b/springboot-seata-transaction/storage-server/target/classes/io/seata/sample/service/StorageServiceImpl.class differ diff --git a/springboot-seata-transaction/storage-server/target/classes/mapper/StorageMapper.xml b/springboot-seata-transaction/storage-server/target/classes/mapper/StorageMapper.xml new file mode 100644 index 00000000..639ff7d0 --- /dev/null +++ b/springboot-seata-transaction/storage-server/target/classes/mapper/StorageMapper.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + UPDATE storage SET used = used + #{count},residue = residue - #{count} WHERE product_id = #{productId} + + diff --git a/springboot-seata-transaction/storage-server/target/classes/registry.conf b/springboot-seata-transaction/storage-server/target/classes/registry.conf new file mode 100644 index 00000000..2630f694 --- /dev/null +++ b/springboot-seata-transaction/storage-server/target/classes/registry.conf @@ -0,0 +1,82 @@ +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "eureka" + + nacos { + serverAddr = "localhost" + namespace = "" + cluster = "default" + } + eureka { + serviceUrl = "http://47.93.6.5:8761/eureka" + application = "SEATA_SERVER" + weight = "1" + } + redis { + serverAddr = "localhost:6379" + db = "0" + password = "" + cluster = "default" + timeout = "0" + } + zk { + cluster = "default" + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + consul { + cluster = "default" + serverAddr = "127.0.0.1:8500" + } + etcd3 { + cluster = "default" + serverAddr = "http://localhost:2379" + } + sofa { + serverAddr = "127.0.0.1:9603" + application = "default" + region = "DEFAULT_ZONE" + datacenter = "DefaultDataCenter" + cluster = "default" + group = "SEATA_GROUP" + addressWaitTime = "3000" + } + file { + name = "file.conf" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3、springCloudConfig + type = "file" + + nacos { + serverAddr = "localhost" + namespace = "" + group = "SEATA_GROUP" + } + consul { + serverAddr = "127.0.0.1:8500" + } + apollo { + app.id = "seata-server" + apollo.meta = "http://192.168.1.204:8801" + namespace = "application" + } + zk { + serverAddr = "127.0.0.1:2181" + session.timeout = 6000 + connect.timeout = 2000 + username = "" + password = "" + } + etcd3 { + serverAddr = "http://localhost:2379" + } + file { + name = "file.conf" + } +} diff --git a/springboot-seata-transaction/storage-server/target/classes/storage.sql b/springboot-seata-transaction/storage-server/target/classes/storage.sql new file mode 100644 index 00000000..2c5afb1d --- /dev/null +++ b/springboot-seata-transaction/storage-server/target/classes/storage.sql @@ -0,0 +1,10 @@ +CREATE TABLE `storage` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT, + `product_id` bigint(11) DEFAULT NULL COMMENT '产品id', + `total` int(11) DEFAULT NULL COMMENT '总库存', + `used` int(11) DEFAULT NULL COMMENT '已用库存', + `residue` int(11) DEFAULT NULL COMMENT '剩余库存', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; + +INSERT INTO `seat-storage`.`storage` (`id`, `product_id`, `total`, `used`, `residue`) VALUES ('1', '1', '100', '0', '100'); diff --git a/springboot-seata-transaction/storage-server/target/test-classes/io/seata/sample/StorageServerApplicationTests.class b/springboot-seata-transaction/storage-server/target/test-classes/io/seata/sample/StorageServerApplicationTests.class new file mode 100644 index 00000000..8bcd52f2 Binary files /dev/null and b/springboot-seata-transaction/storage-server/target/test-classes/io/seata/sample/StorageServerApplicationTests.class differ diff --git a/springboot-sharding-jdbc/README.md b/springboot-sharding-jdbc/README.md new file mode 100644 index 00000000..45e2c093 --- /dev/null +++ b/springboot-sharding-jdbc/README.md @@ -0,0 +1 @@ +springboot-sharding-jdbc 分库分表案例 \ No newline at end of file diff --git a/springboot-sharding-jdbc/pom.xml b/springboot-sharding-jdbc/pom.xml new file mode 100644 index 00000000..032b348e --- /dev/null +++ b/springboot-sharding-jdbc/pom.xml @@ -0,0 +1,100 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-sharding-jdbc + 0.0.1-SNAPSHOT + springboot-sharding-jdbc + + + 4.0.0-RC1 + + + + + + com.baomidou + mybatis-plus-boot-starter + 3.1.0 + + + + com.alibaba + druid-spring-boot-starter + 1.1.10 + + + + org.apache.shardingsphere + sharding-jdbc-spring-boot-starter + 4.0.0-RC1 + + + + org.apache.shardingsphere + sharding-core-common + 4.0.0-RC1 + + + + + org.springframework.boot + spring-boot-devtools + + true + + runtime + + + + + com.github.ulisesbocchio + jasypt-spring-boot-starter + 1.14 + + + + + + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + true + + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + ${basedir}/src/main/resources/generator/generatorConfig.xml + true + true + + + + mysql + mysql-connector-java + 8.0.20 + + + + + + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/SpringbootShardingJdbcApplication.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/SpringbootShardingJdbcApplication.java new file mode 100644 index 00000000..604fd5ca --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/SpringbootShardingJdbcApplication.java @@ -0,0 +1,15 @@ +package com.xiaofu.sharding; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@MapperScan(basePackages = "com.xiaofu.sharding.mapper") +@SpringBootApplication +public class SpringbootShardingJdbcApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringbootShardingJdbcApplication.class, args); + } + +} diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBComplexKeysShardingAlgorithm.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBComplexKeysShardingAlgorithm.java new file mode 100644 index 00000000..2e2e718c --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBComplexKeysShardingAlgorithm.java @@ -0,0 +1,50 @@ +package com.xiaofu.sharding.algorithm.dbAlgorithm; + + +import org.apache.shardingsphere.api.sharding.complex.ComplexKeysShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.complex.ComplexKeysShardingValue; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * @author xiaofu 公众号【程序员内点事】 + * @description 自定义复合分库策略 + * @date 2020/10/30 13:48 + */ +public class MyDBComplexKeysShardingAlgorithm implements ComplexKeysShardingAlgorithm { + + @Override + public Collection doSharding(Collection databaseNames, ComplexKeysShardingValue complexKeysShardingValue) { + // 得到每个分片健对应的值 + Collection orderIdValues = this.getShardingValue(complexKeysShardingValue, "order_id"); + Collection userIdValues = this.getShardingValue(complexKeysShardingValue, "user_id"); + + List shardingSuffix = new ArrayList<>(); + // 对两个分片健同时取模的方式分库 + for (Integer userId : userIdValues) { + for (Integer orderId : orderIdValues) { + String suffix = userId % 2 + "_" + orderId % 2; + for (String databaseName : databaseNames) { + if (databaseName.endsWith(suffix)) { + shardingSuffix.add(databaseName); + } + } + } + } + return shardingSuffix; + } + + private Collection getShardingValue(ComplexKeysShardingValue shardingValues, final String key) { + Collection valueSet = new ArrayList<>(); + Map> columnNameAndShardingValuesMap = shardingValues.getColumnNameAndShardingValuesMap(); + if (columnNameAndShardingValuesMap.containsKey(key)) { + valueSet.addAll(columnNameAndShardingValuesMap.get(key)); + } + return valueSet; + } +} + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBHintShardingAlgorithm.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBHintShardingAlgorithm.java new file mode 100644 index 00000000..9e5d5b61 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBHintShardingAlgorithm.java @@ -0,0 +1,32 @@ +package com.xiaofu.sharding.algorithm.dbAlgorithm; + + +import org.apache.shardingsphere.api.sharding.hint.HintShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.hint.HintShardingValue; + +import java.util.ArrayList; +import java.util.Collection; + + +public class MyDBHintShardingAlgorithm implements HintShardingAlgorithm { + + @Override + public Collection doSharding(Collection databaseNames, HintShardingValue hintShardingValue) { + + Collection result = new ArrayList<>(); + for (String databaseName : databaseNames) { + + Collection values = hintShardingValue.getValues(); + + for (String shardingValue : values) { + if (databaseName.endsWith(String.valueOf(Long.valueOf(shardingValue) % databaseNames.size()))) { + result.add(databaseName); + } + } + } + return result; + } + +} + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBPreciseShardingAlgorithm.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBPreciseShardingAlgorithm.java new file mode 100644 index 00000000..b93e73b4 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBPreciseShardingAlgorithm.java @@ -0,0 +1,33 @@ +package com.xiaofu.sharding.algorithm.dbAlgorithm; + + +import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue; + +import java.util.Collection; + +/** + * @author xiaofu 公众号【程序员内点事】 + * @description 自定义标准分库策略 + * @date 2020/10/30 13:48 + */ +public class MyDBPreciseShardingAlgorithm implements PreciseShardingAlgorithm { + + @Override + public String doSharding(Collection databaseNames, PreciseShardingValue shardingValue) { + + /** + * databaseNames 所有分片库的集合 + * shardingValue 为分片属性,其中 logicTableName 为逻辑表,columnName 分片健(字段),value 为从 SQL 中解析出的分片健的值 + */ + for (String databaseName : databaseNames) { + String value = shardingValue.getValue() % databaseNames.size() + ""; + if (databaseName.endsWith(value)) { + return databaseName; + } + } + throw new IllegalArgumentException(); + } +} + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBRangeShardingAlgorithm.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBRangeShardingAlgorithm.java new file mode 100644 index 00000000..dc5caf34 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/dbAlgorithm/MyDBRangeShardingAlgorithm.java @@ -0,0 +1,37 @@ +package com.xiaofu.sharding.algorithm.dbAlgorithm; + + +import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue; + +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.Set; + +/** + * @author xinzhifu + * @description 范围分库算法 + * @date 2020/11/2 12:06 + */ +public class MyDBRangeShardingAlgorithm implements RangeShardingAlgorithm { + + @Override + public Collection doSharding(Collection databaseNames, RangeShardingValue rangeShardingValue) { + + Set result = new LinkedHashSet<>(); + // between and 的起始值 + int lower = rangeShardingValue.getValueRange().lowerEndpoint(); + int upper = rangeShardingValue.getValueRange().upperEndpoint(); + // 循环范围计算分库逻辑 + for (int i = lower; i <= upper; i++) { + for (String databaseName : databaseNames) { + if (databaseName.endsWith(i % databaseNames.size() + "")) { + result.add(databaseName); + } + } + } + return result; + } +} + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableComplexKeysShardingAlgorithm.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableComplexKeysShardingAlgorithm.java new file mode 100644 index 00000000..d420d6ff --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableComplexKeysShardingAlgorithm.java @@ -0,0 +1,25 @@ +package com.xiaofu.sharding.algorithm.tableAlgorithm; + + +import org.apache.shardingsphere.api.sharding.complex.ComplexKeysShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.complex.ComplexKeysShardingValue; + +import java.util.Collection; + +/** + * @author xiaofu 公众号【程序员内点事】 + * @description 自定义复合分表策略 + * @date 2020/10/30 13:48 + */ +public class MyTableComplexKeysShardingAlgorithm implements ComplexKeysShardingAlgorithm { + + @Override + public Collection doSharding(Collection collection, ComplexKeysShardingValue complexKeysShardingValue) { + +// Collection ids = getShardingValue(shardingValues, "id"); +// Collection usernames = getShardingValue(shardingValues, "username"); + return null; + } +} + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableHintShardingAlgorithm.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableHintShardingAlgorithm.java new file mode 100644 index 00000000..78f8f540 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableHintShardingAlgorithm.java @@ -0,0 +1,33 @@ +package com.xiaofu.sharding.algorithm.tableAlgorithm; + + +import org.apache.shardingsphere.api.sharding.hint.HintShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.hint.HintShardingValue; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * @author xinzhifu + * @description hit分表算法 + * @date 2020/11/2 12:06 + */ +public class MyTableHintShardingAlgorithm implements HintShardingAlgorithm { + + @Override + public Collection doSharding(Collection tableNames, HintShardingValue hintShardingValue) { + + Collection result = new ArrayList<>(); + for (String tableName : tableNames) { + Collection values = hintShardingValue.getValues(); + for (String shardingValue : values) { + if (tableName.endsWith(String.valueOf(Long.valueOf(shardingValue) % tableNames.size()))) { + result.add(tableName); + } + } + } + return result; + } +} + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTablePreciseShardingAlgorithm.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTablePreciseShardingAlgorithm.java new file mode 100644 index 00000000..43aa266c --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTablePreciseShardingAlgorithm.java @@ -0,0 +1,36 @@ +package com.xiaofu.sharding.algorithm.tableAlgorithm; + + +import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue; + +import java.util.Collection; + +/** + * @author xiaofu 公众号【程序员内点事】 + * @description 自定义标准分表策略 + * @date 2020/10/30 13:48 + */ +public class MyTablePreciseShardingAlgorithm implements PreciseShardingAlgorithm { + + @Override + public String doSharding(Collection tableNames, PreciseShardingValue shardingValue) { + + /** + * tableNames 对应分片库中所有分片表的集合 + * shardingValue 为分片属性,其中 logicTableName 为逻辑表,columnName 分片健(字段),value 为从 SQL 中解析出的分片健的值 + */ + for (String tableName : tableNames) { + /** + * 取模算法,分片健 % 表数量 + */ + String value = shardingValue.getValue() % tableNames.size() + ""; + if (tableName.endsWith(value)) { + return tableName; + } + } + throw new IllegalArgumentException(); + } +} + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableRangeShardingAlgorithm.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableRangeShardingAlgorithm.java new file mode 100644 index 00000000..7b7e6cc3 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/algorithm/tableAlgorithm/MyTableRangeShardingAlgorithm.java @@ -0,0 +1,37 @@ +package com.xiaofu.sharding.algorithm.tableAlgorithm; + + +import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm; +import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue; + +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.Set; + +/** + * @author xinzhifu + * @description 范围分表算法 + * @date 2020/11/2 12:06 + */ +public class MyTableRangeShardingAlgorithm implements RangeShardingAlgorithm { + + @Override + public Collection doSharding(Collection tableNames, RangeShardingValue rangeShardingValue) { + + Set result = new LinkedHashSet<>(); + // between and 的起始值 + int upper = rangeShardingValue.getValueRange().upperEndpoint(); + int lower = rangeShardingValue.getValueRange().lowerEndpoint(); + // 循环范围计算分表逻辑 + for (int i = lower; i <= upper; i++) { + for (String tableName : tableNames) { + if (tableName.endsWith(i % tableNames.size() + "")) { + result.add(tableName); + } + } + } + return result; + } +} + + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/contoller/TestController.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/contoller/TestController.java new file mode 100644 index 00000000..ee1d4bd8 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/contoller/TestController.java @@ -0,0 +1,117 @@ +package com.xiaofu.sharding.contoller; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.xiaofu.sharding.mapper.ConfigRepository; +import com.xiaofu.sharding.mapper.OrderItemRepository; +import com.xiaofu.sharding.mapper.OrderRepository; +import com.xiaofu.sharding.model.TConfig; +import com.xiaofu.sharding.model.TOrder; +import com.xiaofu.sharding.model.TOrderDto; +import org.apache.shardingsphere.api.hint.HintManager; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +/** + * @Author: xiaofu + * @Description: + */ +@Controller +@RequestMapping +public class TestController { + + @Autowired + private OrderRepository orderRepository; + + @Autowired + private OrderItemRepository orderItemRepository; + + @Autowired + private ConfigRepository configRepository; + + @GetMapping(value = "/insertOrder") + @ResponseBody + public String insertOrder() { + + for (int i = 0; i < 5; i++) { +// HintManager.clear(); +// HintManager hintManager = HintManager.getInstance(); +// hintManager.setDatabaseShardingValue(1); +// hintManager.addTableShardingValue("t_order" , 0); +// hintManager.addTableShardingValue("t_order" , 1); +// hintManager.addTableShardingValue("t_order" , 2); + + TOrder order = new TOrder(); + order.setOrderNo("A000" + i); + order.setCreateName("订单 " + i); + order.setUserId(Long.parseLong(i + "")); + order.setPrice(new BigDecimal("" + i)); + orderRepository.insert(order); + +// TOrderItem orderItem = new TOrderItem(); +// orderItem.setOrderId(order.getOrderId()); +// orderItem.setOrderNo("A000" + i); +// orderItem.setItemName("服务项目" + i); +// orderItem.setPrice(new BigDecimal("" + i)); +// orderItemRepository.insert(orderItem); + } + return "success"; + } + + @GetMapping(value = "/config") + @ResponseBody + public String config() { + + TConfig tConfig = new TConfig(); + tConfig.setRemark("我是广播表"); + tConfig.setCreateTime(new Date()); + tConfig.setLastModifyTime(new Date()); + configRepository.insert(tConfig); + return "success"; + } + + + @GetMapping(value = "/getOneOrder") + @ResponseBody + public String getOne(String orderId) { + return JSON.toJSONString(orderRepository.selectById(Long.parseLong(orderId))); + } + + + @GetMapping(value = "/selectOrderAndItemByOrderId") + @ResponseBody + public String selectOrderAndItemByOrderId(String orderId) { + TOrderDto tOrder = new TOrderDto(); + if (!StringUtils.isEmpty(orderId)) { + tOrder.setOrderId(Long.parseLong(orderId)); + } + return JSON.toJSONString(orderRepository.selectOrderAndItemByOrderId(tOrder)); + } + + @GetMapping("/orderList") + @ResponseBody + public Object list() { + return orderRepository.selectList(new QueryWrapper<>()); + } + + @GetMapping(value = "/selectOrderListPage") + @ResponseBody + public List selectOrderListPage() { + + + return orderRepository.selectOrderListPage(); + } + + public static void main(String[] args) { + + } +} diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/IncrementShardingKeyGenerator.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/IncrementShardingKeyGenerator.java new file mode 100644 index 00000000..fece477f --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/IncrementShardingKeyGenerator.java @@ -0,0 +1,42 @@ +/* + * 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 + * + * http://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. + */ + +package com.xiaofu.sharding.key; + +import lombok.Getter; +import lombok.Setter; +import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator; + +import java.util.Properties; +import java.util.concurrent.atomic.AtomicInteger; + +public final class IncrementShardingKeyGenerator implements ShardingKeyGenerator { + + @Getter + private final String type = "INCREMENT"; + + private final AtomicInteger count = new AtomicInteger(); + + @Getter + @Setter + private Properties properties = new Properties(); + + @Override + public Comparable generateKey() { + return count.incrementAndGet(); + } +} diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/MyShardingKeyGenerator.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/MyShardingKeyGenerator.java new file mode 100644 index 00000000..dc837955 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/MyShardingKeyGenerator.java @@ -0,0 +1,44 @@ +package com.xiaofu.sharding.key; + +import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator; +import org.springframework.stereotype.Component; + +import java.util.Properties; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @Author: xiaofu + * @Description: 自定义主键生成器 + */ +@Component +public class MyShardingKeyGenerator implements ShardingKeyGenerator { + + + private final AtomicInteger count = new AtomicInteger(); + + /** + * 自定义的生成方案类型 + */ + @Override + public String getType() { + return "XXX"; + } + + /** + * 核心方法-生成主键ID + */ + @Override + public Comparable generateKey() { + return count.incrementAndGet(); + } + + @Override + public Properties getProperties() { + return null; + } + + @Override + public void setProperties(Properties properties) { + + } +} diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/TinyIdShardingKeyGenerator.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/TinyIdShardingKeyGenerator.java new file mode 100644 index 00000000..4c3403fa --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/key/TinyIdShardingKeyGenerator.java @@ -0,0 +1,45 @@ +package com.xiaofu.sharding.key; + +import com.xiaoju.uemc.tinyid.client.utils.TinyId; +import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator; +import org.springframework.stereotype.Component; + +import java.util.Properties; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @Author: xiaofu + * @Description: 自定义主键生成器 + */ +@Component +public class TinyIdShardingKeyGenerator implements ShardingKeyGenerator { + + /** + * 自定义的生成方案类型 + */ + @Override + public String getType() { + return "tinyid"; + } + + /** + * 核心方法-生成主键ID + */ + @Override + public Comparable generateKey() { + + Long id = TinyId.nextId("order"); + + return id; + } + + @Override + public Properties getProperties() { + return null; + } + + @Override + public void setProperties(Properties properties) { + + } +} diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/ConfigRepository.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/ConfigRepository.java new file mode 100644 index 00000000..675d3972 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/ConfigRepository.java @@ -0,0 +1,13 @@ +package com.xiaofu.sharding.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.xiaofu.sharding.model.TConfig; +import org.apache.ibatis.annotations.Mapper; + + +@Mapper +public interface ConfigRepository extends BaseMapper { + +} + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/OrderItemRepository.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/OrderItemRepository.java new file mode 100644 index 00000000..793df5f6 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/OrderItemRepository.java @@ -0,0 +1,13 @@ +package com.xiaofu.sharding.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.xiaofu.sharding.model.TOrderItem; +import org.apache.ibatis.annotations.Mapper; + + +@Mapper +public interface OrderItemRepository extends BaseMapper { + +} + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/OrderRepository.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/OrderRepository.java new file mode 100644 index 00000000..81e4e668 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/mapper/OrderRepository.java @@ -0,0 +1,23 @@ +package com.xiaofu.sharding.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.xiaofu.sharding.model.TOrder; +import com.xiaofu.sharding.model.TOrderDto; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + + +@Mapper +public interface OrderRepository extends BaseMapper { + + + List selectOrderAndItemByOrderId(TOrderDto tOrder); + + List selectOrderListPage(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("orderId") Long orderId); + + List selectOrderListPage(); +} + diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TConfig.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TConfig.java new file mode 100644 index 00000000..ec89ca74 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TConfig.java @@ -0,0 +1,46 @@ +package com.xiaofu.sharding.model; + +import java.util.Date; + +public class TConfig { + + private Long id; + + private String remark; + + private Date createTime; + + private Date lastModifyTime; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getLastModifyTime() { + return lastModifyTime; + } + + public void setLastModifyTime(Date lastModifyTime) { + this.lastModifyTime = lastModifyTime; + } +} \ No newline at end of file diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrder.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrder.java new file mode 100644 index 00000000..38ce26c7 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrder.java @@ -0,0 +1,20 @@ +package com.xiaofu.sharding.model; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class TOrder { + + //@TableId(value = "order_id") + private Long orderId; + + private Long userId; + + private String orderNo; + + private String createName; + + private BigDecimal price; +} \ No newline at end of file diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrderDto.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrderDto.java new file mode 100644 index 00000000..5197ab90 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrderDto.java @@ -0,0 +1,24 @@ +package com.xiaofu.sharding.model; + +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class TOrderDto { + + //@TableId(value = "order_id") + private Long orderId; + + private String orderNo; + + private String createName; + + private BigDecimal price; + + private Long userId; + + private Long itemId; + + private String itemName; +} \ No newline at end of file diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrderItem.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrderItem.java new file mode 100644 index 00000000..92a010e4 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/model/TOrderItem.java @@ -0,0 +1,21 @@ +package com.xiaofu.sharding.model; + +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class TOrderItem { + + @TableId(value = "item_id") + private Long itemId; + + private Long orderId; + + private String orderNo; + + private String itemName; + + private BigDecimal price; +} \ No newline at end of file diff --git a/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/utils/JasyptUtil.java b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/utils/JasyptUtil.java new file mode 100644 index 00000000..243ca809 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/java/com/xiaofu/sharding/utils/JasyptUtil.java @@ -0,0 +1,54 @@ +package com.xiaofu.sharding.utils; + +import lombok.extern.slf4j.Slf4j; +import org.jasypt.util.text.BasicTextEncryptor; + +/** + * @Author: xinzhifu + * @Description: + */ +@Slf4j +public class JasyptUtil { + + /** + * 加密方法 + * + * @param salt 盐值 + * @param targetString 待加密字符串 + * @return 密文 + */ + public static String encrypt(String salt, String targetString) { + BasicTextEncryptor encryptor = new BasicTextEncryptor(); + encryptor.setPassword(salt); + return encryptor.encrypt(targetString); + } + + /** + * 解密方法 + * + * @param salt 盐值 + * @param targetString 待解密字符串 + * @return 明文 + */ + public static String decrypt(String salt, String targetString) { + BasicTextEncryptor encryptor = new BasicTextEncryptor(); + encryptor.setPassword(salt); + return encryptor.decrypt(targetString); + } + + public static void main(String[] args) { + + String salt = "order_database"; + String username = "root"; + String password = "xinzhifu521"; + // 进行加密操作 + String usernameEncryptStr = encrypt(salt, username); + String passwordEncryptStr = encrypt(salt, password); + // 进行解密操作 + String usernameDecryptStr = decrypt(salt, usernameEncryptStr); + String passwordDecryptStr = decrypt(salt, passwordEncryptStr); + // 输出明文和密文 + log.info("usernameEncrypt :{}", usernameEncryptStr); + log.info("passwordEncryptStr :{}", passwordEncryptStr); + } +} diff --git a/springboot-sharding-jdbc/src/main/resources/META-INF/services/org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator b/springboot-sharding-jdbc/src/main/resources/META-INF/services/org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator new file mode 100644 index 00000000..ed0024f3 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/META-INF/services/org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator @@ -0,0 +1,2 @@ +com.xiaofu.sharding.key.MyShardingKeyGenerator +com.xiaofu.sharding.key.TinyIdShardingKeyGenerator diff --git a/springboot-sharding-jdbc/src/main/resources/application-sharding_jdbc11.yml b/springboot-sharding-jdbc/src/main/resources/application-sharding_jdbc11.yml new file mode 100644 index 00000000..1ad178cf --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/application-sharding_jdbc11.yml @@ -0,0 +1,51 @@ +#spring: +# shardingsphere: +# datasource: +# names: ds-0,ds-1 +# ds-0: +# type: com.alibaba.druid.pool.DruidDataSource +# driverClassName: com.mysql.jdbc.Driver +# url: jdbc:mysql://47.93.6.5:3306/ds-0?useUnicode=true&characterEncoding=utf8&tinyInt1isBit=false&useSSL=false&serverTimezone=GMT +# username: root +# password: xinzhifu521 +# ds-1: +# type: com.alibaba.druid.pool.DruidDataSource +# driverClassName: com.mysql.jdbc.Driver +# url: jdbc:mysql://47.93.6.5:3306/ds-1?useUnicode=true&characterEncoding=utf8&tinyInt1isBit=false&useSSL=false&serverTimezone=GMT +# username: root +# password: xinzhifu521 +# sharding: +# tables: +# t_order: +# actual-data-nodes: ds-$->{0..1}.t_order_$->{0..2} +# ## 指定分库规则 +# database-strategy: +# inline: +# sharding-column: order_id +# #分片算法行表达式(只取最后两个数字进行分片) +# algorithm-expression: ds-$->{order_id % 2} +# ## 指定分表规则 +# table-strategy: +# hint: +# # sharding-column: order_id +# #分片算法行表达式(只取最后两个数字进行分片) +# algorithm-class-name: com.xiaofu.sharding.algorithm.tableAlgorithm.MyTableHintShardingAlgorithm +# ## 生成分布式主键 +# key-generator: +# #自增列名称,缺省表示不使用自增主键生成器 +# column: order_id +# #自增列值生成器类型,缺省表示使用默认自增列值生成器。可使用用户自定义的列值生成器或选择内置类型:SNOWFLAKE/UUID/LEAF_SEGMENT +# type: SNOWFLAKE +# # 绑定主表与子表,避免关联查询导致的全数据源路由 +# binding-tables: t_order , t_order_item +# # 配置广播表:以广播的形式保存(如果只涉及查询的话可以不配置,会随机取一个数据源) +# broadcast-tables: t_config +# # 打印sql +# props: +# sql: +# show: true +# +##使用了mybatis-plus +#mybatis-plus: +# mapper-locations: classpath:mapping/*.xml +# map-underscore-to-camel-case: true \ No newline at end of file diff --git a/springboot-sharding-jdbc/src/main/resources/application.properties b/springboot-sharding-jdbc/src/main/resources/application.properties new file mode 100644 index 00000000..530760cb --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/application.properties @@ -0,0 +1,68 @@ +spring.main.allow-bean-definition-overriding=true + +# ��������ȫ������Դ +spring.shardingsphere.datasource.names=ds-0,ds-1 +# ��������Դ ds-0 +spring.shardingsphere.datasource.ds-0.type=com.alibaba.druid.pool.DruidDataSource +spring.shardingsphere.datasource.ds-0.driverClassName=com.mysql.jdbc.Driver +spring.shardingsphere.datasource.ds-0.url=jdbc:mysql://47.93.6.5:3306/ds-0?useUnicode=true&characterEncoding=utf8&tinyInt1isBit=false&useSSL=false&serverTimezone=GMT +spring.shardingsphere.datasource.ds-0.username=root +spring.shardingsphere.datasource.ds-0.password=xinzhifu521 +# ��������Դ ds-1 +spring.shardingsphere.datasource.ds-1.type=com.alibaba.druid.pool.DruidDataSource +spring.shardingsphere.datasource.ds-1.driverClassName=com.mysql.jdbc.Driver +spring.shardingsphere.datasource.ds-1.url=jdbc:mysql://47.93.6.5:3306/ds-1?useUnicode=true&characterEncoding=utf8&tinyInt1isBit=false&useSSL=false&serverTimezone=GMT +spring.shardingsphere.datasource.ds-1.username=root +spring.shardingsphere.datasource.ds-1.password=xinzhifu521 +# ���÷�Ƭ�� t_order +# ָ����ʵ���ݽڵ� +spring.shardingsphere.sharding.tables.t_order.actual-data-nodes=ds-$->{0..1}.t_order_$->{0..2} +### �ֿ���� +# �ֿ��Ƭ�� +spring.shardingsphere.sharding.tables.t_order.database-strategy.inline.sharding-column=order_id +# �ֿ��Ƭ�㷨 +spring.shardingsphere.sharding.tables.t_order.database-strategy.inline.algorithm-expression=ds-$->{order_id % 2} +# �ֱ����� +# �ֱ���Ƭ�� +spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id +# �ֱ��㷨 +spring.shardingsphere.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 3} +# ���������ֶ� +spring.shardingsphere.sharding.tables.t_order.key-generator.column=order_id +# ��������ID ���ɷ��� +spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE +# ��������Ψһ id +spring.shardingsphere.sharding.tables.t_order.key-generator.props.worker.id=0000 +# +spring.shardingsphere.sharding.tables.t_order.key-generator.max.tolerate.time.difference.milliseconds=5 + +# ���÷�Ƭ�� t_order_item +spring.shardingsphere.sharding.tables.t_order_item.actual-data-nodes=ds-$->{0..1}.t_order_item_$->{0..2} +spring.shardingsphere.sharding.tables.t_order_item.database-strategy.inline.sharding-column=order_id +spring.shardingsphere.sharding.tables.t_order_item.database-strategy.inline.algorithm-expression=ds-$->{order_id % 2} +spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id +spring.shardingsphere.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 3} +spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=item_id +spring.shardingsphere.sharding.tables.t_order_item.key-generator.type=SNOWFLAKE + +# �󶨱���ϵ +spring.shardingsphere.sharding.binding-tables=t_order , t_order_item + +# Ĭ������Դ��δ��Ƭ�ı�Ĭ��ִ�п� +spring.shardingsphere.sharding.default-data-source-name=ds-0 + +# ���ù㲥�� +spring.shardingsphere.sharding.broadcast-tables=t_config + +# �Ƿ��� SQL������־ +spring.shardingsphere.props.sql.show=true + +mybatis-plus.mapper-locations=classpath:mapping/*.xml +mybatis-plus.map-underscore-to-camel-case=true + +# �����Ȳ��𣨸����ļ����Զ������� +spring.devtools.restart.enabled=true + + + + diff --git a/springboot-sharding-jdbc/src/main/resources/application.yml b/springboot-sharding-jdbc/src/main/resources/application.yml new file mode 100644 index 00000000..1ef1db6b --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/application.yml @@ -0,0 +1,3 @@ +#spring: +# profiles: +# active: sharding_jdbc diff --git a/springboot-sharding-jdbc/src/main/resources/generator/generatorConfig.xml b/springboot-sharding-jdbc/src/main/resources/generator/generatorConfig.xml new file mode 100644 index 00000000..3b0b32b3 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/generator/generatorConfig.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/springboot-sharding-jdbc/src/main/resources/mapping/TConfigMapper.xml b/springboot-sharding-jdbc/src/main/resources/mapping/TConfigMapper.xml new file mode 100644 index 00000000..42fd67e8 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/mapping/TConfigMapper.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-sharding-jdbc/src/main/resources/mapping/TOrderItemMapper.xml b/springboot-sharding-jdbc/src/main/resources/mapping/TOrderItemMapper.xml new file mode 100644 index 00000000..d9d66531 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/mapping/TOrderItemMapper.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/springboot-sharding-jdbc/src/main/resources/mapping/TOrderMapper.xml b/springboot-sharding-jdbc/src/main/resources/mapping/TOrderMapper.xml new file mode 100644 index 00000000..6dd3e6ac --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/mapping/TOrderMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/springboot-sharding-jdbc/src/main/resources/tinyid_client.properties b/springboot-sharding-jdbc/src/main/resources/tinyid_client.properties new file mode 100644 index 00000000..22c2d330 --- /dev/null +++ b/springboot-sharding-jdbc/src/main/resources/tinyid_client.properties @@ -0,0 +1,5 @@ +# tinyid �ֲ�ʽID +# �����ַ +tinyid.server=127.0.0.1:9999 +# ҵ��token +tinyid.token=0f673adf80504e2eaa552f5d791b644c \ No newline at end of file diff --git a/springboot-testng-report/pom.xml b/springboot-testng-report/pom.xml new file mode 100644 index 00000000..a85c50fa --- /dev/null +++ b/springboot-testng-report/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-testng-report + 0.0.1-SNAPSHOT + springboot-testng-report + + + + + org.testng + testng + 7.1.0 + test + + + + com.aventstack + extentreports + 3.0.6 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot-testng-report/src/main/java/com/xiaofu/report/SpringbootTestngReportApplication.java b/springboot-testng-report/src/main/java/com/xiaofu/report/SpringbootTestngReportApplication.java new file mode 100644 index 00000000..e88705da --- /dev/null +++ b/springboot-testng-report/src/main/java/com/xiaofu/report/SpringbootTestngReportApplication.java @@ -0,0 +1,13 @@ +package com.xiaofu.report; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringbootTestngReportApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringbootTestngReportApplication.class, args); + } + +} diff --git a/shardingsphere101/shardingsphere-default-strategy/README.md b/springboot-testng-report/src/main/resources/application.properties similarity index 100% rename from shardingsphere101/shardingsphere-default-strategy/README.md rename to springboot-testng-report/src/main/resources/application.properties diff --git a/springboot-testng-report/src/test/java/com/xiaofu/report/OrderTest.java b/springboot-testng-report/src/test/java/com/xiaofu/report/OrderTest.java new file mode 100644 index 00000000..66964683 --- /dev/null +++ b/springboot-testng-report/src/test/java/com/xiaofu/report/OrderTest.java @@ -0,0 +1,101 @@ +package com.xiaofu.report; + +import com.alibaba.fastjson.JSON; +import com.xiaofu.report.config.ExtentTestNGIReporterListener; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; +import org.testng.annotations.*; + +/** + * @author xiaofu + * @description testNG 单元测试 + * @date 2020/3/19 16:43 + */ +@Slf4j +@Listeners({ExtentTestNGIReporterListener.class}) +@SpringBootTest(classes = SpringbootTestngReportApplication.class) +public class OrderTest extends AbstractTestNGSpringContextTests { + + @Data + class User { + private Integer userId; + private String userName; + } + + /** + * 参数提供 + */ + @DataProvider(name = "paramDataProvider") + public Object[][] paramDataProvider() { + User user1 = new User(); + user1.setUserId(1); + user1.setUserName("程序员内点事1"); + User user2 = new User(); + user2.setUserId(2); + user2.setUserName("程序员内点事2"); + return new Object[][]{{1, user1}, {2, user2}}; + } + + @Test(dataProvider = "paramDataProvider",groups = "user") + public void queryUser(Integer index, User user) { + log.info("index:{},user: {}", index, JSON.toJSONString(user)); + } + + + @Test() + public void orderTest() { + + log.info("我是小组"); + } + + @BeforeSuite + public void beforeSuite(){ + log.info("beforeSuite"); + } + + @AfterSuite + public void afterSuite(){ + log.info("AfterSuite"); + } + + @BeforeClass + public void beforeClass(){ + log.info("BeforeClass"); + } + + @AfterClass + public void afterClass(){ + log.info("AfterClass"); + } + + @BeforeTest + public void beforeTest(){ + log.info("BeforeTest"); + } + + @AfterTest + public void afterTest(){ + log.info("AfterTest"); + } + + @BeforeGroups + public void beforeGroups(){ + log.info("BeforeGroups"); + } + @AfterGroups + public void afterGroups(){ + log.info("AfterGroups"); + } + + @BeforeMethod + public void BeforeMethod(){ + log.info("BeforeMethod"); + } + + @AfterMethod + public void AfterMethod(){ + log.info("AfterMethod"); + } +} diff --git a/springboot-testng-report/src/test/java/com/xiaofu/report/UserTest.java b/springboot-testng-report/src/test/java/com/xiaofu/report/UserTest.java new file mode 100644 index 00000000..41bfa721 --- /dev/null +++ b/springboot-testng-report/src/test/java/com/xiaofu/report/UserTest.java @@ -0,0 +1,84 @@ +package com.xiaofu.report; + +import com.xiaofu.report.config.ExtentTestNGIReporterListener; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; +import org.testng.annotations.*; + +/** + * @author xiaofu + * @description testNG 单元测试 + * @date 2020/3/19 16:43 + */ +@Slf4j +@Listeners({ExtentTestNGIReporterListener.class}) +@SpringBootTest(classes = SpringbootTestngReportApplication.class) +public class UserTest extends AbstractTestNGSpringContextTests { + + @Test(groups = "user") + public void queryUser(String name) { + + log.info("我是测试方法~"); + } + + @BeforeSuite + public void beforeSuite(){ + log.info("beforeSuite"); + } + + @AfterSuite + public void afterSuite(){ + log.info("AfterSuite"); + } + + @BeforeClass + public void beforeClass(){ + log.info("BeforeClass"); + } + + @AfterClass + public void afterClass(){ + log.info("AfterClass"); + } + + @BeforeTest + public void beforeTest(){ + log.info("BeforeTest"); + } + + @AfterTest + public void afterTest(){ + log.info("AfterTest"); + } + + @BeforeGroups(groups="user") + public void beforeGroups(){ + log.info("BeforeGroups"); + } + @AfterGroups(groups="user") + public void afterGroups(){ + log.info("AfterGroups"); + } + + @BeforeMethod + public void BeforeMethod(){ + log.info("BeforeMethod"); + } + + @AfterMethod + public void AfterMethod(){ + log.info("AfterMethod"); + } + + + @Test + public void token() { + System.out.println("get token"); + } + + @Test(dependsOnMethods= {"token"}) + public void getUser() { + System.out.println("this is test getUser"); + } +} diff --git a/springboot-testng-report/src/test/java/com/xiaofu/report/config/BaseTest.java b/springboot-testng-report/src/test/java/com/xiaofu/report/config/BaseTest.java new file mode 100644 index 00000000..bea69d7b --- /dev/null +++ b/springboot-testng-report/src/test/java/com/xiaofu/report/config/BaseTest.java @@ -0,0 +1,22 @@ +package com.xiaofu.report.config; + +import com.xiaofu.report.SpringbootTestngReportApplication; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; +import org.springframework.test.context.web.WebAppConfiguration; +import org.testng.annotations.Listeners; + +/** + * @Author: xiaofu + * @Description: + */ +@SpringBootTest(classes = SpringbootTestngReportApplication.class) +@WebAppConfiguration +@Slf4j +@Listeners({ExtentTestNGIReporterListener.class}) +public class BaseTest extends AbstractTestNGSpringContextTests { + + public BaseTest() { + } +} diff --git a/springboot-testng-report/src/test/java/com/xiaofu/report/config/ExtentTestNGIReporterListener.java b/springboot-testng-report/src/test/java/com/xiaofu/report/config/ExtentTestNGIReporterListener.java new file mode 100644 index 00000000..1bd08191 --- /dev/null +++ b/springboot-testng-report/src/test/java/com/xiaofu/report/config/ExtentTestNGIReporterListener.java @@ -0,0 +1,197 @@ +package com.xiaofu.report.config; + +import com.aventstack.extentreports.ExtentReports; +import com.aventstack.extentreports.ExtentTest; +import com.aventstack.extentreports.ResourceCDN; +import com.aventstack.extentreports.Status; +import com.aventstack.extentreports.model.TestAttribute; +import com.aventstack.extentreports.reporter.ExtentHtmlReporter; +import com.aventstack.extentreports.reporter.configuration.ChartLocation; +import com.aventstack.extentreports.reporter.configuration.Theme; +import org.testng.*; +import org.testng.xml.XmlSuite; + +import java.io.File; +import java.util.*; + +/** + * @author xiaofu + * @description TestNg 可视化配置 + * @date 2020/3/19 16:44 + */ +public class ExtentTestNGIReporterListener implements IReporter { + //生成的路径以及文件名 + private static final String OUTPUT_FOLDER = "target/test-report/"; + private static final String FILE_NAME = "index.html"; + + private ExtentReports extent; + + @Override + public void generateReport(List xmlSuites, List suites, String outputDirectory) { + init(); + boolean createSuiteNode = false; + if (suites.size() > 1) { + createSuiteNode = true; + } + for (ISuite suite : suites) { + Map result = suite.getResults(); + //如果suite里面没有任何用例,直接跳过,不在报告里生成 + if (result.size() == 0) { + continue; + } + //统计suite下的成功、失败、跳过的总用例数 + int suiteFailSize = 0; + int suitePassSize = 0; + int suiteSkipSize = 0; + ExtentTest suiteTest = null; + //存在多个suite的情况下,在报告中将同一个一个suite的测试结果归为一类,创建一级节点。 + if (createSuiteNode) { + suiteTest = extent.createTest(suite.getName()).assignCategory(suite.getName()); + } + boolean createSuiteResultNode = false; + if (result.size() > 1) { + createSuiteResultNode = true; + } + for (ISuiteResult r : result.values()) { + ExtentTest resultNode; + ITestContext context = r.getTestContext(); + if (createSuiteResultNode) { + //没有创建suite的情况下,将在SuiteResult的创建为一级节点,否则创建为suite的一个子节点。 + if (null == suiteTest) { + resultNode = extent.createTest(r.getTestContext().getName()); + } else { + resultNode = suiteTest.createNode(r.getTestContext().getName()); + } + } else { + resultNode = suiteTest; + } + if (resultNode != null) { + resultNode.getModel().setName(suite.getName() + " : " + r.getTestContext().getName()); + if (resultNode.getModel().hasCategory()) { + resultNode.assignCategory(r.getTestContext().getName()); + } else { + resultNode.assignCategory(suite.getName(), r.getTestContext().getName()); + } + resultNode.getModel().setStartTime(r.getTestContext().getStartDate()); + resultNode.getModel().setEndTime(r.getTestContext().getEndDate()); + //统计SuiteResult下的数据 + int passSize = r.getTestContext().getPassedTests().size(); + int failSize = r.getTestContext().getFailedTests().size(); + int skipSize = r.getTestContext().getSkippedTests().size(); + suitePassSize += passSize; + suiteFailSize += failSize; + suiteSkipSize += skipSize; + if (failSize > 0) { + resultNode.getModel().setStatus(Status.FAIL); + } + resultNode.getModel().setDescription(String.format("Pass: %s ; Fail: %s ; Skip: %s ;", passSize, failSize, skipSize)); + } + buildTestNodes(resultNode, context.getFailedTests(), Status.FAIL); + buildTestNodes(resultNode, context.getSkippedTests(), Status.SKIP); + buildTestNodes(resultNode, context.getPassedTests(), Status.PASS); + } + if (suiteTest != null) { + suiteTest.getModel().setDescription(String.format("Pass: %s ; Fail: %s ; Skip: %s ;", suitePassSize, suiteFailSize, suiteSkipSize)); + if (suiteFailSize > 0) { + suiteTest.getModel().setStatus(Status.FAIL); + } + } + + } + for (String s : Reporter.getOutput()) { + extent.setTestRunnerOutput(s); + } + extent.flush(); + } + + private void init() { + //文件夹不存在的话进行创建 + File reportDir = new File(OUTPUT_FOLDER); + if (!reportDir.exists() && !reportDir.isDirectory()) { + reportDir.mkdirs(); + } + ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(OUTPUT_FOLDER + FILE_NAME); + // 设置静态文件的DNS + //怎么样解决cdn.rawgit.com访问不了的情况 + htmlReporter.config().setResourceCDN(ResourceCDN.EXTENTREPORTS); + + htmlReporter.config().setDocumentTitle("用户服务自动化测试报告"); + htmlReporter.config().setReportName("用户服务自动化测试报告"); + htmlReporter.config().setChartVisibilityOnOpen(true); + htmlReporter.config().setTestViewChartLocation(ChartLocation.TOP); + htmlReporter.config().setTheme(Theme.STANDARD); + htmlReporter.config().setEncoding("utf-8"); + htmlReporter.config().setCSS(".node.level-1 ul{ display:none;} .node.level-1.active ul{display:block;}"); + + extent = new ExtentReports(); + extent.attachReporter(htmlReporter); + extent.setReportUsesManualConfiguration(true); + + } + + private void buildTestNodes(ExtentTest extenttest, IResultMap tests, Status status) { + //存在父节点时,获取父节点的标签 + String[] categories = new String[0]; + if (extenttest != null) { + List categoryList = extenttest.getModel().getCategoryContext().getAll(); + categories = new String[categoryList.size()]; + for (int index = 0; index < categoryList.size(); index++) { + categories[index] = categoryList.get(index).getName(); + } + } + + ExtentTest test; + + if (tests.size() > 0) { + //调整用例排序,按时间排序 + Set treeSet = new TreeSet(new Comparator() { + @Override + public int compare(ITestResult o1, ITestResult o2) { + return o1.getStartMillis() < o2.getStartMillis() ? -1 : 1; + } + }); + treeSet.addAll(tests.getAllResults()); + for (ITestResult result : treeSet) { + Object[] parameters = result.getParameters(); + String name = ""; + //如果有参数,则使用参数的toString组合代替报告中的name + for (Object param : parameters) { + name += param.toString(); + } + if (name.length() == 0) { + name = result.getMethod().getMethodName(); + } + if (extenttest == null) { + test = extent.createTest(name); + } else { + //作为子节点进行创建时,设置同父节点的标签一致,便于报告检索。 + test = extenttest.createNode(name).assignCategory(categories); + } + //test.getModel().setDescription(description.toString()); + //test = extent.createTest(result.getMethod().getMethodName()); + for (String group : result.getMethod().getGroups()) + test.assignCategory(group); + + List outputList = Reporter.getOutput(result); + for (String output : outputList) { + //将用例的log输出报告中 + test.debug(output); + } + if (result.getThrowable() != null) { + test.log(status, result.getThrowable()); + } else { + test.log(status, "Test " + status.toString().toLowerCase() + "ed"); + } + + test.getModel().setStartTime(getTime(result.getStartMillis())); + test.getModel().setEndTime(getTime(result.getEndMillis())); + } + } + } + + private Date getTime(long millis) { + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(millis); + return calendar.getTime(); + } +} \ No newline at end of file diff --git a/springboot-testng-report/src/test/java/com/xiaofu/report/xml/UserTest.xml b/springboot-testng-report/src/test/java/com/xiaofu/report/xml/UserTest.xml new file mode 100644 index 00000000..5d6936ff --- /dev/null +++ b/springboot-testng-report/src/test/java/com/xiaofu/report/xml/UserTest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/springboot101/webhook/springboot-webhook-wechat/.gitignore b/springboot-webhook-wechat/.gitignore similarity index 100% rename from springboot101/webhook/springboot-webhook-wechat/.gitignore rename to springboot-webhook-wechat/.gitignore diff --git a/springboot-webhook-wechat/pom.xml b/springboot-webhook-wechat/pom.xml new file mode 100644 index 00000000..72b8a670 --- /dev/null +++ b/springboot-webhook-wechat/pom.xml @@ -0,0 +1,81 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.3.3.RELEASE + + + springboot-webhook-wechat + 0.0.1-SNAPSHOT + springboot-webhook-wechat + Demo project for Spring Boot + + + 1.8 + + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + com.alibaba + fastjson + 1.2.49 + + + + org.projectlombok + lombok + 1.16.18 + provided + + + + + org.springframework.boot + spring-boot-devtools + runtime + + + + com.dtflys.forest + spring-boot-starter-forest + 1.5.0-RC3 + + + + org.apache.httpcomponents + httpmime + 4.5 + + + + org.apache.httpcomponents + httpclient + 4.5 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/WebhookApplication.java b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/WebhookApplication.java new file mode 100644 index 00000000..34ecde22 --- /dev/null +++ b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/WebhookApplication.java @@ -0,0 +1,16 @@ +package com.xiaofu.webhook; + +import com.thebeastshop.forest.springboot.annotation.ForestScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; + +@ComponentScan("com.xiaofu.webhook") +@SpringBootApplication +public class WebhookApplication { + + public static void main(String[] args) { + SpringApplication.run(WebhookApplication.class, args); + } + +} diff --git a/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/controller/WebhookController.java b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/controller/WebhookController.java new file mode 100644 index 00000000..d368207b --- /dev/null +++ b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/controller/WebhookController.java @@ -0,0 +1,92 @@ +package com.xiaofu.webhook.controller;//package com.xiaofu.webhook.controller; + +import com.alibaba.fastjson.JSON; +import com.xiaofu.webhook.utils.HttpUtil; +import com.xiaofu.webhook.vo.GithubUser; +import com.xiaofu.webhook.vo.GithubWebhookPullVo; +import com.xiaofu.webhook.vo.WeChatWebhook; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; +import org.thymeleaf.util.ArrayUtils; +import org.thymeleaf.util.DateUtils; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.logging.SimpleFormatter; + +@Slf4j +@RestController +public class WebhookController { + + private static String WECHAT_URL = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=145a516a-dd15-421f-97a3-ba3bf1479369"; + + private static String GITHUB_API = "https://api.github.com/users/"; + + /** + * @param webhook webhook + * @author 程序员内点事 + * @Description: github 回调 + * @date 2021/05/19 + */ + @PostMapping("/webhook") + public String webhookGithub(@RequestBody GithubWebhookPullVo webhook) { + log.info("webhook 入参接收 weChatWebhook {}", JSON.toJSONString(webhook)); + // 仓库名 + String name = webhook.getRepository().getName(); + SimpleDateFormat simpleFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String now = simpleFormatter.format(new Date()); + String content = ""; + if (webhook.getCommits().size() > 0) { + GithubWebhookPullVo.CommitsDTO commitsDTO = webhook.getCommits().get(0); + content += "提交者:[ " + commitsDTO.getCommitter().getName() + " ] \r\n" + + "时间:[ " + now + " ]\n" + + "向" + "远程仓库 [ " + name + " ]推送代码 \n" + + "提交详情: \n"; + + List addeds = commitsDTO.getAdded(); + if (addeds.size() > 0) { + content += "添加文件: \n[\n"; + for (int i = 0; i < addeds.size(); i++) { + content += (i + 1) + "、" + addeds.get(i) + "\n"; + } + content += "] , \n"; + } + List modifieds = commitsDTO.getModified(); + if (modifieds.size() > 0) { + content += "修改文件: \n[\n"; + for (int i = 0; i < modifieds.size(); i++) { + content += (i + 1) + "、" + modifieds.get(i) + "\n"; + } + content += "] , \n"; + } + List removeds = commitsDTO.getRemoved(); + if (removeds.size() > 0) { + content += "删除文件: \n[\n"; + for (int i = 0; i < removeds.size(); i++) { + content += (i + 1) + "、" + removeds.get(i) + "\n"; + } + content += "]"; + } + } + log.info(content); + WeChatWebhook weChatWebhook = new WeChatWebhook(); + weChatWebhook.setMsgtype("text"); + WeChatWebhook.TextDTO textDTO = new WeChatWebhook.TextDTO(); + textDTO.setContent(content); + textDTO.setMentionedList(Arrays.asList("@all")); + textDTO.setMentionedMobileList(Arrays.asList("@all")); + weChatWebhook.setText(textDTO); + /** + * 组装参数后向企业微信发送webhook请求 + */ + log.info("企业微信发送参数 {}", JSON.toJSONString(weChatWebhook)); + String post = HttpUtil.sendPostJsonBody(WECHAT_URL, JSON.toJSONString(weChatWebhook)); + log.info("企业微信发送结果 post {}", post); + return JSON.toJSONString(post); + } +} diff --git a/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/utils/HttpUtil.java b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/utils/HttpUtil.java new file mode 100644 index 00000000..bdd50d39 --- /dev/null +++ b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/utils/HttpUtil.java @@ -0,0 +1,85 @@ +package com.xiaofu.webhook.utils; + +import lombok.extern.slf4j.Slf4j; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.client.HttpClient; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.protocol.HTTP; +import org.apache.http.util.EntityUtils; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.Charset; +import java.util.logging.Logger; + +/** + * @Auther: 公众号:程序员小富 + * @Date: 2021/5/24 20:40 + * @Description: + */ +@Component +@Slf4j +public class HttpUtil { + + /** + * 发送post请求 + * + * @param url 请求的url + * @param body json串 + * @return + */ + public static String sendPostJsonBody(String url, String body) { + log.debug("[HttpClientUtil][sendPostJsonBody] 入参 url={} body={}", url, body); + HttpPost httpPost = new HttpPost(url); + httpPost.addHeader(HTTP.CONTENT_TYPE, "application/json;charset=utf-8"); + StringEntity entity = new StringEntity(body, "utf-8"); + entity.setContentEncoding("UTF-8"); + entity.setContentType("application/json"); + httpPost.setEntity(entity); + HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); + try { + HttpClient client = httpClientBuilder.build(); + HttpResponse response = client.execute(httpPost); + if (response.getStatusLine() != null && response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { + String result = EntityUtils.toString(response.getEntity(), "utf-8"); + log.debug("[HttpClientUtil][sendPostJsonBody] 结果 url={} result={}", url, result); + return result; + } + log.warn("[HttpClientUtil][sendPostJsonBody] 请求失败 response={}", url, response.toString()); + return ""; + } catch (IOException ex) { + log.error("[HttpClientUtil][sendPostJsonBody] 请求异常 ex={}", url, ex); + return ""; + } + } + + public static String sendGet(String url) { + log.debug("[HttpClientUtil][sendPostJsonBody] 入参 url={} ", url); + HttpGet httpPost = new HttpGet(url); + HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); + try { + HttpClient client = httpClientBuilder.build(); + HttpResponse response = client.execute(httpPost); + if (response.getStatusLine() != null && response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { + String result = EntityUtils.toString(response.getEntity(), "utf-8"); + log.debug("[HttpClientUtil][sendPostJsonBody] 结果 url={} result={}", url, result); + return result; + } + log.warn("[HttpClientUtil][sendPostJsonBody] 请求失败 response={}", url, response.toString()); + return ""; + } catch (IOException ex) { + log.error("[HttpClientUtil][sendPostJsonBody] 请求异常 ex={}", url, ex); + return ""; + } + } +} diff --git a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/GithubUser.java b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/GithubUser.java similarity index 95% rename from springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/GithubUser.java rename to springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/GithubUser.java index 0535811f..8756d1fe 100644 --- a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/GithubUser.java +++ b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/GithubUser.java @@ -1,4 +1,4 @@ -package com.springboot101.vo; +package com.xiaofu.webhook.vo; import lombok.Data; @@ -25,13 +25,13 @@ public class GithubUser { * received_events_url : https://api.github.com/users/chengxy-nds/received_events * type : User * site_admin : false - * name : 程序员小富 + * name : 程序员内点事 * company : null * blog : * location : null * email : null * hireable : null - * bio : 公众号:程序员小富 + * bio : 公众号:程序员内点事 * twitter_username : null * public_repos : 6 * public_gists : 0 diff --git a/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/GithubWebhookPullVo.java b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/GithubWebhookPullVo.java new file mode 100644 index 00000000..2831db5a --- /dev/null +++ b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/GithubWebhookPullVo.java @@ -0,0 +1,385 @@ +package com.xiaofu.webhook.vo;//package com.xiaofu.webhook.vo; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @author 公众号:程序员小富 + * @Description:程序员内点事 + * @date 2021/05/19 + */ +@NoArgsConstructor +@Data +public class GithubWebhookPullVo { + + + @JsonProperty("ref") + private String ref; + @JsonProperty("before") + private String before; + @JsonProperty("after") + private String after; + @JsonProperty("repository") + private RepositoryDTO repository; + @JsonProperty("pusher") + private PusherDTO pusher; + @JsonProperty("sender") + private SenderDTO sender; + @JsonProperty("created") + private Boolean created; + @JsonProperty("deleted") + private Boolean deleted; + @JsonProperty("forced") + private Boolean forced; + @JsonProperty("base_ref") + private Object baseRef; + @JsonProperty("compare") + private String compare; + @JsonProperty("commits") + private List commits; + @JsonProperty("head_commit") + private HeadCommitDTO headCommit; + + @NoArgsConstructor + @Data + public static class RepositoryDTO { + @JsonProperty("id") + private Integer id; + @JsonProperty("node_id") + private String nodeId; + @JsonProperty("name") + private String name; + @JsonProperty("full_name") + private String fullName; + @JsonProperty("private") + private Boolean privateX; + @JsonProperty("owner") + private OwnerDTO owner; + @JsonProperty("html_url") + private String htmlUrl; + @JsonProperty("description") + private String description; + @JsonProperty("fork") + private Boolean fork; + @JsonProperty("url") + private String url; + @JsonProperty("forks_url") + private String forksUrl; + @JsonProperty("keys_url") + private String keysUrl; + @JsonProperty("collaborators_url") + private String collaboratorsUrl; + @JsonProperty("teams_url") + private String teamsUrl; + @JsonProperty("hooks_url") + private String hooksUrl; + @JsonProperty("issue_events_url") + private String issueEventsUrl; + @JsonProperty("events_url") + private String eventsUrl; + @JsonProperty("assignees_url") + private String assigneesUrl; + @JsonProperty("branches_url") + private String branchesUrl; + @JsonProperty("tags_url") + private String tagsUrl; + @JsonProperty("blobs_url") + private String blobsUrl; + @JsonProperty("git_tags_url") + private String gitTagsUrl; + @JsonProperty("git_refs_url") + private String gitRefsUrl; + @JsonProperty("trees_url") + private String treesUrl; + @JsonProperty("statuses_url") + private String statusesUrl; + @JsonProperty("languages_url") + private String languagesUrl; + @JsonProperty("stargazers_url") + private String stargazersUrl; + @JsonProperty("contributors_url") + private String contributorsUrl; + @JsonProperty("subscribers_url") + private String subscribersUrl; + @JsonProperty("subscription_url") + private String subscriptionUrl; + @JsonProperty("commits_url") + private String commitsUrl; + @JsonProperty("git_commits_url") + private String gitCommitsUrl; + @JsonProperty("comments_url") + private String commentsUrl; + @JsonProperty("issue_comment_url") + private String issueCommentUrl; + @JsonProperty("contents_url") + private String contentsUrl; + @JsonProperty("compare_url") + private String compareUrl; + @JsonProperty("merges_url") + private String mergesUrl; + @JsonProperty("archive_url") + private String archiveUrl; + @JsonProperty("downloads_url") + private String downloadsUrl; + @JsonProperty("issues_url") + private String issuesUrl; + @JsonProperty("pulls_url") + private String pullsUrl; + @JsonProperty("milestones_url") + private String milestonesUrl; + @JsonProperty("notifications_url") + private String notificationsUrl; + @JsonProperty("labels_url") + private String labelsUrl; + @JsonProperty("releases_url") + private String releasesUrl; + @JsonProperty("deployments_url") + private String deploymentsUrl; + @JsonProperty("created_at") + private Integer createdAt; + @JsonProperty("updated_at") + private String updatedAt; + @JsonProperty("pushed_at") + private Integer pushedAt; + @JsonProperty("git_url") + private String gitUrl; + @JsonProperty("ssh_url") + private String sshUrl; + @JsonProperty("clone_url") + private String cloneUrl; + @JsonProperty("svn_url") + private String svnUrl; + @JsonProperty("homepage") + private String homepage; + @JsonProperty("size") + private Integer size; + @JsonProperty("stargazers_count") + private Integer stargazersCount; + @JsonProperty("watchers_count") + private Integer watchersCount; + @JsonProperty("language") + private String language; + @JsonProperty("has_issues") + private Boolean hasIssues; + @JsonProperty("has_projects") + private Boolean hasProjects; + @JsonProperty("has_downloads") + private Boolean hasDownloads; + @JsonProperty("has_wiki") + private Boolean hasWiki; + @JsonProperty("has_pages") + private Boolean hasPages; + @JsonProperty("forks_count") + private Integer forksCount; + @JsonProperty("mirror_url") + private Object mirrorUrl; + @JsonProperty("archived") + private Boolean archived; + @JsonProperty("disabled") + private Boolean disabled; + @JsonProperty("open_issues_count") + private Integer openIssuesCount; + @JsonProperty("license") + private Object license; + @JsonProperty("forks") + private Integer forks; + @JsonProperty("open_issues") + private Integer openIssues; + @JsonProperty("watchers") + private Integer watchers; + @JsonProperty("default_branch") + private String defaultBranch; + @JsonProperty("stargazers") + private Integer stargazers; + @JsonProperty("master_branch") + private String masterBranch; + + @NoArgsConstructor + @Data + public static class OwnerDTO { + @JsonProperty("name") + private String name; + @JsonProperty("email") + private String email; + @JsonProperty("login") + private String login; + @JsonProperty("id") + private Integer id; + @JsonProperty("node_id") + private String nodeId; + @JsonProperty("avatar_url") + private String avatarUrl; + @JsonProperty("gravatar_id") + private String gravatarId; + @JsonProperty("url") + private String url; + @JsonProperty("html_url") + private String htmlUrl; + @JsonProperty("followers_url") + private String followersUrl; + @JsonProperty("following_url") + private String followingUrl; + @JsonProperty("gists_url") + private String gistsUrl; + @JsonProperty("starred_url") + private String starredUrl; + @JsonProperty("subscriptions_url") + private String subscriptionsUrl; + @JsonProperty("organizations_url") + private String organizationsUrl; + @JsonProperty("repos_url") + private String reposUrl; + @JsonProperty("events_url") + private String eventsUrl; + @JsonProperty("received_events_url") + private String receivedEventsUrl; + @JsonProperty("type") + private String type; + @JsonProperty("site_admin") + private Boolean siteAdmin; + } + } + + @NoArgsConstructor + @Data + public static class PusherDTO { + @JsonProperty("name") + private String name; + @JsonProperty("email") + private String email; + } + + @NoArgsConstructor + @Data + public static class SenderDTO { + @JsonProperty("login") + private String login; + @JsonProperty("id") + private Integer id; + @JsonProperty("node_id") + private String nodeId; + @JsonProperty("avatar_url") + private String avatarUrl; + @JsonProperty("gravatar_id") + private String gravatarId; + @JsonProperty("url") + private String url; + @JsonProperty("html_url") + private String htmlUrl; + @JsonProperty("followers_url") + private String followersUrl; + @JsonProperty("following_url") + private String followingUrl; + @JsonProperty("gists_url") + private String gistsUrl; + @JsonProperty("starred_url") + private String starredUrl; + @JsonProperty("subscriptions_url") + private String subscriptionsUrl; + @JsonProperty("organizations_url") + private String organizationsUrl; + @JsonProperty("repos_url") + private String reposUrl; + @JsonProperty("events_url") + private String eventsUrl; + @JsonProperty("received_events_url") + private String receivedEventsUrl; + @JsonProperty("type") + private String type; + @JsonProperty("site_admin") + private Boolean siteAdmin; + } + + @NoArgsConstructor + @Data + public static class HeadCommitDTO { + @JsonProperty("id") + private String id; + @JsonProperty("tree_id") + private String treeId; + @JsonProperty("distinct") + private Boolean distinct; + @JsonProperty("message") + private String message; + @JsonProperty("timestamp") + private String timestamp; + @JsonProperty("url") + private String url; + @JsonProperty("author") + private AuthorDTO author; + @JsonProperty("committer") + private CommitterDTO committer; + @JsonProperty("added") + private List added; + @JsonProperty("removed") + private List removed; + @JsonProperty("modified") + private List modified; + + @NoArgsConstructor + @Data + public static class AuthorDTO { + @JsonProperty("name") + private String name; + @JsonProperty("email") + private String email; + } + + @NoArgsConstructor + @Data + public static class CommitterDTO { + @JsonProperty("name") + private String name; + @JsonProperty("email") + private String email; + } + } + + @NoArgsConstructor + @Data + public static class CommitsDTO { + @JsonProperty("id") + private String id; + @JsonProperty("tree_id") + private String treeId; + @JsonProperty("distinct") + private Boolean distinct; + @JsonProperty("message") + private String message; + @JsonProperty("timestamp") + private String timestamp; + @JsonProperty("url") + private String url; + @JsonProperty("author") + private AuthorDTO author; + @JsonProperty("committer") + private CommitterDTO committer; + @JsonProperty("added") + private List added; + @JsonProperty("removed") + private List removed; + @JsonProperty("modified") + private List modified; + + @NoArgsConstructor + @Data + public static class AuthorDTO { + @JsonProperty("name") + private String name; + @JsonProperty("email") + private String email; + } + + @NoArgsConstructor + @Data + public static class CommitterDTO { + @JsonProperty("name") + private String name; + @JsonProperty("email") + private String email; + } + } +} diff --git a/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/WeChatWebhook.java b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/WeChatWebhook.java new file mode 100644 index 00000000..736ce2b8 --- /dev/null +++ b/springboot-webhook-wechat/src/main/java/com/xiaofu/webhook/vo/WeChatWebhook.java @@ -0,0 +1,28 @@ +package com.xiaofu.webhook.vo;//package com.xiaofu.webhook.vo; + +import lombok.Data; + +import java.util.List; + +/** + * @Auther: 程序员内点事 + * @Date: 2021/5/19 20:56 + * @Description: + */ +@Data +public class WeChatWebhook { + + private String msgtype; + + private TextDTO text; + + @Data + public static class TextDTO { + + private String content; + + private List mentionedList; + + private List mentionedMobileList; + } +} diff --git a/springboot-webhook-wechat/src/main/resources/application.properties b/springboot-webhook-wechat/src/main/resources/application.properties new file mode 100644 index 00000000..59e68493 --- /dev/null +++ b/springboot-webhook-wechat/src/main/resources/application.properties @@ -0,0 +1 @@ +server.port=6666 diff --git a/springboot-webhook-wechat/src/main/resources/templates/index.html b/springboot-webhook-wechat/src/main/resources/templates/index.html new file mode 100644 index 00000000..aa939a20 --- /dev/null +++ b/springboot-webhook-wechat/src/main/resources/templates/index.html @@ -0,0 +1,193 @@ + + + + + + + + + + + + 抖音去水印 + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+
+
+
+
+ 支持平台(抖音、火山小视频) +
+
+
+
+
    +
  • + 抖音 +
  • + + + + + + +
  • + 火山小视频 +
  • + + + + + + +
+
+
+
+ +
+
+
+ + + + 去水印工具 + + + +
+
+
+
+
+ + +
+ +
+
+ + +
+ + +
+ + +
+
+ + +
+
+
+
+
+ +
+
+
+ 使用说明 +
+
+
+ 功能完善中,如遇点击下载按钮无响应,请按下图方式下载视频 +
+ +
    +
  • + 火山小视频 +
  • +
+
+
+
+ +
+
+ 声明 +
+
+
+ 本工具不已盈利为目的,只为交流学习,咨询请关注公众号【程序员内点事】 + +
+
+
+
+
+ +
+   +
+
+   +
+
+
+
+ + + + + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/springboot-work-flowable/.gitignore b/springboot-work-flowable/.gitignore new file mode 100644 index 00000000..549e00a2 --- /dev/null +++ b/springboot-work-flowable/.gitignore @@ -0,0 +1,33 @@ +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/ diff --git a/springboot-work-flowable/.mvn/wrapper/MavenWrapperDownloader.java b/springboot-work-flowable/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..e76d1f32 --- /dev/null +++ b/springboot-work-flowable/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed 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. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/springboot-work-flowable/.mvn/wrapper/maven-wrapper.jar b/springboot-work-flowable/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..2cc7d4a5 Binary files /dev/null and b/springboot-work-flowable/.mvn/wrapper/maven-wrapper.jar differ diff --git a/springboot-work-flowable/.mvn/wrapper/maven-wrapper.properties b/springboot-work-flowable/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..642d572c --- /dev/null +++ b/springboot-work-flowable/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/springboot-work-flowable/README.md b/springboot-work-flowable/README.md new file mode 100644 index 00000000..e69de29b diff --git a/springboot-work-flowable/mvnw b/springboot-work-flowable/mvnw new file mode 100644 index 00000000..a16b5431 --- /dev/null +++ b/springboot-work-flowable/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-work-flowable/mvnw.cmd b/springboot-work-flowable/mvnw.cmd new file mode 100644 index 00000000..c8d43372 --- /dev/null +++ b/springboot-work-flowable/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/springboot-work-flowable/pom.xml b/springboot-work-flowable/pom.xml new file mode 100644 index 00000000..8b5b249e --- /dev/null +++ b/springboot-work-flowable/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + com.notebook + Springboot-Notebook + 0.0.1-SNAPSHOT + + springboot-work-flowable + 0.0.1-SNAPSHOT + springboot-work-flowable + + + + + + org.flowable + flowable-spring-boot-starter + 6.3.0 + + + org.springframework.boot + spring-boot-starter-jdbc + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 1.3.2 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/SpringbootWorkFlowableApplication.java" b/springboot-work-flowable/src/main/java/com/xiaofu/flowable/SpringbootWorkFlowableApplication.java similarity index 89% rename from "springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/SpringbootWorkFlowableApplication.java" rename to springboot-work-flowable/src/main/java/com/xiaofu/flowable/SpringbootWorkFlowableApplication.java index 2ed87ad6..335dede8 100644 --- "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/SpringbootWorkFlowableApplication.java" +++ b/springboot-work-flowable/src/main/java/com/xiaofu/flowable/SpringbootWorkFlowableApplication.java @@ -1,4 +1,4 @@ -package com.springboot101.flowable; +package com.xiaofu.flowable; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/config/FlowableConfig.java" b/springboot-work-flowable/src/main/java/com/xiaofu/flowable/config/FlowableConfig.java similarity index 90% rename from "springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/config/FlowableConfig.java" rename to springboot-work-flowable/src/main/java/com/xiaofu/flowable/config/FlowableConfig.java index a3b23ee6..8a39d415 100644 --- "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/config/FlowableConfig.java" +++ b/springboot-work-flowable/src/main/java/com/xiaofu/flowable/config/FlowableConfig.java @@ -1,11 +1,11 @@ -package com.springboot101.flowable.config; +package com.xiaofu.flowable.config; import org.flowable.spring.SpringProcessEngineConfiguration; import org.flowable.spring.boot.EngineConfigurationConfigurer; import org.springframework.context.annotation.Configuration; /** - * @author 程序员小富 + * @author xinzhifu * @description 设置样式,解决中文乱码 * @date 2020/8/27 15:04 */ diff --git "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/controller/LeaveController.java" b/springboot-work-flowable/src/main/java/com/xiaofu/flowable/controller/LeaveController.java similarity index 96% rename from "springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/controller/LeaveController.java" rename to springboot-work-flowable/src/main/java/com/xiaofu/flowable/controller/LeaveController.java index 3fa36e69..63eacc48 100644 --- "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/java/com/springboot101/flowable/controller/LeaveController.java" +++ b/springboot-work-flowable/src/main/java/com/xiaofu/flowable/controller/LeaveController.java @@ -1,4 +1,4 @@ -package com.springboot101.flowable.controller; +package com.xiaofu.flowable.controller; import lombok.extern.slf4j.Slf4j; import org.flowable.bpmn.model.BpmnModel; @@ -34,7 +34,7 @@ public class LeaveController { private ProcessEngine processEngine; /** - * @author 公众号:程序员小富 + * @author xiaofu * @description 启动流程 * @date 2020/8/26 17:36 */ @@ -55,7 +55,7 @@ public String startLeaveProcess(String staffId) { /** * @param taskId - * @author 程序员小富 + * @author xinzhifu * @description 批准 * @date 2020/8/27 14:30 */ @@ -74,7 +74,7 @@ public String applyTask(String taskId) { /** * @param taskId - * @author 程序员小富 + * @author xinzhifu * @description 驳回 * @date 2020/8/27 14:30 */ @@ -89,7 +89,7 @@ public String rejectTask(String taskId) { /** - * @author 公众号:程序员小富 + * @author xiaofu * @description 生成流程图 * @date 2020/8/27 14:29 */ diff --git "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/resources/application.yml" b/springboot-work-flowable/src/main/resources/application.yml similarity index 100% rename from "springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/resources/application.yml" rename to springboot-work-flowable/src/main/resources/application.yml diff --git "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/resources/processes/LeaveProcess.bpmn20.xml" b/springboot-work-flowable/src/main/resources/processes/LeaveProcess.bpmn20.xml similarity index 100% rename from "springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/src/main/resources/processes/LeaveProcess.bpmn20.xml" rename to springboot-work-flowable/src/main/resources/processes/LeaveProcess.bpmn20.xml diff --git a/springboot101/.gitignore b/springboot101/.gitignore deleted file mode 100644 index 86306e62..00000000 --- a/springboot101/.gitignore +++ /dev/null @@ -1,36 +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/ -!/基础配置/springboot-database-doc/mvnw -!/基础配置/springboot-database-doc/mvnw -!/低代码/springboot-magic-api/target/ diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/pom.xml b/springboot101/MQTT/springboot-mqtt-messagepush/pom.xml deleted file mode 100644 index c5642936..00000000 --- a/springboot101/MQTT/springboot-mqtt-messagepush/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-mqtt-messagepush - 0.0.1-SNAPSHOT - springboot-mqtt-messagepush - - - - - - org.springframework.integration - spring-integration-mqtt - - - - org.eclipse.paho - org.eclipse.paho.client.mqttv3 - [1.2.1,) - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/IotMqttProducerConfig.java b/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/IotMqttProducerConfig.java deleted file mode 100644 index b0b7c3bd..00000000 --- a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/IotMqttProducerConfig.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.springboot101.config; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.integration.annotation.ServiceActivator; -import org.springframework.integration.channel.DirectChannel; -import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory; -import org.springframework.integration.mqtt.core.MqttPahoClientFactory; -import org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler; -import org.springframework.messaging.MessageChannel; -import org.springframework.messaging.MessageHandler; - -/** - * @Author: 程序员小富 - * @Description: - */ -@Configuration -public class IotMqttProducerConfig { - - @Autowired - private MqttConfig mqttConfig; - - @Bean - public MqttPahoClientFactory mqttClientFactory() { - DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory(); -// factory.setServerURIs(mqttConfig.getServers()); - return factory; - } - - @Bean - public MessageChannel iotMqttInputChannel() { - return new DirectChannel(); - } - - @Bean - @ServiceActivator(inputChannel = "iotMqttInputChannel") - public MessageHandler mqttOutbound() { - MqttPahoMessageHandler messageHandler = new MqttPahoMessageHandler(mqttConfig.getServerClientId(), mqttClientFactory()); - messageHandler.setAsync(false); - messageHandler.setDefaultQos(2); - messageHandler.setDefaultTopic(mqttConfig.getDefaultTopic()); - return messageHandler; - } -} diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/IotMqttSubscriberConfig.java b/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/IotMqttSubscriberConfig.java deleted file mode 100644 index eec12a8f..00000000 --- a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/IotMqttSubscriberConfig.java +++ /dev/null @@ -1,71 +0,0 @@ -//package com.mqtt.config; -// -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.integration.annotation.ServiceActivator; -//import org.springframework.integration.channel.DirectChannel; -//import org.springframework.integration.core.MessageProducer; -//import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory; -//import org.springframework.integration.mqtt.core.MqttPahoClientFactory; -//import org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter; -//import org.springframework.integration.mqtt.support.DefaultPahoMessageConverter; -//import org.springframework.messaging.MessageChannel; -//import org.springframework.messaging.MessageHandler; -//import org.springframework.messaging.MessagingException; -// -///** -// * @Author: 公众号:程序员小富 -// * @Description: 消息订阅配置 -// * @date 2020/6/8 18:24 -// */ -//@Configuration -//public class IotMqttSubscriberConfig { -// -// @Autowired -// private MqttConfig mqttConfig; -// -// @Bean -// public MqttPahoClientFactory mqttClientFactory() { -// DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory(); -// factory.setServerURIs(mqttConfig.getServers()); -// return factory; -// } -// -// @Bean -// public MessageChannel iotMqttInputChannel() { -// return new DirectChannel(); -// } -// -// @Bean -// public MessageProducer inbound() { -// MqttPahoMessageDrivenChannelAdapter adapter = new MqttPahoMessageDrivenChannelAdapter(mqttConfig.getClientId(), mqttClientFactory(), mqttConfig.getDefaultTopic()); -// adapter.setCompletionTimeout(5000); -// adapter.setConverter(new DefaultPahoMessageConverter()); -// adapter.setQos(2); -// adapter.setOutputChannel(iotMqttInputChannel()); -// return adapter; -// } -// -// /** -// * @author 公众号:程序员小富 -// * @description 消息订阅 -// * @date 2020/6/8 18:20 -// */ -// @Bean -// @ServiceActivator(inputChannel = "iotMqttInputChannel") -// public MessageHandler handlerTest() { -// -// return message -> { -// try { -// String string = message.getPayload().toString(); -// System.out.println("接收到消息:" + string); -// } catch (MessagingException ex) { -// //logger.info(ex.getMessage()); -// } -// }; -// -// } -//} -// -// diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/MqttConfig.java b/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/MqttConfig.java deleted file mode 100644 index 128f8eb4..00000000 --- a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/config/MqttConfig.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.springboot101.config; - -import lombok.Getter; -import lombok.Setter; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.integration.annotation.IntegrationComponentScan; -import org.springframework.stereotype.Component; - -/** - * @Author: 程序员小富 - * @Description: 基础配置类 - * @date 2020/6/8 18:25 - */ -@Getter -@Setter -@Component -@IntegrationComponentScan -@ConfigurationProperties(prefix = "iot.mqtt") -public class MqttConfig { - - /** - * 服务地址 - */ - private String servers; - - /** - * 客户端id - */ - private String clientId; - - /** - * 服务端id - */ - private String serverClientId; - - /** - * 默认主题 - */ - private String defaultTopic; -} diff --git a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/producer/IotMqttGateway.java b/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/producer/IotMqttGateway.java deleted file mode 100644 index cb44e828..00000000 --- a/springboot101/MQTT/springboot-mqtt-messagepush/src/main/java/com/springboot101/producer/IotMqttGateway.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.springboot101.producer; - -import org.springframework.integration.annotation.MessagingGateway; -import org.springframework.integration.mqtt.support.MqttHeaders; -import org.springframework.messaging.handler.annotation.Header; - -/** - * @author 公众号:程序员小富 - * @description rabbitmq mqtt协议网关接口 - * @date 2020/6/8 18:26 - */ -@MessagingGateway(defaultRequestChannel = "iotMqttInputChannel") -public interface IotMqttGateway { - - void sendMessage2Mqtt(String data); - - void sendMessage2Mqtt(String data, @Header(MqttHeaders.TOPIC) String topic); - - void sendMessage2Mqtt(@Header(MqttHeaders.TOPIC) String topic, @Header(MqttHeaders.QOS) int qos, String payload); -} - - - diff --git a/springboot101/README.md b/springboot101/README.md deleted file mode 100644 index 566526c2..00000000 --- a/springboot101/README.md +++ /dev/null @@ -1,33 +0,0 @@ -## SpringBoot101 - -SpringBoot101 是一个SpringBoot从入门到精通的系列教程, - -## 基础 -- Springboot hello(脚手架) - -## 基础 -- springboot多环境打包配置 - -## 模版引擎 -- springboot整合Thymeleaf模板 -- springboot整合Jsp模板 -- springboot整合FreeMarker模板 -- springboot整合Velocity模板 - -## 通用 - -- Springboot自定义启动banner -- Springboot 如何构建一个 RESTful 风格的 Web 服务 -- Springboot 统一返回值 -- Springboot 全局异常捕获 -- Springboot 6种读取配置文件的方案 -- Springboot 3种全局时间格式化方案 -- Springboot 实现flowable工作流 -- Springboot 自定义注解实现Log日志打印 -- Springboot 防盗链的实现 -- Springboot 自定义拦截器 -- Springboot 自定义过滤器 -- Springboot 自定义注解实现AOP切面 -- Springboot 十五个拓展点 - - diff --git a/springboot101/pom.xml b/springboot101/pom.xml deleted file mode 100644 index d6a63145..00000000 --- a/springboot101/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - 4.0.0 - - com.notebook - Springboot-Notebook - 0.0.1-SNAPSHOT - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - springboot101 - pom - - - - MQTT/springboot-mqtt-messagepush - rabbitmq/springboot-rabbitmq-confirm - - - redis/springboot-aop-redis-lua - redis/springboot-redisson-lock - - - 低代码/springboot-erupt - 低代码/springboot-magic-api - - - webhook/springboot-webhook-wechat - 人脸识别/springboot-detect-faces - 去水印/springboot-douyin-watermark - 实时推送/springboot-realtime-data - 工作流/springboot-work-flowable - - - 文件操作/springboot-file-storage - - - 通用功能/springboot-aop-unifiedlog - 通用功能/springboot-database-doc - 通用功能/springboot-delayqueue - 通用功能/springboot-env-variables - 通用功能/springboot-global-formatting - 通用功能/springboot-jasypt - 通用功能/springboot-banner - 通用功能/springboot-valid-params - 通用功能/springboot-streaming - - - 接口文档/springboot-swagger - 接口文档/springboot-knife4j - - - 设计模式/springboot-design-chain - - - 模版引擎/springboot-thymeleaf - - - 数据库/springboot-dynamic-datasource - - - - UTF-8 - UTF-8 - 2.7.6 - - - - - - org.springframework.boot - spring-boot-dependencies - ${spring-boot.version} - pom - import - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - - - diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/pom.xml b/springboot101/rabbitmq/springboot-rabbitmq-confirm/pom.xml deleted file mode 100644 index 0172808c..00000000 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-rabbitmq-confirm - 0.0.1-SNAPSHOT - springboot-rabbitmq-confirm - - - - org.springframework.boot - spring-boot-starter-amqp - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/controller/TestController.java b/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/controller/TestController.java deleted file mode 100644 index 0e76af88..00000000 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/java/com/springboot101/confirm/controller/TestController.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.springboot101.confirm.controller; - -import com.springboot101.confirm.sender.SendMessage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -/** - * @Author: 公众号:程序员小富 - * @Description: - */ -@Controller -@RequestMapping -public class TestController { - - @Autowired - private SendMessage sendMessage; - - @RequestMapping(value = "/hello", method = RequestMethod.GET) - @ResponseBody - public String test() { - - //sendMessage.sendMessage("", "confirm_test_queue", "0" ); - - - for (int i = 0; i < 5; i++) { - - sendMessage.sendMessage("", "confirm_test_queue", "发送者消息"); - } - - return "success"; - } -} diff --git a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/resources/application.properties b/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/resources/application.properties deleted file mode 100644 index 755e33a7..00000000 --- a/springboot101/rabbitmq/springboot-rabbitmq-confirm/src/main/resources/application.properties +++ /dev/null @@ -1,15 +0,0 @@ -spring.rabbitmq.host=127.0.0.1 -spring.rabbitmq.port=5672 -spring.rabbitmq.username=guest -spring.rabbitmq.password=guest -#################################################### -spring.rabbitmq.publisher-confirms=true -spring.rabbitmq.publisher-returns=true -#################################################### -spring.rabbitmq.listener.simple.acknowledge-mode=manual -spring.rabbitmq.listener.simple.retry.enabled=true -#spring.rabbitmq.listener.simple.concurrency=1 -#spring.rabbitmq.listener.simple.max-concurrency=1 - - - diff --git a/springboot101/redis/springboot-aop-redis-lua/README.md b/springboot101/redis/springboot-aop-redis-lua/README.md deleted file mode 100644 index d706b778..00000000 --- a/springboot101/redis/springboot-aop-redis-lua/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# springboot-aop-redis-lua -springboot-aop-redis-lua 实现的分布式限流方案 - -# 关注公众号【程序员小富】,获取 2000G 面试题、电子书、架构技术学习资料 diff --git a/springboot101/redis/springboot-aop-redis-lua/pom.xml b/springboot101/redis/springboot-aop-redis-lua/pom.xml deleted file mode 100644 index 5718fb79..00000000 --- a/springboot101/redis/springboot-aop-redis-lua/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-aop-redis-lua - 0.0.1-SNAPSHOT - springboot-aop-redis-lua - - - - - org.springframework.boot - spring-boot-starter-data-redis - - - org.springframework.boot - spring-boot-starter-aop - - - - com.google.guava - guava - 32.0.0-jre - - - - org.apache.commons - commons-lang3 - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/RedisLuaAopApplication.java b/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/RedisLuaAopApplication.java deleted file mode 100644 index d67325da..00000000 --- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/RedisLuaAopApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.springboot101.limit; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class RedisLuaAopApplication { - - public static void main(String[] args) { - SpringApplication.run(RedisLuaAopApplication.class, args); - } - -} diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/RedisController.java b/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/RedisController.java deleted file mode 100644 index 713000bf..00000000 --- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/controller/RedisController.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.springboot101.limit.controller; - -import com.alibaba.fastjson.JSON; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ResponseBody; - -import java.io.Serializable; -import java.time.LocalDateTime; -import java.util.Date; - -/** - * @Author: 公众号:程序员小富 - * @Description: - */ -@Controller -public class RedisController { - - @Autowired - private RedisTemplate redisTemplate; - - @GetMapping("/addKey") - @ResponseBody - public String addkey() { - - for (int i = 0; i < 500000; i++) { - - redisTemplate.opsForValue().set("test_key_" + i, i); - } - return null; - } - -} \ No newline at end of file diff --git a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/OrderInfo.java b/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/OrderInfo.java deleted file mode 100644 index 11ceaf70..00000000 --- a/springboot101/redis/springboot-aop-redis-lua/src/main/java/com/springboot101/limit/enmu/OrderInfo.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.springboot101.limit.enmu; - -///** -// * @Author: 公众号:程序员小富 -// * @Description: -// */ -//public class OrderInfo { -// -// //@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") -// private LocalDateTime createTime; -// -// //@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") -// private Date updateTime; -// -// public LocalDateTime getCreateTime() { -// return createTime; -// } -// -// public void setCreateTime(LocalDateTime createTime) { -// this.createTime = createTime; -// } -// -// public Date getUpdateTime() { -// return updateTime; -// } -// -// public void setUpdateTime(Date updateTime) { -// this.updateTime = updateTime; -// } -//} diff --git a/springboot101/redis/springboot-redisson-lock/pom.xml b/springboot101/redis/springboot-redisson-lock/pom.xml deleted file mode 100644 index b3ff5193..00000000 --- a/springboot101/redis/springboot-redisson-lock/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-redisson-lock - 0.0.1-SNAPSHOT - springboot-redisson-lock - - - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - - org.redisson - redisson-spring-boot-starter - 3.11.4 - - - - org.springframework.boot - spring-boot-starter-data-redis - 2.3.1.RELEASE - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/entity/OrderInfo.java b/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/entity/OrderInfo.java deleted file mode 100644 index 795214fc..00000000 --- a/springboot101/redis/springboot-redisson-lock/src/main/java/com/springboot101/redisson/entity/OrderInfo.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.springboot101.redisson.entity; - -import org.redisson.api.annotation.REntity; -import org.redisson.api.annotation.RId; -import org.redisson.api.annotation.RIndex; - -/** - * @Author: 公众号:程序员小富 - * @Description: - */ -@REntity -public class OrderInfo { - - @RId - private Integer id; - - @RIndex - private String name; - - @RIndex - private Integer age; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getAge() { - return age; - } - - public void setAge(Integer age) { - this.age = age; - } -} diff --git a/springboot101/webhook/springboot-webhook-wechat/README.md b/springboot101/webhook/springboot-webhook-wechat/README.md deleted file mode 100644 index f545a45f..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/README.md +++ /dev/null @@ -1 +0,0 @@ -本文文章地址: \ No newline at end of file diff --git a/springboot101/webhook/springboot-webhook-wechat/pom.xml b/springboot101/webhook/springboot-webhook-wechat/pom.xml deleted file mode 100644 index bc11bd2a..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - - springboot-webhook-wechat - 0.0.1-SNAPSHOT - springboot-webhook-wechat - Demo project for Spring Boot - - - 1.8 - - - - - - org.springframework.boot - spring-boot-starter-web - - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - - com.alibaba - fastjson - 1.2.83 - - - - org.projectlombok - lombok - 1.16.18 - provided - - - - - org.springframework.boot - spring-boot-devtools - runtime - - - - com.dtflys.forest - spring-boot-starter-forest - 1.5.0-RC3 - - - - org.apache.httpcomponents - httpmime - 4.5 - - - - org.apache.httpcomponents - httpclient - 4.5.13 - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/WebhookApplication.java b/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/WebhookApplication.java deleted file mode 100644 index c84cb766..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/WebhookApplication.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; - -@ComponentScan("com.sprinboot101.webhook") -@SpringBootApplication -public class WebhookApplication { - - public static void main(String[] args) { - SpringApplication.run(WebhookApplication.class, args); - } - -} diff --git a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/controller/WebhookController.java b/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/controller/WebhookController.java deleted file mode 100644 index eccda3b2..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/controller/WebhookController.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.springboot101.controller; - -import com.alibaba.fastjson.JSON; -import com.springboot101.utils.HttpUtil; -import com.springboot101.vo.GithubWebhookPullVo; -import com.springboot101.vo.WeChatWebhook; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -import java.text.SimpleDateFormat; -import java.util.Arrays; -import java.util.Date; -import java.util.List; - -@RestController -public class WebhookController { - private static final Logger log = LoggerFactory.getLogger(HttpUtil.class); - private static final String WECHAT_URL = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=145a516a-dd15-421f-97a3-ba3bf1479369"; - - private static final String GITHUB_API = "https://api.github.com/users/"; - - /** - * @param webhook webhook - * @Author 程序员内点事 - * @Description: github 回调 - * @Date 2021/05/19 - */ - @PostMapping("/webhook") - public String webhookGithub(@RequestBody GithubWebhookPullVo webhook) { - log.info("webhook 入参接收 weChatWebhook {}", JSON.toJSONString(webhook)); - - // 获取仓库名和当前时间 - String name = webhook.getRepository().getName(); - SimpleDateFormat simpleFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - String now = simpleFormatter.format(new Date()); - - StringBuilder contentBuilder = new StringBuilder(); - if (!webhook.getCommits().isEmpty()) { - GithubWebhookPullVo.CommitsDTO commitsDTO = webhook.getCommits().get(0); - contentBuilder.append("提交者:[ ").append(commitsDTO.getCommitter().getName()).append(" ] \r\n") - .append("时间:[ ").append(now).append(" ]\n") - .append("向远程仓库 [ ").append(name).append(" ]推送代码 \n") - .append("提交详情: \n"); - - appendListContent(contentBuilder, "添加文件: \n[\n", commitsDTO.getAdded()); - appendListContent(contentBuilder, "修改文件: \n[\n", commitsDTO.getModified()); - appendListContent(contentBuilder, "删除文件: \n[\n", commitsDTO.getRemoved()); - } - - String content = contentBuilder.toString(); - log.info(content); - - WeChatWebhook weChatWebhook = new WeChatWebhook(); - weChatWebhook.setMsgtype("text"); - WeChatWebhook.TextDTO textDTO = new WeChatWebhook.TextDTO(); - textDTO.setContent(content); - textDTO.setMentionedList(Arrays.asList("@all")); - textDTO.setMentionedMobileList(Arrays.asList("@all")); - weChatWebhook.setText(textDTO); - - /** - * 组装参数后向企业微信发送webhook请求 - */ - log.info("企业微信发送参数 {}", JSON.toJSONString(weChatWebhook)); - String post = HttpUtil.sendPostJsonBody(WECHAT_URL, JSON.toJSONString(weChatWebhook)); - log.info("企业微信发送结果 post {}", post); - return JSON.toJSONString(post); - } - - /** - * 将列表内容追加到字符串构建器中 - * - * @param stringBuilder 字符串构建器 - * @param prefix 前缀 - * @param list 列表内容 - */ - private void appendListContent(StringBuilder stringBuilder, String prefix, List list) { - if (!list.isEmpty()) { - stringBuilder.append(prefix); - for (int i = 0; i < list.size(); i++) { - stringBuilder.append((i + 1)).append("、").append(list.get(i)).append("\n"); - } - stringBuilder.append("] , \n"); - } - } -} diff --git a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/utils/HttpUtil.java b/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/utils/HttpUtil.java deleted file mode 100644 index 3c391919..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/utils/HttpUtil.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.springboot101.utils; - -import org.apache.http.HttpResponse; -import org.apache.http.HttpStatus; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.protocol.HTTP; -import org.apache.http.util.EntityUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -import java.io.IOException; - -/** - * @Auther: 公众号:程序员小富 - * @Date: 2021/5/24 20:40 - * @Description: - */ -@Component - -public class HttpUtil { - private static final Logger log = LoggerFactory.getLogger(HttpUtil.class); - - /** - * 发送post请求 - * - * @param url 请求的url - * @param body json串 - * @return - */ - public static String sendPostJsonBody(String url, String body) { - log.debug("[HttpClientUtil][sendPostJsonBody] 入参 url={} body={}", url, body); - HttpPost httpPost = new HttpPost(url); - httpPost.addHeader(HTTP.CONTENT_TYPE, "application/json;charset=utf-8"); - StringEntity entity = new StringEntity(body, "utf-8"); - entity.setContentEncoding("UTF-8"); - entity.setContentType("application/json"); - httpPost.setEntity(entity); - HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); - try { - HttpClient client = httpClientBuilder.build(); - HttpResponse response = client.execute(httpPost); - if (response.getStatusLine() != null && response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { - String result = EntityUtils.toString(response.getEntity(), "utf-8"); - log.debug("[HttpClientUtil][sendPostJsonBody] 结果 url={} result={}", url, result); - return result; - } - log.warn("[HttpClientUtil][sendPostJsonBody] 请求失败 response={}", response.toString()); - return ""; - } catch (IOException ex) { - log.error("[HttpClientUtil][sendPostJsonBody] 请求异常 ex={}", url, ex); - return ""; - } - } -} diff --git a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/GithubWebhookPullVo.java b/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/GithubWebhookPullVo.java deleted file mode 100644 index 1f8c4463..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/GithubWebhookPullVo.java +++ /dev/null @@ -1,1185 +0,0 @@ -package com.springboot101.vo;//package com.springboot101.webhook.vo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.util.List; - -/** - * @author 公众号:程序员小富 - * @Description:程序员小富 - * @date 2021/05/19 - */ -@NoArgsConstructor -public class GithubWebhookPullVo { - @JsonProperty("ref") - private String ref; - @JsonProperty("before") - private String before; - @JsonProperty("after") - private String after; - @JsonProperty("repository") - private RepositoryDTO repository; - @JsonProperty("pusher") - private PusherDTO pusher; - @JsonProperty("sender") - private SenderDTO sender; - @JsonProperty("created") - private Boolean created; - @JsonProperty("deleted") - private Boolean deleted; - @JsonProperty("forced") - private Boolean forced; - @JsonProperty("base_ref") - private Object baseRef; - @JsonProperty("compare") - private String compare; - @JsonProperty("commits") - private List commits; - @JsonProperty("head_commit") - private HeadCommitDTO headCommit; - - public String getRef() { - return ref; - } - - @NoArgsConstructor - @Data - public static class PusherDTO { - @JsonProperty("name") - private String name; - @JsonProperty("email") - private String email; - } - - @NoArgsConstructor - @Data - public static class SenderDTO { - @JsonProperty("login") - private String login; - @JsonProperty("id") - private Integer id; - @JsonProperty("node_id") - private String nodeId; - @JsonProperty("avatar_url") - private String avatarUrl; - @JsonProperty("gravatar_id") - private String gravatarId; - @JsonProperty("url") - private String url; - @JsonProperty("html_url") - private String htmlUrl; - @JsonProperty("followers_url") - private String followersUrl; - @JsonProperty("following_url") - private String followingUrl; - @JsonProperty("gists_url") - private String gistsUrl; - @JsonProperty("starred_url") - private String starredUrl; - @JsonProperty("subscriptions_url") - private String subscriptionsUrl; - @JsonProperty("organizations_url") - private String organizationsUrl; - @JsonProperty("repos_url") - private String reposUrl; - @JsonProperty("events_url") - private String eventsUrl; - @JsonProperty("received_events_url") - private String receivedEventsUrl; - @JsonProperty("type") - private String type; - @JsonProperty("site_admin") - private Boolean siteAdmin; - } - - @NoArgsConstructor - @Data - public static class HeadCommitDTO { - @JsonProperty("id") - private String id; - @JsonProperty("tree_id") - private String treeId; - @JsonProperty("distinct") - private Boolean distinct; - @JsonProperty("message") - private String message; - @JsonProperty("timestamp") - private String timestamp; - @JsonProperty("url") - private String url; - @JsonProperty("author") - private AuthorDTO author; - @JsonProperty("committer") - private CommitterDTO committer; - @JsonProperty("added") - private List added; - @JsonProperty("removed") - private List removed; - @JsonProperty("modified") - private List modified; - - @NoArgsConstructor - @Data - public static class AuthorDTO { - @JsonProperty("name") - private String name; - @JsonProperty("email") - private String email; - } - - @NoArgsConstructor - @Data - public static class CommitterDTO { - @JsonProperty("name") - private String name; - @JsonProperty("email") - private String email; - } - } - - public void setRef(String ref) { - this.ref = ref; - } - - public String getBefore() { - return before; - } - - public void setBefore(String before) { - this.before = before; - } - - public String getAfter() { - return after; - } - - public void setAfter(String after) { - this.after = after; - } - - public RepositoryDTO getRepository() { - return repository; - } - - public void setRepository(RepositoryDTO repository) { - this.repository = repository; - } - - public PusherDTO getPusher() { - return pusher; - } - - public void setPusher(PusherDTO pusher) { - this.pusher = pusher; - } - - public SenderDTO getSender() { - return sender; - } - - public void setSender(SenderDTO sender) { - this.sender = sender; - } - - public Boolean getCreated() { - return created; - } - - public void setCreated(Boolean created) { - this.created = created; - } - - public Boolean getDeleted() { - return deleted; - } - - public void setDeleted(Boolean deleted) { - this.deleted = deleted; - } - - public Boolean getForced() { - return forced; - } - - public void setForced(Boolean forced) { - this.forced = forced; - } - - public Object getBaseRef() { - return baseRef; - } - - public void setBaseRef(Object baseRef) { - this.baseRef = baseRef; - } - - public String getCompare() { - return compare; - } - - public void setCompare(String compare) { - this.compare = compare; - } - - public List getCommits() { - return commits; - } - - public void setCommits(List commits) { - this.commits = commits; - } - - public HeadCommitDTO getHeadCommit() { - return headCommit; - } - - public void setHeadCommit(HeadCommitDTO headCommit) { - this.headCommit = headCommit; - } - - public static class RepositoryDTO { - @JsonProperty("id") - private Integer id; - @JsonProperty("node_id") - private String nodeId; - @JsonProperty("name") - private String name; - @JsonProperty("full_name") - private String fullName; - @JsonProperty("private") - private Boolean privateX; - @JsonProperty("owner") - private OwnerDTO owner; - @JsonProperty("html_url") - private String htmlUrl; - @JsonProperty("description") - private String description; - @JsonProperty("fork") - private Boolean fork; - @JsonProperty("url") - private String url; - @JsonProperty("forks_url") - private String forksUrl; - @JsonProperty("keys_url") - private String keysUrl; - @JsonProperty("collaborators_url") - private String collaboratorsUrl; - @JsonProperty("teams_url") - private String teamsUrl; - @JsonProperty("hooks_url") - private String hooksUrl; - @JsonProperty("issue_events_url") - private String issueEventsUrl; - @JsonProperty("events_url") - private String eventsUrl; - @JsonProperty("assignees_url") - private String assigneesUrl; - @JsonProperty("branches_url") - private String branchesUrl; - @JsonProperty("tags_url") - private String tagsUrl; - @JsonProperty("blobs_url") - private String blobsUrl; - @JsonProperty("git_tags_url") - private String gitTagsUrl; - @JsonProperty("git_refs_url") - private String gitRefsUrl; - @JsonProperty("trees_url") - private String treesUrl; - @JsonProperty("statuses_url") - private String statusesUrl; - @JsonProperty("languages_url") - private String languagesUrl; - @JsonProperty("stargazers_url") - private String stargazersUrl; - @JsonProperty("contributors_url") - private String contributorsUrl; - @JsonProperty("subscribers_url") - private String subscribersUrl; - @JsonProperty("subscription_url") - private String subscriptionUrl; - @JsonProperty("commits_url") - private String commitsUrl; - @JsonProperty("git_commits_url") - private String gitCommitsUrl; - @JsonProperty("comments_url") - private String commentsUrl; - @JsonProperty("issue_comment_url") - private String issueCommentUrl; - @JsonProperty("contents_url") - private String contentsUrl; - @JsonProperty("compare_url") - private String compareUrl; - @JsonProperty("merges_url") - private String mergesUrl; - @JsonProperty("archive_url") - private String archiveUrl; - @JsonProperty("downloads_url") - private String downloadsUrl; - @JsonProperty("issues_url") - private String issuesUrl; - @JsonProperty("pulls_url") - private String pullsUrl; - @JsonProperty("milestones_url") - private String milestonesUrl; - @JsonProperty("notifications_url") - private String notificationsUrl; - @JsonProperty("labels_url") - private String labelsUrl; - @JsonProperty("releases_url") - private String releasesUrl; - @JsonProperty("deployments_url") - private String deploymentsUrl; - @JsonProperty("created_at") - private Integer createdAt; - @JsonProperty("updated_at") - private String updatedAt; - @JsonProperty("pushed_at") - private Integer pushedAt; - @JsonProperty("git_url") - private String gitUrl; - @JsonProperty("ssh_url") - private String sshUrl; - @JsonProperty("clone_url") - private String cloneUrl; - @JsonProperty("svn_url") - private String svnUrl; - @JsonProperty("homepage") - private String homepage; - @JsonProperty("size") - private Integer size; - @JsonProperty("stargazers_count") - private Integer stargazersCount; - @JsonProperty("watchers_count") - private Integer watchersCount; - @JsonProperty("language") - private String language; - @JsonProperty("has_issues") - private Boolean hasIssues; - @JsonProperty("has_projects") - private Boolean hasProjects; - @JsonProperty("has_downloads") - private Boolean hasDownloads; - @JsonProperty("has_wiki") - private Boolean hasWiki; - @JsonProperty("has_pages") - private Boolean hasPages; - @JsonProperty("forks_count") - private Integer forksCount; - @JsonProperty("mirror_url") - private Object mirrorUrl; - @JsonProperty("archived") - private Boolean archived; - @JsonProperty("disabled") - private Boolean disabled; - @JsonProperty("open_issues_count") - private Integer openIssuesCount; - @JsonProperty("license") - private Object license; - @JsonProperty("forks") - private Integer forks; - @JsonProperty("open_issues") - private Integer openIssues; - @JsonProperty("watchers") - private Integer watchers; - @JsonProperty("default_branch") - private String defaultBranch; - @JsonProperty("stargazers") - private Integer stargazers; - @JsonProperty("master_branch") - private String masterBranch; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getNodeId() { - return nodeId; - } - - public void setNodeId(String nodeId) { - this.nodeId = nodeId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getFullName() { - return fullName; - } - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - public Boolean getPrivateX() { - return privateX; - } - - public void setPrivateX(Boolean privateX) { - this.privateX = privateX; - } - - public OwnerDTO getOwner() { - return owner; - } - - public void setOwner(OwnerDTO owner) { - this.owner = owner; - } - - public String getHtmlUrl() { - return htmlUrl; - } - - public void setHtmlUrl(String htmlUrl) { - this.htmlUrl = htmlUrl; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Boolean getFork() { - return fork; - } - - public void setFork(Boolean fork) { - this.fork = fork; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getForksUrl() { - return forksUrl; - } - - public void setForksUrl(String forksUrl) { - this.forksUrl = forksUrl; - } - - public String getKeysUrl() { - return keysUrl; - } - - public void setKeysUrl(String keysUrl) { - this.keysUrl = keysUrl; - } - - public String getCollaboratorsUrl() { - return collaboratorsUrl; - } - - public void setCollaboratorsUrl(String collaboratorsUrl) { - this.collaboratorsUrl = collaboratorsUrl; - } - - public String getTeamsUrl() { - return teamsUrl; - } - - public void setTeamsUrl(String teamsUrl) { - this.teamsUrl = teamsUrl; - } - - public String getHooksUrl() { - return hooksUrl; - } - - public void setHooksUrl(String hooksUrl) { - this.hooksUrl = hooksUrl; - } - - public String getIssueEventsUrl() { - return issueEventsUrl; - } - - public void setIssueEventsUrl(String issueEventsUrl) { - this.issueEventsUrl = issueEventsUrl; - } - - public String getEventsUrl() { - return eventsUrl; - } - - public void setEventsUrl(String eventsUrl) { - this.eventsUrl = eventsUrl; - } - - public String getAssigneesUrl() { - return assigneesUrl; - } - - public void setAssigneesUrl(String assigneesUrl) { - this.assigneesUrl = assigneesUrl; - } - - public String getBranchesUrl() { - return branchesUrl; - } - - public void setBranchesUrl(String branchesUrl) { - this.branchesUrl = branchesUrl; - } - - public String getTagsUrl() { - return tagsUrl; - } - - public void setTagsUrl(String tagsUrl) { - this.tagsUrl = tagsUrl; - } - - public String getBlobsUrl() { - return blobsUrl; - } - - public void setBlobsUrl(String blobsUrl) { - this.blobsUrl = blobsUrl; - } - - public String getGitTagsUrl() { - return gitTagsUrl; - } - - public void setGitTagsUrl(String gitTagsUrl) { - this.gitTagsUrl = gitTagsUrl; - } - - public String getGitRefsUrl() { - return gitRefsUrl; - } - - public void setGitRefsUrl(String gitRefsUrl) { - this.gitRefsUrl = gitRefsUrl; - } - - public String getTreesUrl() { - return treesUrl; - } - - public void setTreesUrl(String treesUrl) { - this.treesUrl = treesUrl; - } - - public String getStatusesUrl() { - return statusesUrl; - } - - public void setStatusesUrl(String statusesUrl) { - this.statusesUrl = statusesUrl; - } - - public String getLanguagesUrl() { - return languagesUrl; - } - - public void setLanguagesUrl(String languagesUrl) { - this.languagesUrl = languagesUrl; - } - - public String getStargazersUrl() { - return stargazersUrl; - } - - public void setStargazersUrl(String stargazersUrl) { - this.stargazersUrl = stargazersUrl; - } - - public String getContributorsUrl() { - return contributorsUrl; - } - - public void setContributorsUrl(String contributorsUrl) { - this.contributorsUrl = contributorsUrl; - } - - public String getSubscribersUrl() { - return subscribersUrl; - } - - public void setSubscribersUrl(String subscribersUrl) { - this.subscribersUrl = subscribersUrl; - } - - public String getSubscriptionUrl() { - return subscriptionUrl; - } - - public void setSubscriptionUrl(String subscriptionUrl) { - this.subscriptionUrl = subscriptionUrl; - } - - public String getCommitsUrl() { - return commitsUrl; - } - - public void setCommitsUrl(String commitsUrl) { - this.commitsUrl = commitsUrl; - } - - public String getGitCommitsUrl() { - return gitCommitsUrl; - } - - public void setGitCommitsUrl(String gitCommitsUrl) { - this.gitCommitsUrl = gitCommitsUrl; - } - - public String getCommentsUrl() { - return commentsUrl; - } - - public void setCommentsUrl(String commentsUrl) { - this.commentsUrl = commentsUrl; - } - - public String getIssueCommentUrl() { - return issueCommentUrl; - } - - public void setIssueCommentUrl(String issueCommentUrl) { - this.issueCommentUrl = issueCommentUrl; - } - - public String getContentsUrl() { - return contentsUrl; - } - - public void setContentsUrl(String contentsUrl) { - this.contentsUrl = contentsUrl; - } - - public String getCompareUrl() { - return compareUrl; - } - - public void setCompareUrl(String compareUrl) { - this.compareUrl = compareUrl; - } - - public String getMergesUrl() { - return mergesUrl; - } - - public void setMergesUrl(String mergesUrl) { - this.mergesUrl = mergesUrl; - } - - public String getArchiveUrl() { - return archiveUrl; - } - - public void setArchiveUrl(String archiveUrl) { - this.archiveUrl = archiveUrl; - } - - public String getDownloadsUrl() { - return downloadsUrl; - } - - public void setDownloadsUrl(String downloadsUrl) { - this.downloadsUrl = downloadsUrl; - } - - public String getIssuesUrl() { - return issuesUrl; - } - - public void setIssuesUrl(String issuesUrl) { - this.issuesUrl = issuesUrl; - } - - public String getPullsUrl() { - return pullsUrl; - } - - public void setPullsUrl(String pullsUrl) { - this.pullsUrl = pullsUrl; - } - - public String getMilestonesUrl() { - return milestonesUrl; - } - - public void setMilestonesUrl(String milestonesUrl) { - this.milestonesUrl = milestonesUrl; - } - - public String getNotificationsUrl() { - return notificationsUrl; - } - - public void setNotificationsUrl(String notificationsUrl) { - this.notificationsUrl = notificationsUrl; - } - - public String getLabelsUrl() { - return labelsUrl; - } - - public void setLabelsUrl(String labelsUrl) { - this.labelsUrl = labelsUrl; - } - - public String getReleasesUrl() { - return releasesUrl; - } - - public void setReleasesUrl(String releasesUrl) { - this.releasesUrl = releasesUrl; - } - - public String getDeploymentsUrl() { - return deploymentsUrl; - } - - public void setDeploymentsUrl(String deploymentsUrl) { - this.deploymentsUrl = deploymentsUrl; - } - - public Integer getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Integer createdAt) { - this.createdAt = createdAt; - } - - public String getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - } - - public Integer getPushedAt() { - return pushedAt; - } - - public void setPushedAt(Integer pushedAt) { - this.pushedAt = pushedAt; - } - - public String getGitUrl() { - return gitUrl; - } - - public void setGitUrl(String gitUrl) { - this.gitUrl = gitUrl; - } - - public String getSshUrl() { - return sshUrl; - } - - public void setSshUrl(String sshUrl) { - this.sshUrl = sshUrl; - } - - public String getCloneUrl() { - return cloneUrl; - } - - public void setCloneUrl(String cloneUrl) { - this.cloneUrl = cloneUrl; - } - - public String getSvnUrl() { - return svnUrl; - } - - public void setSvnUrl(String svnUrl) { - this.svnUrl = svnUrl; - } - - public String getHomepage() { - return homepage; - } - - public void setHomepage(String homepage) { - this.homepage = homepage; - } - - public Integer getSize() { - return size; - } - - public void setSize(Integer size) { - this.size = size; - } - - public Integer getStargazersCount() { - return stargazersCount; - } - - public void setStargazersCount(Integer stargazersCount) { - this.stargazersCount = stargazersCount; - } - - public Integer getWatchersCount() { - return watchersCount; - } - - public void setWatchersCount(Integer watchersCount) { - this.watchersCount = watchersCount; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language; - } - - public Boolean getHasIssues() { - return hasIssues; - } - - public void setHasIssues(Boolean hasIssues) { - this.hasIssues = hasIssues; - } - - public Boolean getHasProjects() { - return hasProjects; - } - - public void setHasProjects(Boolean hasProjects) { - this.hasProjects = hasProjects; - } - - public Boolean getHasDownloads() { - return hasDownloads; - } - - public void setHasDownloads(Boolean hasDownloads) { - this.hasDownloads = hasDownloads; - } - - public Boolean getHasWiki() { - return hasWiki; - } - - public void setHasWiki(Boolean hasWiki) { - this.hasWiki = hasWiki; - } - - public Boolean getHasPages() { - return hasPages; - } - - public void setHasPages(Boolean hasPages) { - this.hasPages = hasPages; - } - - public Integer getForksCount() { - return forksCount; - } - - public void setForksCount(Integer forksCount) { - this.forksCount = forksCount; - } - - public Object getMirrorUrl() { - return mirrorUrl; - } - - public void setMirrorUrl(Object mirrorUrl) { - this.mirrorUrl = mirrorUrl; - } - - public Boolean getArchived() { - return archived; - } - - public void setArchived(Boolean archived) { - this.archived = archived; - } - - public Boolean getDisabled() { - return disabled; - } - - public void setDisabled(Boolean disabled) { - this.disabled = disabled; - } - - public Integer getOpenIssuesCount() { - return openIssuesCount; - } - - public void setOpenIssuesCount(Integer openIssuesCount) { - this.openIssuesCount = openIssuesCount; - } - - public Object getLicense() { - return license; - } - - public void setLicense(Object license) { - this.license = license; - } - - public Integer getForks() { - return forks; - } - - public void setForks(Integer forks) { - this.forks = forks; - } - - public Integer getOpenIssues() { - return openIssues; - } - - public void setOpenIssues(Integer openIssues) { - this.openIssues = openIssues; - } - - public Integer getWatchers() { - return watchers; - } - - public void setWatchers(Integer watchers) { - this.watchers = watchers; - } - - public String getDefaultBranch() { - return defaultBranch; - } - - public void setDefaultBranch(String defaultBranch) { - this.defaultBranch = defaultBranch; - } - - public Integer getStargazers() { - return stargazers; - } - - public void setStargazers(Integer stargazers) { - this.stargazers = stargazers; - } - - public String getMasterBranch() { - return masterBranch; - } - - public void setMasterBranch(String masterBranch) { - this.masterBranch = masterBranch; - } - - @NoArgsConstructor - @Data - public static class OwnerDTO { - @JsonProperty("name") - private String name; - @JsonProperty("email") - private String email; - @JsonProperty("login") - private String login; - @JsonProperty("id") - private Integer id; - @JsonProperty("node_id") - private String nodeId; - @JsonProperty("avatar_url") - private String avatarUrl; - @JsonProperty("gravatar_id") - private String gravatarId; - @JsonProperty("url") - private String url; - @JsonProperty("html_url") - private String htmlUrl; - @JsonProperty("followers_url") - private String followersUrl; - @JsonProperty("following_url") - private String followingUrl; - @JsonProperty("gists_url") - private String gistsUrl; - @JsonProperty("starred_url") - private String starredUrl; - @JsonProperty("subscriptions_url") - private String subscriptionsUrl; - @JsonProperty("organizations_url") - private String organizationsUrl; - @JsonProperty("repos_url") - private String reposUrl; - @JsonProperty("events_url") - private String eventsUrl; - @JsonProperty("received_events_url") - private String receivedEventsUrl; - @JsonProperty("type") - private String type; - @JsonProperty("site_admin") - private Boolean siteAdmin; - } - } - - @NoArgsConstructor - public static class CommitsDTO { - @JsonProperty("id") - private String id; - @JsonProperty("tree_id") - private String treeId; - @JsonProperty("distinct") - private Boolean distinct; - @JsonProperty("message") - private String message; - @JsonProperty("timestamp") - private String timestamp; - @JsonProperty("url") - private String url; - @JsonProperty("author") - private AuthorDTO author; - @JsonProperty("committer") - private CommitterDTO committer; - @JsonProperty("added") - private List added; - @JsonProperty("removed") - private List removed; - @JsonProperty("modified") - private List modified; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTreeId() { - return treeId; - } - - public void setTreeId(String treeId) { - this.treeId = treeId; - } - - public Boolean getDistinct() { - return distinct; - } - - public void setDistinct(Boolean distinct) { - this.distinct = distinct; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public String getTimestamp() { - return timestamp; - } - - public void setTimestamp(String timestamp) { - this.timestamp = timestamp; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public AuthorDTO getAuthor() { - return author; - } - - public void setAuthor(AuthorDTO author) { - this.author = author; - } - - public CommitterDTO getCommitter() { - return committer; - } - - public void setCommitter(CommitterDTO committer) { - this.committer = committer; - } - - public List getAdded() { - return added; - } - - public void setAdded(List added) { - this.added = added; - } - - public List getRemoved() { - return removed; - } - - public void setRemoved(List removed) { - this.removed = removed; - } - - public List getModified() { - return modified; - } - - public void setModified(List modified) { - this.modified = modified; - } - - @NoArgsConstructor - @Data - public static class AuthorDTO { - @JsonProperty("name") - private String name; - @JsonProperty("email") - private String email; - } - - public static class CommitterDTO { - @JsonProperty("name") - private String name; - @JsonProperty("email") - private String email; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - } - } -} diff --git a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/WeChatWebhook.java b/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/WeChatWebhook.java deleted file mode 100644 index 71de12af..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/src/main/java/com/springboot101/vo/WeChatWebhook.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.springboot101.vo; - -import java.util.List; - -/** - * @Auther: 程序员小富 - * @Date: 2021/5/19 20:56 - * @Description: - */ -public class WeChatWebhook { - - private String msgtype; - - private TextDTO text; - - public String getMsgtype() { - return msgtype; - } - - public void setMsgtype(String msgtype) { - this.msgtype = msgtype; - } - - public TextDTO getText() { - return text; - } - - public void setText(TextDTO text) { - this.text = text; - } - - public static class TextDTO { - - private String content; - - private List mentionedList; - - private List mentionedMobileList; - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public List getMentionedList() { - return mentionedList; - } - - public void setMentionedList(List mentionedList) { - this.mentionedList = mentionedList; - } - - public List getMentionedMobileList() { - return mentionedMobileList; - } - - public void setMentionedMobileList(List mentionedMobileList) { - this.mentionedMobileList = mentionedMobileList; - } - } -} diff --git a/springboot101/webhook/springboot-webhook-wechat/src/main/resources/application.yml b/springboot101/webhook/springboot-webhook-wechat/src/main/resources/application.yml deleted file mode 100644 index 6e0d8cc2..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/src/main/resources/application.yml +++ /dev/null @@ -1,2 +0,0 @@ -server: - port: 6666 diff --git a/springboot101/webhook/springboot-webhook-wechat/src/main/resources/templates/index.html b/springboot101/webhook/springboot-webhook-wechat/src/main/resources/templates/index.html deleted file mode 100644 index 7339fa74..00000000 --- a/springboot101/webhook/springboot-webhook-wechat/src/main/resources/templates/index.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - 抖音去水印 - - - - - - - - - - - - - - - - - - -
- -
- - -
- -
-
-
-
-
- 支持平台(抖音、火山小视频) -
-
-
-
-
    -
  • - 抖音 -
  • - - - - - - -
  • - 火山小视频 -
  • - - - - - - -
-
-
-
- -
-
-
- - - - 去水印工具 - - - -
-
-
-
-
- - -
- -
-
- - -
- - -
- - -
-
- - -
-
-
-
-
- -
-
-
- 使用说明 -
-
-
- 功能完善中,如遇点击下载按钮无响应,请按下图方式下载视频 -
- -
    -
  • - 火山小视频 -
  • -
-
-
-
- -
-
- 声明 -
-
-
- 本工具不已盈利为目的,只为交流学习,咨询请关注公众号【程序员小富】 - -
-
-
-
-
- -
-   -
-
-   -
-
-
-
- - - - - - - - - - - - - - -
- - - \ No newline at end of file diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/pom.xml" "b/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/pom.xml" deleted file mode 100644 index 6258dee7..00000000 --- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/pom.xml" +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-detect-faces - 0.0.1-SNAPSHOT - springboot-detect-faces - - - 1.8 - UTF-8 - UTF-8 - 2.2.10.RELEASE - 1.4.1.Final - - - - - com.arcsoft.face - arcsoft-sdk-face - 3.0.0.0 - system - ${project.basedir}/lib/arcsoft-sdk-face-3.0.0.0.jar - - - - org.springframework.boot - spring-boot-starter-data-jpa - - - - org.springframework.boot - spring-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 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - UTF-8 - - - - org.springframework.boot - spring-boot-maven-plugin - - - true - true - com.springboot101.DetectFacesApplication - false - - - - repackage - - repackage - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/META-INF/MANIFEST.MF" "b/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/META-INF/MANIFEST.MF" deleted file mode 100644 index cbc5f1b9..00000000 --- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/META-INF/MANIFEST.MF" +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: com.springboot101.DetectFacesApplication - 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/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/DetectFacesApplication.java" deleted file mode 100644 index ab530bee..00000000 --- "a/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/DetectFacesApplication.java" +++ /dev/null @@ -1,13 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class DetectFacesApplication { - - public static void main(String[] args) { - SpringApplication.run(DetectFacesApplication.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/entity/User.java" "b/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/entity/User.java" deleted file mode 100644 index 4e3296e3..00000000 --- "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" +++ /dev/null @@ -1,84 +0,0 @@ -package com.springboot101.entity; - -import lombok.Data; -import lombok.NoArgsConstructor; -import org.hibernate.annotations.DynamicUpdate; - -import javax.persistence.Entity; -import javax.persistence.Table; -import java.util.Date; - -/** - * 用户 - * - * @author 公众号:程序员小富 - * @Description: 用户 - * @date 2021/09/15 - */ -@Data -@Entity -@DynamicUpdate -@NoArgsConstructor -@Table(name = "fire_user") -public class User extends BaseEntity { - - /** - * 账号 - */ - private String accountId; - - /** - * 用户名 - */ - private String userName; - - /** - * 密码 - */ - private String password; - - /** - * 电子邮件 - */ - private String email; - - /** - * 头像 - */ - private String avatarPath; - - /** - * 是否为管理员 - */ - private boolean isAdmin; - - /** - * 启用状态 - */ - private boolean enabled; - - /** - * 密码重置时间 - */ - private Date pwdResetRime; - - /** - * 个人简介 - */ - private String personalDesc; - - /** - * 人脸识别信息 - */ - private byte[] detectFaces; - - /** - * 未知性别=-1 、男性=0 、女性=1 - */ - private Integer gender = -1; - - /** - * 是否为第一次登录的新用户 - */ - private boolean firstLogin; -} 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/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/repository/UserDao.java" deleted file mode 100644 index 6c2eb536..00000000 --- "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" +++ /dev/null @@ -1,15 +0,0 @@ -package com.springboot101.repository; - -import com.springboot101.entity.User; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -/** - * @author 公众号:程序员小富 - * @Description: - * @date 2021/10/29 - */ -@Repository -public interface UserDao extends JpaRepository { - -} 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/springboot101/\344\272\272\350\204\270\350\257\206\345\210\253/springboot-detect-faces/src/main/java/com/springboot101/service/FaceEngineService.java" deleted file mode 100644 index f9a4a037..00000000 --- "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" +++ /dev/null @@ -1,9 +0,0 @@ -package com.springboot101.service; - - -import com.springboot101.entity.User; - -public interface FaceEngineService { - - User detectFaces(String file); -} diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/README.md" "b/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/README.md" deleted file mode 100644 index 04ffed78..00000000 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/README.md" +++ /dev/null @@ -1 +0,0 @@ -erupt 低代码平台,简单的 diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/pom.xml" "b/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/pom.xml" deleted file mode 100644 index 03389722..00000000 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/pom.xml" +++ /dev/null @@ -1,108 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - - springboot-erupt - springboot-erupt - 0.0.1-SNAPSHOT - Demo project for Spring Boot - - - 1.8 - 1.6.7 - - - - - org.springframework.boot - spring-boot-starter - - - - - org.projectlombok - lombok - 1.16.18 - provided - - - - - xyz.erupt - erupt-upms - ${erupt.version} - - - - xyz.erupt - erupt-security - ${erupt.version} - - - - xyz.erupt - erupt-web - ${erupt.version} - - - - xyz.erupt - erupt-job - ${erupt.version} - - - - xyz.erupt - erupt-tpl - ${erupt.version} - - - - xyz.erupt - erupt-generator - ${erupt.version} - - - - xyz.erupt - erupt-monitor - ${erupt.version} - - - - org.springframework.boot - spring-boot-starter-tomcat - compile - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - - nexus-aliyun - nexus-aliyun - http://maven.aliyun.com/nexus/content/repositories/central - - true - - - false - - - - - diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/SpringBootEruptApplication.java" "b/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/SpringBootEruptApplication.java" deleted file mode 100644 index 85092ee0..00000000 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/SpringBootEruptApplication.java" +++ /dev/null @@ -1,22 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.context.annotation.ComponentScan; -import xyz.erupt.core.annotation.EruptScan; - -import java.io.IOException; -import java.net.URISyntaxException; - -@SpringBootApplication -@ComponentScan({"xyz.erupt", "com.springboot101.erupt.model"}) // ↓ xyz.erupt必须有 -@EntityScan({"xyz.erupt", "com.springboot101.erupt.model"}) // ↓ 如果包名com.example.demo有变化 -@EruptScan({"xyz.erupt", "com.springboot101.erupt.model"}) // → 要修改为变化后的包名 -public class SpringBootEruptApplication { - - public static void main(String[] args) throws URISyntaxException, IOException { - SpringApplication.run(SpringBootEruptApplication.class, args); - System.setProperty("java.awt.headless", "false"); - } -} diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/model/Student.java" "b/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/model/Student.java" deleted file mode 100644 index 6c55bca1..00000000 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/java/com/springboot101/model/Student.java" +++ /dev/null @@ -1,96 +0,0 @@ -package com.springboot101.model; - -import com.springboot101.proxy.StudentDataProxy; -import xyz.erupt.annotation.Erupt; -import xyz.erupt.annotation.EruptField; -import xyz.erupt.annotation.sub_erupt.Power; -import xyz.erupt.annotation.sub_field.Edit; -import xyz.erupt.annotation.sub_field.View; -import xyz.erupt.annotation.sub_field.sub_edit.BoolType; -import xyz.erupt.annotation.sub_field.sub_edit.Search; -import xyz.erupt.jpa.model.BaseModel; - -import javax.persistence.*; - -/* - * @Erupt注解修饰在类上,@EruptField注解修饰在字段上 - * 其他注解均为Jpa注解 - */ -@Erupt(name = "学生表",dataProxy = {StudentDataProxy.class}, - power = @Power(importable = true, export = true) -) -@Entity -//@Table(name = "t_student") -public class Student extends BaseModel { - - @EruptField( - views = @View(title = "学生姓名"), - edit = @Edit(title = "学生姓名", notNull = true, search = @Search(vague = true)) - ) - private String studentName; - - @EruptField( - views = @View(title = "所属班级"), - edit = @Edit(title = "所属班级", notNull = true) - ) - private String studentClass; - - @EruptField( - views = @View(title = "学生年龄"), - edit = @Edit(title = "学生年龄", notNull = true) - ) - private String studentAge; - - @Lob - @EruptField( - views = @View(title = "学生性别"), - edit = @Edit(title = "学生性别", notNull = true) - ) - private String studentSex; - - @EruptField( - views = @View(title = "考核状态"), - edit = @Edit(title = "考核状态", notNull = true, boolType = @BoolType(trueText = "通过", falseText = "挂科"), search = @Search) - ) - private Boolean status; - - public String getStudentName() { - return studentName; - } - - public void setStudentName(String studentName) { - this.studentName = studentName; - } - - public String getStudentClass() { - return studentClass; - } - - public void setStudentClass(String studentClass) { - this.studentClass = studentClass; - } - - public String getStudentAge() { - return studentAge; - } - - public void setStudentAge(String studentAge) { - this.studentAge = studentAge; - } - - public String getStudentSex() { - return studentSex; - } - - public void setStudentSex(String studentSex) { - this.studentSex = studentSex; - } - - public Boolean getStatus() { - return status; - } - - public void setStatus(Boolean status) { - this.status = status; - } -} \ No newline at end of file diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/application.yml" "b/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/application.yml" deleted file mode 100644 index 566b95cf..00000000 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-erupt/src/main/resources/application.yml" +++ /dev/null @@ -1,22 +0,0 @@ -spring: - datasource: - url: jdbc:mysql://127.0.0.1:3306/erupt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai - username: root - password: 123456 - jpa: - show-sql: true - generate-ddl: true - database-platform: org.hibernate.dialect.MySQL5InnoDBDialect - database: mysql - profiles: - active: dev - mail: - username: xxxx@qq.com - password: xxxxxxx - host: smtp.qq.com - properties: - mail.smtp.ssl.auth: true - mail.smtp.ssl.enable: true - mail.smtp.ssl.required: true -server: - port: 8888 \ No newline at end of file diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/pom.xml" "b/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/pom.xml" deleted file mode 100644 index 77e9270d..00000000 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/pom.xml" +++ /dev/null @@ -1,34 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-magic-api - 0.0.1-SNAPSHOT - - - 8 - 8 - - - - - - - org.ssssssss - magic-api-spring-boot-starter - 0.7.1 - - - - com.dtflys.forest - spring-boot-starter-forest - 1.5.0-RC3 - - - - - \ No newline at end of file diff --git "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/main/resources/application.yml" "b/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/main/resources/application.yml" deleted file mode 100644 index ed0f99e6..00000000 --- "a/springboot101/\344\275\216\344\273\243\347\240\201/springboot-magic-api/src/main/resources/application.yml" +++ /dev/null @@ -1,54 +0,0 @@ -magic-api: - web: /magic/web # UI请求的界面以及UI服务地址 - resource: #配置存储方式 - type: database # 配置存储在数据库中 - tableName: magic_api_file # 数据库中的表名 - datasource: jdbc:mysql://47.93.6.5:3306/magic-api?useUnicode=true&characterEncoding=UTF-8&useSSL=false - #指定数据源(单数据源时无需配置,多数据源时默认使用主数据源,如果存在其他数据源中需要指定。) - prefix: /magic-api # key前缀 - readonly: false # 是否是只读模式 -# prefix: / # 接口前缀,可以不配置 -# auto-import-module: db # 自动导入的模块 -# auto-import-package: java.lang.*,java.util.* #自动导包 -# refresh-interval: 0 #不启用刷新 -# allow-override: false #禁止覆盖应用接口 -# sql-column-case: camel #启用驼峰命名转换 -# editor-config: classpath:./magic-editor-config.js #编辑器配置 -# support-cross-domain: true # 跨域支持,默认开启 -# response: |- #配置JSON格式,格式为magic-script中的表达式 -# { -# code: code, -# message: message, -# data, -# timestamp, -# requestTime, -# executeTime, -# } -# banner: true # 打印banner -# thread-pool-executor-size: 8 # async语句的线程池大小 -# throw-exception: false #执行出错时是否抛出异常 -# page-config: -# size: size # 页大小的参数名称 -# page: page # 页码的参数名称 -# default-page: 1 # 未传页码时的默认首页 -# default-size: 10 # 未传页大小时的默认页大小 -# security-config: # 安全配置 -# username: admin # 登录用的用户名 -# password: 123456 # 登录用的密码 -# swagger-config: -# version: 1.0 -# description: MagicAPI 接口信息 -# title: MagicAPI Swagger Docs -# name: MagicAPI 接口 -# location: /v2/api-docs/magic-api/swagger2.json -# debug-config: -# timeout: 60 # 断点超时时间,默认60s - -server: - port: 9999 -spring: - datasource: - driver-class-name: com.mysql.jdbc.Driver - password: 123456 - url: jdbc:mysql://47.93.6.5:3306/magic-api?useUnicode=true&characterEncoding=UTF-8&useSSL=false - username: root diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/.gitignore" "b/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/.gitignore" deleted file mode 100644 index 50ba3ac5..00000000 --- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/.gitignore" +++ /dev/null @@ -1,38 +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/ -!/mvnw -!/mvnw.cmd -!/mvnw - -!/mvnw.cmd diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/README.md" "b/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/README.md" deleted file mode 100644 index dbe6cb8e..00000000 --- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/README.md" +++ /dev/null @@ -1 +0,0 @@ -抖音去水印工具 \ No newline at end of file diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/pom.xml" "b/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/pom.xml" deleted file mode 100644 index e723a885..00000000 --- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/pom.xml" +++ /dev/null @@ -1,14 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-douyin-watermark - 0.0.1-SNAPSHOT - springboot-douyin-watermark - - diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/application.properties" "b/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/application.properties" deleted file mode 100644 index 2c5fdc35..00000000 --- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/application.properties" +++ /dev/null @@ -1 +0,0 @@ -server.port=9999 diff --git "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/templates/index.html" "b/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/templates/index.html" deleted file mode 100644 index 7339fa74..00000000 --- "a/springboot101/\345\216\273\346\260\264\345\215\260/springboot-douyin-watermark/src/main/resources/templates/index.html" +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - 抖音去水印 - - - - - - - - - - - - - - - - - - -
- -
- - -
- -
-
-
-
-
- 支持平台(抖音、火山小视频) -
-
-
-
-
    -
  • - 抖音 -
  • - - - - - - -
  • - 火山小视频 -
  • - - - - - - -
-
-
-
- -
-
-
- - - - 去水印工具 - - - -
-
-
-
-
- - -
- -
-
- - -
- - -
- - -
-
- - -
-
-
-
-
- -
-
-
- 使用说明 -
-
-
- 功能完善中,如遇点击下载按钮无响应,请按下图方式下载视频 -
- -
    -
  • - 火山小视频 -
  • -
-
-
-
- -
-
- 声明 -
-
-
- 本工具不已盈利为目的,只为交流学习,咨询请关注公众号【程序员小富】 - -
-
-
-
-
- -
-   -
-
-   -
-
-
-
- - - - - - - - - - - - - - -
- - - \ No newline at end of file diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/README.md" "b/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/README.md" deleted file mode 100644 index 22cc5ac0..00000000 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/README.md" +++ /dev/null @@ -1,3 +0,0 @@ -### 本案例对应的文章教程 - -[我有 7种 实现web实时消息推送的方案,7种!](http://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247500543&idx=1&sn=2a75dbd8846b1c0ea6ce6c59dfb98cef&chksm=9b865202acf1db14009f2d5bedc463396ed0ac213de1dcc2eaf3daf378996c6f4a0353306f4b&token=755618913&lang=zh_CN#rd) diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/pom.xml" "b/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/pom.xml" deleted file mode 100644 index b6e40a27..00000000 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/pom.xml" +++ /dev/null @@ -1,50 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-realtime-data - 0.0.1-SNAPSHOT - springboot-realtime-data - - - - - org.springframework.boot - spring-boot-starter-websocket - - - com.google.guava - guava - 22.0 - - - - org.springframework.integration - spring-integration-mqtt - - - org.eclipse.paho - org.eclipse.paho.client.mqttv3 - [1.2.1,) - - - cn.hutool - hutool-all - 5.5.8 - compile - - - com.squareup.okhttp3 - okhttp - 4.9.0 - compile - - - - - diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/IotMqttProducerConfig.java" "b/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/IotMqttProducerConfig.java" deleted file mode 100644 index 61f056a0..00000000 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/IotMqttProducerConfig.java" +++ /dev/null @@ -1,49 +0,0 @@ -package com.springboot101.config; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.integration.annotation.ServiceActivator; -import org.springframework.integration.channel.DirectChannel; -import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory; -import org.springframework.integration.mqtt.core.MqttPahoClientFactory; -import org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler; -import org.springframework.messaging.MessageChannel; -import org.springframework.messaging.MessageHandler; - -/** - * @Author: 程序员小富 - * @Description: - */ -@Configuration -public class IotMqttProducerConfig { - - @Autowired - private MqttConfig mqttConfig; - - @Bean - public MqttPahoClientFactory mqttClientFactory() { - DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory(); - // 如果需要使用此案例打开服务地址注入 -// factory.setServerURIs(mqttConfig.getServers()); -// MqttConnectOptions mqttConnectOptions = new MqttConnectOptions(); -// mqttConnectOptions.setServerURIs(new String[Integer.parseInt(mqttConfig.getServers())]); -// factory.setConnectionOptions(mqttConnectOptions); - return factory; - } - - @Bean - public MessageChannel iotMqttInputChannel() { - return new DirectChannel(); - } - - @Bean - @ServiceActivator(inputChannel = "iotMqttInputChannel") - public MessageHandler mqttOutbound() { - MqttPahoMessageHandler messageHandler = new MqttPahoMessageHandler(mqttConfig.getServerClientId(), mqttClientFactory()); - messageHandler.setAsync(false); - messageHandler.setDefaultQos(2); - messageHandler.setDefaultTopic(mqttConfig.getDefaultTopic()); - return messageHandler; - } -} diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/IotMqttSubscriberConfig.java" "b/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/IotMqttSubscriberConfig.java" deleted file mode 100644 index eec12a8f..00000000 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/IotMqttSubscriberConfig.java" +++ /dev/null @@ -1,71 +0,0 @@ -//package com.mqtt.config; -// -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.integration.annotation.ServiceActivator; -//import org.springframework.integration.channel.DirectChannel; -//import org.springframework.integration.core.MessageProducer; -//import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory; -//import org.springframework.integration.mqtt.core.MqttPahoClientFactory; -//import org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter; -//import org.springframework.integration.mqtt.support.DefaultPahoMessageConverter; -//import org.springframework.messaging.MessageChannel; -//import org.springframework.messaging.MessageHandler; -//import org.springframework.messaging.MessagingException; -// -///** -// * @Author: 公众号:程序员小富 -// * @Description: 消息订阅配置 -// * @date 2020/6/8 18:24 -// */ -//@Configuration -//public class IotMqttSubscriberConfig { -// -// @Autowired -// private MqttConfig mqttConfig; -// -// @Bean -// public MqttPahoClientFactory mqttClientFactory() { -// DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory(); -// factory.setServerURIs(mqttConfig.getServers()); -// return factory; -// } -// -// @Bean -// public MessageChannel iotMqttInputChannel() { -// return new DirectChannel(); -// } -// -// @Bean -// public MessageProducer inbound() { -// MqttPahoMessageDrivenChannelAdapter adapter = new MqttPahoMessageDrivenChannelAdapter(mqttConfig.getClientId(), mqttClientFactory(), mqttConfig.getDefaultTopic()); -// adapter.setCompletionTimeout(5000); -// adapter.setConverter(new DefaultPahoMessageConverter()); -// adapter.setQos(2); -// adapter.setOutputChannel(iotMqttInputChannel()); -// return adapter; -// } -// -// /** -// * @author 公众号:程序员小富 -// * @description 消息订阅 -// * @date 2020/6/8 18:20 -// */ -// @Bean -// @ServiceActivator(inputChannel = "iotMqttInputChannel") -// public MessageHandler handlerTest() { -// -// return message -> { -// try { -// String string = message.getPayload().toString(); -// System.out.println("接收到消息:" + string); -// } catch (MessagingException ex) { -// //logger.info(ex.getMessage()); -// } -// }; -// -// } -//} -// -// diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/MqttConfig.java" "b/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/MqttConfig.java" deleted file mode 100644 index 128f8eb4..00000000 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/config/MqttConfig.java" +++ /dev/null @@ -1,40 +0,0 @@ -package com.springboot101.config; - -import lombok.Getter; -import lombok.Setter; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.integration.annotation.IntegrationComponentScan; -import org.springframework.stereotype.Component; - -/** - * @Author: 程序员小富 - * @Description: 基础配置类 - * @date 2020/6/8 18:25 - */ -@Getter -@Setter -@Component -@IntegrationComponentScan -@ConfigurationProperties(prefix = "iot.mqtt") -public class MqttConfig { - - /** - * 服务地址 - */ - private String servers; - - /** - * 客户端id - */ - private String clientId; - - /** - * 服务端id - */ - private String serverClientId; - - /** - * 默认主题 - */ - private String defaultTopic; -} diff --git "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/producer/IotMqttGateway.java" "b/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/producer/IotMqttGateway.java" deleted file mode 100644 index cb44e828..00000000 --- "a/springboot101/\345\256\236\346\227\266\346\216\250\351\200\201/springboot-realtime-data/src/main/java/com/springboot101/producer/IotMqttGateway.java" +++ /dev/null @@ -1,23 +0,0 @@ -package com.springboot101.producer; - -import org.springframework.integration.annotation.MessagingGateway; -import org.springframework.integration.mqtt.support.MqttHeaders; -import org.springframework.messaging.handler.annotation.Header; - -/** - * @author 公众号:程序员小富 - * @description rabbitmq mqtt协议网关接口 - * @date 2020/6/8 18:26 - */ -@MessagingGateway(defaultRequestChannel = "iotMqttInputChannel") -public interface IotMqttGateway { - - void sendMessage2Mqtt(String data); - - void sendMessage2Mqtt(String data, @Header(MqttHeaders.TOPIC) String topic); - - void sendMessage2Mqtt(@Header(MqttHeaders.TOPIC) String topic, @Header(MqttHeaders.QOS) int qos, String payload); -} - - - diff --git "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/pom.xml" "b/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/pom.xml" deleted file mode 100644 index 2d18f5fd..00000000 --- "a/springboot101/\345\267\245\344\275\234\346\265\201/springboot-work-flowable/pom.xml" +++ /dev/null @@ -1,43 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-work-flowable - 0.0.1-SNAPSHOT - springboot-work-flowable - - - - - org.flowable - flowable-spring-boot-starter - 6.3.0 - - - - org.springframework.boot - spring-boot-starter-jdbc - - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.3.2 - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/README.md" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/README.md" deleted file mode 100644 index 9e2c409f..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/README.md" +++ /dev/null @@ -1,2 +0,0 @@ - -[knife4j详解文章地址](https://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247504501&idx=1&sn=edf8fd2f154f9c9241eabdd839271320&chksm=9b864288acf1cb9ea9f5981b8f99a97517c90e99e5cc26155e751d5f0b7c6d132f61be615d95&token=1250755825&lang=zh_CN#rd) \ No newline at end of file diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/pom.xml" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/pom.xml" deleted file mode 100644 index 60436592..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/pom.xml" +++ /dev/null @@ -1,21 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-knife4j - 0.0.1-SNAPSHOT - springboot-knife4j - - - - com.github.xiaoymin - knife4j-openapi2-spring-boot-starter - 4.3.0 - - - diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/Knife4jApplication.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/Knife4jApplication.java" deleted file mode 100644 index be88487f..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/Knife4jApplication.java" +++ /dev/null @@ -1,14 +0,0 @@ -package com.springboot101; - -import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@EnableKnife4j -@SpringBootApplication -public class Knife4jApplication { - - public static void main(String[] args) { - SpringApplication.run(Knife4jApplication.class, args); - } -} diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/controller/buy/BuyController.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/controller/buy/BuyController.java" deleted file mode 100644 index de6c382a..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/controller/buy/BuyController.java" +++ /dev/null @@ -1,30 +0,0 @@ -package com.springboot101.controller.buy; - - -import com.springboot101.po.User; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -@RequestMapping("/buy") -@Api(tags = "商家管理") -@RestController -public class BuyController { - - @ApiOperation("创建商家") - @PostMapping("/createBuy") - public ResponseEntity createUser(@RequestBody User user) { - return ResponseEntity.ok(user); - } - - @ApiOperation("更新商家") - @PostMapping("/updateBuy/{id}") - public ResponseEntity updateUser(@ApiParam(value = "商家主键ID", required = true) @PathVariable("id") String id, - @RequestHeader("token") String token, - @RequestParam("name") String name, - @RequestBody User user) { - return ResponseEntity.ok(user); - } -} diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/controller/user/UserController.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/controller/user/UserController.java" deleted file mode 100644 index 4b08d016..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/controller/user/UserController.java" +++ /dev/null @@ -1,30 +0,0 @@ -package com.springboot101.controller.user; - - -import com.springboot101.po.User; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -@RequestMapping("/user") -@Api(tags = "用户管理") -@RestController -public class UserController { - - @ApiOperation("创建用户") - @PostMapping("/createUser") - public ResponseEntity createUser(@RequestBody User user) { - return ResponseEntity.ok(user); - } - - @ApiOperation("更新用户") - @PostMapping("/updateUser/{id}") - public ResponseEntity updateUser(@ApiParam(value = "用户主键ID", required = true) @PathVariable("id") String id, - @RequestHeader("token") String token, - @RequestParam("name") String name, - @RequestBody User user) { - return ResponseEntity.ok(user); - } -} diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/dto/UserDto.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/dto/UserDto.java" deleted file mode 100644 index 529dde45..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/dto/UserDto.java" +++ /dev/null @@ -1,20 +0,0 @@ -package com.springboot101.dto; - -import lombok.Data; - -import java.util.Date; - -@Data -public class UserDto { - - private String name; - - private Integer age; - - private String email; - - private Date createTime; - - private Date updateTime; -} - diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/po/User.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/po/User.java" deleted file mode 100644 index 4b2ef825..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-knife4j/src/main/java/com/springboot101/po/User.java" +++ /dev/null @@ -1,20 +0,0 @@ -package com.springboot101.po; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -@ApiModel(value ="用户的PO实体") -@Data -public class User { - - @ApiModelProperty(value="用户名") - private String name; - - @ApiModelProperty(value="年龄") - private Integer age; - - @ApiModelProperty(value="邮箱") - private String email; -} - diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/.gitignore" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/.gitignore" deleted file mode 100644 index 724f6033..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/.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/ -!/.idea/ -!/.idea/ diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/README.md" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/README.md" deleted file mode 100644 index 388ca51a..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/README.md" +++ /dev/null @@ -1,4 +0,0 @@ -### 本案例对应的文章教程 - -[谁家面试往死里问 Swagger 啊?](http://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247504501&idx=1&sn=edf8fd2f154f9c9241eabdd839271320&chksm=9b864288acf1cb9ea9f5981b8f99a97517c90e99e5cc26155e751d5f0b7c6d132f61be615d95&token=755618913&lang=zh_CN#rd) - diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/pom.xml" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/pom.xml" deleted file mode 100644 index 45af466b..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/pom.xml" +++ /dev/null @@ -1,26 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-swagger - 0.0.1-SNAPSHOT - springboot-swagger - - - - io.springfox - springfox-boot-starter - 3.0.0 - - - - org.springframework.boot - spring-boot-starter-security - - - diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/SwaggerApplication.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/SwaggerApplication.java" deleted file mode 100644 index d9740e42..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/SwaggerApplication.java" +++ /dev/null @@ -1,12 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SwaggerApplication { - - public static void main(String[] args) { - SpringApplication.run(SwaggerApplication.class, args); - } -} diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/config/SecurityConfig.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/config/SecurityConfig.java" deleted file mode 100644 index bf77a84a..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/config/SecurityConfig.java" +++ /dev/null @@ -1,23 +0,0 @@ -//package com.springboot101.config; -// -//import org.springframework.context.annotation.Configuration; -//import org.springframework.security.config.annotation.web.builders.HttpSecurity; -//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -// -//@Configuration -//@EnableWebSecurity -//public class SecurityConfig extends WebSecurityConfigurerAdapter { -// -// @Override -// protected void configure(HttpSecurity http) throws Exception { -// http.csrf().disable() -// .authorizeRequests() -// .antMatchers("/swagger-ui/**", "/v3/api-docs/**").permitAll() -// .anyRequest().authenticated() -// .and() -// .formLogin() -// .loginPage("/login") -// .permitAll(); -// } -//} \ No newline at end of file diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/config/SwaggerConfig.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/config/SwaggerConfig.java" deleted file mode 100644 index 0dcacbcd..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/config/SwaggerConfig.java" +++ /dev/null @@ -1,129 +0,0 @@ -package com.springboot101.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; -import org.springframework.core.env.Profiles; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.*; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spi.service.contexts.SecurityContext; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -import java.util.Arrays; -import java.util.Collections; - -@EnableWebMvc -@Configuration -@EnableSwagger2 -public class SwaggerConfig { - - /** - * 配置docket 具体参数 - */ - @Bean - public Docket docket(Environment environment) { - - // 设置要显示swagger的环境 - Profiles of = Profiles.of("dev", "test", "pre"); - boolean enable = environment.acceptsProfiles(of); - - return new Docket(DocumentationType.SWAGGER_2) - .host("http://test.com") // 请求地址 - .groupName("用户分组") - .select() - .apis(RequestHandlerSelectors.basePackage("com.springboot101.controller")) -// .paths(PathSelectors.ant("/test/**")) - .build() - .enable(true) -// .tags(new Tag("tag测试-1", "tag测试-1描述")) - .apiInfo(apiInfo()) // 文档基础配置 - .securitySchemes( - Arrays.asList( - new ApiKey("Bearer", "Bearer", "header"), - new ApiKey("Authorization", "Authorization", "header"), - new ApiKey("Basic", "Basic", "header") - ) - ) - .securityContexts(Collections.singletonList(securityContext())); - } - - private SecurityContext securityContext() { - return SecurityContext.builder() - .securityReferences( - Arrays.asList( - new SecurityReference("Authorization", new AuthorizationScope[0]), - new SecurityReference("Bearer", new AuthorizationScope[0]), - new SecurityReference("Basic", new AuthorizationScope[0]))) - .build(); - } - - @Bean - public Docket docket1(Environment environment) { - return new Docket(DocumentationType.SWAGGER_2) - .groupName("商家分组") - .tags(new Tag("tag测试-2", "tag测试-2描述")) - .select() - .apis(RequestHandlerSelectors.basePackage("com.springboot101.controller")) - .paths(PathSelectors.ant("/test1/**")) - .build(); - } - - /** - * 文档基础信息 - */ - private ApiInfo apiInfo() { - Contact contact = new Contact("小富", "http://fire100.top/contact", "email@example.com"); - return new ApiInfoBuilder() - .title("Swagger学习") - .description("程序员小富-带你一起学习 Swagger") - .version("v1.0.1") - .termsOfServiceUrl("http://fire100.top") - .contact(contact) - .license("许可证") - .licenseUrl("许可链接") - .extensions(Arrays.asList( - new StringVendorExtension("我是", "小富"), - new StringVendorExtension("你是", "谁") - )) - .build(); - } - - -// @Bean -// public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() { -// return new BeanPostProcessor() { -// -// @Override -// public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { -// if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) { -// customizeSpringfoxHandlerMappings(getHandlerMappings(bean)); -// } -// return bean; -// } -// -// private void customizeSpringfoxHandlerMappings(List mappings) { -// List copy = mappings.stream() -// .filter(mapping -> mapping.getPatternParser() == null) -// .collect(Collectors.toList()); -// mappings.clear(); -// mappings.addAll(copy); -// } -// -// @SuppressWarnings("unchecked") -// private List getHandlerMappings(Object bean) { -// try { -// Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings"); -// field.setAccessible(true); -// return (List) field.get(bean); -// } catch (IllegalArgumentException | IllegalAccessException e) { -// throw new IllegalStateException(e); -// } -// } -// }; -// } -} \ No newline at end of file diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/controller/UserController.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/controller/UserController.java" deleted file mode 100644 index 1848a94f..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/controller/UserController.java" +++ /dev/null @@ -1,72 +0,0 @@ -package com.springboot101.controller; - - -import com.springboot101.dto.UserDto; -import com.springboot101.po.User; -import io.swagger.annotations.*; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; - -@Api(value = "用户管理接口描述", - description = "用户管理接口描述", - hidden = false, - produces = "application/json", - consumes = "application/json", - protocols = "https", - tags = {"用户管理"}, - authorizations = { - @Authorization(value = "apiKey", scopes = { - @AuthorizationScope(scope = "read:user", description = "读权限"), - @AuthorizationScope(scope = "write:user", description = "写权限") - }), - @Authorization(value = "basicAuth") - }) -@RestController -public class UserController { - - @ApiResponses(value = { - @ApiResponse(code = 200, message = "@ApiResponse注解测试通过", response = String.class), - @ApiResponse(code = 401, message = "可能参数填的有问题", response = String.class), - @ApiResponse(code = 404, message = "可能请求路径写的有问题", response = String.class) - }) - @GetMapping("/user4") - public String user4(@ApiParam(name = "主键ID", value = "@ApiParam注解测试", required = true) String id) { - return id; - } - - @ApiImplicitParams({ - @ApiImplicitParam(name = "用户名", value = "用户名称信息", required = true, dataType = "String", paramType = "query") - }) - @GetMapping("/user") - public String user(String name) { - return name; - } - - @ApiOperation( - value = "获取用户信息", - notes = "通过用户ID获取用户的详细信息", - hidden = false, - response = UserDto.class, - tags = {"用户管理"}, - produces = "application/json", - consumes = "application/json", - protocols = "https", - authorizations = { - @Authorization(value = "apiKey", scopes = {@AuthorizationScope(scope = "read:user", description = "Read user information")}), - @Authorization(value = "Basic") - }, - responseHeaders = {@ResponseHeader(name = "X-Custom-Header", description = "Custom header", response = String.class)}, - code = 200 - ) - @GetMapping("/user1") - public UserDto user1(@RequestBody User user) { - return new UserDto(); - } - - @ApiIgnore - @GetMapping("/user2/{id}") - public User test2(@PathVariable Integer id, @RequestBody User user) { - return user; - } -} diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/dto/UserDto.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/dto/UserDto.java" deleted file mode 100644 index 529dde45..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/dto/UserDto.java" +++ /dev/null @@ -1,20 +0,0 @@ -package com.springboot101.dto; - -import lombok.Data; - -import java.util.Date; - -@Data -public class UserDto { - - private String name; - - private Integer age; - - private String email; - - private Date createTime; - - private Date updateTime; -} - diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/po/User.java" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/po/User.java" deleted file mode 100644 index bbb89015..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/java/com/springboot101/po/User.java" +++ /dev/null @@ -1,20 +0,0 @@ -package com.springboot101.po; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -@ApiModel(value = "用户实体类", description = "用于存放用户登录信息") -@Data -public class User { - - @ApiModelProperty(value = "用户名字段", required = true, example = "#公众号:程序员小富", name = "1111") - private String name; - - @ApiModelProperty(value = "年龄", required = true, example = "19") - private Integer age; - - @ApiModelProperty(value = "邮箱", required = true, example = "#公众号:程序员小富") - private String email; -} - diff --git "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/resources/application.yml" "b/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/resources/application.yml" deleted file mode 100644 index a651eecf..00000000 --- "a/springboot101/\346\216\245\345\217\243\346\226\207\346\241\243/springboot-swagger/src/main/resources/application.yml" +++ /dev/null @@ -1,9 +0,0 @@ -server: - port: 9002 - -# 登录账号密码 -spring: - security: - user: - name: admin - password: 123456 \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/README.md" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/README.md" deleted file mode 100644 index cb80a2fb..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/README.md" +++ /dev/null @@ -1 +0,0 @@ -springboot注解实现动态数据源切换 \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/pom.xml" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/pom.xml" deleted file mode 100644 index 17af33ed..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/pom.xml" +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.7.6 - - com.dynamic - springboot-dynamic-datasource - 0.0.1-SNAPSHOT - - 8 - 8 - 3.5.3.1 - 8.0.32 - 1.2.6 - - - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-web - - - - com.mysql - mysql-connector-j - ${mysql.connector.version} - - - - org.projectlombok - lombok - true - - - - com.baomidou - mybatis-plus-boot-starter - ${mybatis.plus.version} - - - - com.alibaba - druid-spring-boot-starter - ${druid.version} - - - org.apache.commons - commons-lang3 - 3.7 - - - org.aspectj - aspectjweaver - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/sql/test.sql" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/sql/test.sql" deleted file mode 100644 index 78cfd049..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/sql/test.sql" +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE `t_dynamic_datasource_data` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `source_name` varchar(25) DEFAULT NULL, - PRIMARY KEY (`id`) -) ; - -insert into t_dynamic_datasource_data (source_name) value ('dynamic_datasource_master'); - -insert into t_dynamic_datasource_data (source_name) value ('dynamic_datasource_slave'); diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/DynamicDatasourceApplication.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/DynamicDatasourceApplication.java" deleted file mode 100644 index 75592071..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/DynamicDatasourceApplication.java" +++ /dev/null @@ -1,13 +0,0 @@ -package com.dynamic; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; - -@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) -public class DynamicDatasourceApplication { - - public static void main(String[] args) { - SpringApplication.run(DynamicDatasourceApplication.class, args); - } -} diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/aspect/DS.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/aspect/DS.java" deleted file mode 100644 index 9e1367e7..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/aspect/DS.java" +++ /dev/null @@ -1,18 +0,0 @@ -package com.dynamic.aspect; - -import java.lang.annotation.*; - -/** - * 定于数据源切换注解 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -@Target({ElementType.METHOD, ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -@Inherited -public @interface DS { - // 默认数据源master - String value() default "master"; -} \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/aspect/DSAspect.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/aspect/DSAspect.java" deleted file mode 100644 index abbb28eb..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/aspect/DSAspect.java" +++ /dev/null @@ -1,44 +0,0 @@ -package com.dynamic.aspect; - -import com.dynamic.config.DataSourceContextHolder; -import lombok.extern.slf4j.Slf4j; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Pointcut; -import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.stereotype.Component; - -import java.lang.reflect.Method; -import java.util.Objects; - -/** - * 实现@DS注解的AOP切面 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -@Aspect -@Component -@Slf4j -public class DSAspect { - - @Pointcut("@annotation(com.dynamic.aspect.DS)") - public void dynamicDataSource() { - } - - @Around("dynamicDataSource()") - public Object datasourceAround(ProceedingJoinPoint point) throws Throwable { - MethodSignature signature = (MethodSignature) point.getSignature(); - Method method = signature.getMethod(); - DS ds = method.getAnnotation(DS.class); - if (Objects.nonNull(ds)) { - DataSourceContextHolder.setDataSource(ds.value()); - } - try { - return point.proceed(); - } finally { - DataSourceContextHolder.removeDataSource(); - } - } -} diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DataSourceContextHolder.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DataSourceContextHolder.java" deleted file mode 100644 index e00d3981..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DataSourceContextHolder.java" +++ /dev/null @@ -1,37 +0,0 @@ -package com.dynamic.config; - -/** - * ThreadLocal存放数据源变量 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -public class DataSourceContextHolder { - - private static final ThreadLocal DATASOURCE_HOLDER = new ThreadLocal<>(); - - /** - * 获取当前线程的数据源 - * - * @return 数据源名称 - */ - public static String getDataSource() { - return DATASOURCE_HOLDER.get(); - } - - /** - * 设置数据源 - * - * @param dataSourceName 数据源名称 - */ - public static void setDataSource(String dataSourceName) { - DATASOURCE_HOLDER.set(dataSourceName); - } - - /** - * 删除当前数据源 - */ - public static void removeDataSource() { - DATASOURCE_HOLDER.remove(); - } -} \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DateSourceConfig.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DateSourceConfig.java" deleted file mode 100644 index 11c9c1fd..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DateSourceConfig.java" +++ /dev/null @@ -1,44 +0,0 @@ -package com.dynamic.config; - -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; - -import javax.sql.DataSource; -import java.util.HashMap; -import java.util.Map; - -/** - * 注册多个数据源 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -@Configuration -public class DateSourceConfig { - - @Bean - @ConfigurationProperties("spring.datasource.druid.master") - public DataSource dynamicDatasourceMaster() { - return DruidDataSourceBuilder.create().build(); - } - - @Bean - @ConfigurationProperties("spring.datasource.druid.slave") - public DataSource dynamicDatasourceSlave() { - return DruidDataSourceBuilder.create().build(); - } - - @Bean(name = "dynamicDataSource") - @Primary - public DynamicDataSource createDynamicDataSource() { - Map dataSourceMap = new HashMap<>(); - // 设置默认的数据源为Master - DataSource defaultDataSource = dynamicDatasourceMaster(); - dataSourceMap.put("master", defaultDataSource); - dataSourceMap.put("slave", dynamicDatasourceSlave()); - return new DynamicDataSource(defaultDataSource, dataSourceMap); - } -} \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DynamicDataSource.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DynamicDataSource.java" deleted file mode 100644 index 7f22cf36..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/config/DynamicDataSource.java" +++ /dev/null @@ -1,30 +0,0 @@ -package com.dynamic.config; - -import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; - -import javax.sql.DataSource; -import java.util.Map; - -/** - * 继承 AbstractRoutingDataSource - * 重置当前的数据库路由,实现切换成想要执行的目标数据库 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -public class DynamicDataSource extends AbstractRoutingDataSource { - - public DynamicDataSource(DataSource defaultDataSource, Map targetDataSources) { - super.setDefaultTargetDataSource(defaultDataSource); - super.setTargetDataSources(targetDataSources); - } - - /** - * 这一步是关键 - * @return - */ - @Override - protected Object determineCurrentLookupKey() { - return DataSourceContextHolder.getDataSource(); - } -} \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/controller/DynamicSwitchController.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/controller/DynamicSwitchController.java" deleted file mode 100644 index db3c1315..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/controller/DynamicSwitchController.java" +++ /dev/null @@ -1,64 +0,0 @@ -package com.dynamic.controller; - -import com.dynamic.aspect.DS; -import com.dynamic.config.DataSourceContextHolder; -import com.dynamic.dao.DynamicDatasourceDataMapper; -import com.dynamic.entity.DynamicDatasourceData; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; - -/** - * 动态数据源切换 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -@RestController -public class DynamicSwitchController { - - @Resource - private DynamicDatasourceDataMapper dynamicDatasourceDataMapper; - - @GetMapping("/switchDataSource/{datasourceName}") - public String switchDataSource(@PathVariable("datasourceName") String datasourceName) { - DataSourceContextHolder.setDataSource(datasourceName); - DynamicDatasourceData dynamicDatasourceData = dynamicDatasourceDataMapper.selectOne(null); - DataSourceContextHolder.removeDataSource(); - return dynamicDatasourceData.getSourceName(); - } - - @DS(value = "master") - @GetMapping("/dbMaster") - public String dbMaster() { - DynamicDatasourceData dynamicDatasourceData = dynamicDatasourceDataMapper.selectOne(null); - return dynamicDatasourceData.getSourceName(); - } - - @DS(value = "slave") - @GetMapping("/dbSlave") - public String dbSlave() { - DynamicDatasourceData dynamicDatasourceData = dynamicDatasourceDataMapper.selectOne(null); - return dynamicDatasourceData.getSourceName(); - } - - - /** - * 验证一下事物控制 - */ -// @Transactional(rollbackFor = Exception.class) - @DS(value = "slave") - @GetMapping("/dbTestTransactional") - public void dbTestTransactional() { - - DynamicDatasourceData datasourceData = new DynamicDatasourceData(); - datasourceData.setSourceName("test"); - dynamicDatasourceDataMapper.insert(datasourceData); - - DynamicDatasourceData datasourceData1 = new DynamicDatasourceData(); - datasourceData1.setSourceName("testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest"); - dynamicDatasourceDataMapper.insert(datasourceData1); - } -} \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/dao/DynamicDatasourceDataMapper.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/dao/DynamicDatasourceDataMapper.java" deleted file mode 100644 index 80311733..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/dao/DynamicDatasourceDataMapper.java" +++ /dev/null @@ -1,9 +0,0 @@ -package com.dynamic.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.dynamic.entity.DynamicDatasourceData; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface DynamicDatasourceDataMapper extends BaseMapper { -} \ No newline at end of file diff --git "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/entity/DynamicDatasourceData.java" "b/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/entity/DynamicDatasourceData.java" deleted file mode 100644 index 2fa0a61e..00000000 --- "a/springboot101/\346\225\260\346\215\256\345\272\223/springboot-dynamic-datasource/src/main/java/com/dynamic/entity/DynamicDatasourceData.java" +++ /dev/null @@ -1,12 +0,0 @@ -package com.dynamic.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -@TableName("t_dynamic_datasource_data") -@Data -public class DynamicDatasourceData { - - private Long id; - private String sourceName; -} diff --git "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/.gitignore" "b/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/.gitignore" deleted file mode 100644 index 4fd45a21..00000000 --- "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/.gitignore" +++ /dev/null @@ -1,37 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/** -!**/src/test/** - -### 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/ - -### VS Code ### -.vscode/ -!/.mvn/ -!/HELP.md - -!/mvnw - -!/mvnw.cmd diff --git "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/README.md" "b/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/README.md" deleted file mode 100644 index 41be58b4..00000000 --- "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/README.md" +++ /dev/null @@ -1,3 +0,0 @@ -### 本案例对应的文章教程 - -[Springboot 一行代码实现文件上传 20个平台!少写代码到极致](http://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247502313&idx=1&sn=7ce4a41b0ae9533082e54ace1863d8bc&chksm=9b865914acf1d002127726552e86b3a03816fe915ec56abf779f4801b8d0ec07ee3c367a9dfe&token=755618913&lang=zh_CN#rd) \ No newline at end of file diff --git "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/pom.xml" "b/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/pom.xml" deleted file mode 100644 index 5ea219fc..00000000 --- "a/springboot101/\346\226\207\344\273\266\346\223\215\344\275\234/springboot-file-storage/pom.xml" +++ /dev/null @@ -1,31 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-file-storage - 0.0.1-SNAPSHOT - springboot-file-storage - - - - - - cn.xuyanwu - spring-file-storage - 0.5.0 - - - - - com.aliyun.oss - aliyun-sdk-oss - 3.10.2 - - - - diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.gitignore" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.gitignore" deleted file mode 100644 index 724f6033..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.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/ -!/.idea/ -!/.idea/ diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/.gitignore" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/.gitignore" deleted file mode 100644 index 26d33521..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/.gitignore" +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/compiler.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/compiler.xml" deleted file mode 100644 index 2f55cb63..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/compiler.xml" +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/encodings.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/encodings.xml" deleted file mode 100644 index aa00ffab..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/encodings.xml" +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/jarRepositories.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/jarRepositories.xml" deleted file mode 100644 index f0b4cc9c..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/jarRepositories.xml" +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/misc.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/misc.xml" deleted file mode 100644 index d5cd6143..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/misc.xml" +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/uiDesigner.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/uiDesigner.xml" deleted file mode 100644 index 2b63946d..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/.idea/uiDesigner.xml" +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/README.md" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/README.md" deleted file mode 100644 index e7631789..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/README.md" +++ /dev/null @@ -1,5 +0,0 @@ -此项目为 springboot 脚手架 - -已经整合了 jpa 连接mysql,自动根据JAVA实体属性创建对应的表 - -起新项目直接复制它即可 diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/pom.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/pom.xml" deleted file mode 100644 index 11b0cf65..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/pom.xml" +++ /dev/null @@ -1,17 +0,0 @@ - - - 4.0.0 - - com.notebook - Springboot-Notebook - 0.0.1-SNAPSHOT - - springboot-jsp - 0.0.1-SNAPSHOT - springboot-jsp - - - - - diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/BaseApplication.java" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/BaseApplication.java" deleted file mode 100644 index a3fc7929..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/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/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/controller/TestController.java" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/controller/TestController.java" deleted file mode 100644 index 43f9f057..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/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/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/po/User.java" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/po/User.java" deleted file mode 100644 index c7ef1048..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/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/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/repository/UserRepository.java" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/repository/UserRepository.java" deleted file mode 100644 index 00ff5559..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/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/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/service/UserService.java" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/java/com/springboot101/service/UserService.java" deleted file mode 100644 index 2ed82c81..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/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/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/resources/application.yml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/resources/application.yml" deleted file mode 100644 index 6de67352..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/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/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/resources/static/index.html" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/main/resources/static/index.html" deleted file mode 100644 index e2d94a21..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/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/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/test/java/com/springboot101/BaseShare.java" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/src/test/java/com/springboot101/BaseShare.java" deleted file mode 100644 index 78266ff4..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-jsp/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:xinzhifu521"); - user.setCreateTime(new Date()); - user.setUpdateTime(new Date()); - userService.insertUser(user); - } -} diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.gitignore" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.gitignore" deleted file mode 100644 index 724f6033..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.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/ -!/.idea/ -!/.idea/ diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/.gitignore" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/.gitignore" deleted file mode 100644 index 26d33521..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/.gitignore" +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/compiler.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/compiler.xml" deleted file mode 100644 index 2f55cb63..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/compiler.xml" +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/encodings.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/encodings.xml" deleted file mode 100644 index aa00ffab..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/encodings.xml" +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/jarRepositories.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/jarRepositories.xml" deleted file mode 100644 index f0b4cc9c..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/jarRepositories.xml" +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/misc.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/misc.xml" deleted file mode 100644 index d5cd6143..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/misc.xml" +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/uiDesigner.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/uiDesigner.xml" deleted file mode 100644 index 2b63946d..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/.idea/uiDesigner.xml" +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/README.md" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/README.md" deleted file mode 100644 index e7631789..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/README.md" +++ /dev/null @@ -1,5 +0,0 @@ -此项目为 springboot 脚手架 - -已经整合了 jpa 连接mysql,自动根据JAVA实体属性创建对应的表 - -起新项目直接复制它即可 diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/pom.xml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/pom.xml" deleted file mode 100644 index be3f5e51..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/pom.xml" +++ /dev/null @@ -1,24 +0,0 @@ - - - 4.0.0 - - com.notebook - Springboot-Notebook - 0.0.1-SNAPSHOT - - springboot-thymeleaf - 0.0.1-SNAPSHOT - springboot-thymeleaf - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-web - - - diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/java/com/springboot101/ThymeleafApplication.java" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/java/com/springboot101/ThymeleafApplication.java" deleted file mode 100644 index acd714a8..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/java/com/springboot101/ThymeleafApplication.java" +++ /dev/null @@ -1,13 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class ThymeleafApplication { - - public static void main(String[] args) { - SpringApplication.run(ThymeleafApplication.class, args); - } - -} diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/java/com/springboot101/controller/TestController.java" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/java/com/springboot101/controller/TestController.java" deleted file mode 100644 index e44f95e4..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/java/com/springboot101/controller/TestController.java" +++ /dev/null @@ -1,36 +0,0 @@ -package com.springboot101.controller; - - -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.servlet.ModelAndView; - -import java.util.Arrays; -import java.util.List; - -@Controller -public class TestController { - - @GetMapping("/example") - public ModelAndView example(ModelAndView modelAndView) { - List fruits = Arrays.asList("Apple", "Banana", "Orange"); - modelAndView.setViewName("fruits"); - modelAndView.addObject("fruits", fruits); - return modelAndView; - } - - @GetMapping("/example1") - public String example1(Model model) { - List fruits = Arrays.asList("Apple", "Banana", "Orange"); - model.addAttribute("fruits", fruits); - return "fruits.html"; - } - - @GetMapping("/example2") - public String example2(Model model) { - List fruits = Arrays.asList("Apple", "Banana", "Orange"); - model.addAttribute("fruits", fruits); - return "fruits"; - } -} \ No newline at end of file diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/resources/application.yml" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/resources/application.yml" deleted file mode 100644 index 6d3c2346..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/resources/application.yml" +++ /dev/null @@ -1,11 +0,0 @@ -server: - port: 6666 - - -spring: - thymeleaf: - cache: false - prefix: classpath:/templates/ - encoding: UTF-8 #编码 - suffix: .html #模板后缀 - mode: HTML #模板 diff --git "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/resources/templates/fruits.html" "b/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/resources/templates/fruits.html" deleted file mode 100644 index ab08a4da..00000000 --- "a/springboot101/\346\250\241\347\211\210\345\274\225\346\223\216/springboot-thymeleaf/src/main/resources/templates/fruits.html" +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Example Page - - - -

Welcome to Thymeleaf Example Page

- -
-
    -
  • -
-
-
-

No fruits available.

-
- - - - \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.gitignore" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.gitignore" deleted file mode 100644 index b0c0ffdf..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.gitignore" +++ /dev/null @@ -1,36 +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/ -!/.idea/ -!/.idea/ -!/.idea/ diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/.gitignore" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/.gitignore" deleted file mode 100644 index 26d33521..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/.gitignore" +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/compiler.xml" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/compiler.xml" deleted file mode 100644 index 2f55cb63..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/compiler.xml" +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/encodings.xml" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/encodings.xml" deleted file mode 100644 index aa00ffab..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/encodings.xml" +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/jarRepositories.xml" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/jarRepositories.xml" deleted file mode 100644 index f0b4cc9c..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/jarRepositories.xml" +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/misc.xml" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/misc.xml" deleted file mode 100644 index d5cd6143..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/misc.xml" +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/uiDesigner.xml" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/uiDesigner.xml" deleted file mode 100644 index 2b63946d..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/.idea/uiDesigner.xml" +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/README.md" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/README.md" deleted file mode 100644 index 47a4e041..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/README.md" +++ /dev/null @@ -1 +0,0 @@ -9 种方式获取配置文件的属性变量 diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/pom.xml" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/pom.xml" deleted file mode 100644 index 5a71dacc..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/pom.xml" +++ /dev/null @@ -1,17 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-design-chain - 0.0.1-SNAPSHOT - springboot-design-chain - - - - - diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/Application.java" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/Application.java" deleted file mode 100644 index 0637184c..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/Application.java" +++ /dev/null @@ -1,12 +0,0 @@ -package com.springboot101; - -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/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/domain/OrderContext.java" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/domain/OrderContext.java" deleted file mode 100644 index 91025936..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/domain/OrderContext.java" +++ /dev/null @@ -1,33 +0,0 @@ -package com.springboot101.domain; - -import lombok.Data; - -/** - * 订单责任链处理器 - * - * @author 公众号:程序员小富 - * @date 2023/07/03 11:02 - */ -@Data -public class OrderContext { - - /** - * 请求唯一序列ID - */ - private String seqId; - - /** - * 用户ID - */ - private String userId; - - /** - * 产品skuId - */ - private Long skuId; - - /** - * 下单数量 - */ - private Integer amount; -} \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/AbstractOrderHandler.java" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/AbstractOrderHandler.java" deleted file mode 100644 index 3228f099..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/AbstractOrderHandler.java" +++ /dev/null @@ -1,48 +0,0 @@ -package com.springboot101.handler; - -import com.springboot101.domain.OrderContext; - -/** - * 订单责任链处理器 - * - * @author 公众号:程序员小富 - * @date 2023/07/03 11:02 - */ -public abstract class AbstractOrderHandler { - - /** - * 责任链,下一个链接节点 - */ - private AbstractOrderHandler next; - - /** - * 执行入口 - * - * @param context - */ - public boolean execute(OrderContext context) { - boolean flag = handle(context); - // 判断是否还有下个责任链节点,没有的话,说明已经是最后一个节点 - if (getNext() != null) { - getNext().execute(context); - } - return flag; - } - - /** - * 对参数进行处理 - * - * @param context - * @return - */ - public abstract boolean handle(OrderContext context); - - - public AbstractOrderHandler getNext() { - return next; - } - - public void setNext(AbstractOrderHandler next) { - this.next = next; - } -} \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/RepeatOrderHandler.java" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/RepeatOrderHandler.java" deleted file mode 100644 index 76cdfb8f..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/RepeatOrderHandler.java" +++ /dev/null @@ -1,27 +0,0 @@ -package com.springboot101.handler; - -import com.springboot101.domain.OrderContext; -import org.springframework.core.annotation.Order; -import org.springframework.stereotype.Component; - - -/** - * 订单重复下单处理器 - * - * @author 公众号:程序员小富 - * @date 2023/07/03 11:02 - */ -@Order(2) -@Component -public class RepeatOrderHandler extends AbstractOrderHandler { - - @Override - public boolean handle(OrderContext context) { - // redis get SeqId value - if (true) { - System.out.println("请勿重复下单!"); - return false; - } - return true; - } -} diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/ValidOrderHandler.java" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/ValidOrderHandler.java" deleted file mode 100644 index 5f0fff33..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/handler/ValidOrderHandler.java" +++ /dev/null @@ -1,25 +0,0 @@ -package com.springboot101.handler; - -import com.springboot101.domain.OrderContext; -import org.springframework.core.annotation.Order; -import org.springframework.stereotype.Component; - -/** - * 订单参数校验处理器 - * - * @author 公众号:程序员小富 - * @date 2023/07/03 11:02 - */ -@Order(1) -@Component -public class ValidOrderHandler extends AbstractOrderHandler { - - @Override - public boolean handle(OrderContext context) { - if (context.getAmount() < 0) { - System.out.println("下单数量超出限定,请检查参数!"); - return false; - } - return true; - } -} \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/manager/OrderHandleManager.java" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/manager/OrderHandleManager.java" deleted file mode 100644 index 6b9d7934..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/java/com/springboot101/manager/OrderHandleManager.java" +++ /dev/null @@ -1,46 +0,0 @@ -package com.springboot101.manager; - -import com.springboot101.domain.OrderContext; -import com.springboot101.handler.AbstractOrderHandler; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import javax.annotation.PostConstruct; -import java.util.List; - - -/** - * 订单处理器管理器 - * - * @author 公众号:程序员小富 - * @date 2023/07/03 11:02 - */ -@Component -public class OrderHandleManager { - - @Autowired - private List orderHandleList; - - @PostConstruct - public void init() { - - /** - * 如果处理器List没有按照 @Order 注解方式排序,我们可以通过如下方式手动排序 - */ - // orderHandleList.sort(AnnotationAwareOrderComparator.INSTANCE); - - int size = orderHandleList.size(); - for (int i = 0; i < size; i++) { - AbstractOrderHandler currentHandler = orderHandleList.get(i); - if (i == size - 1) { - currentHandler.setNext(null); - } else { - currentHandler.setNext(orderHandleList.get(i + 1)); - } - } - } - - public boolean execute(OrderContext context) { - return orderHandleList.get(0).execute(context); - } -} \ No newline at end of file diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/resources/application.yml" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/resources/application.yml" deleted file mode 100644 index 89d5604a..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/main/resources/application.yml" +++ /dev/null @@ -1,11 +0,0 @@ -server: - port: 6667 - -env101: - var1: var1-公众号:程序员小富 - var2: var2-公众号:程序员小富 - var3: var3-公众号:程序员小富 - var4: var4-公众号:程序员小富 - var5: var5-公众号:程序员小富 - var6: var6-公众号:程序员小富 - var7: var7-公众号:程序员小富 diff --git "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/test/java/com/springboot101/ChainTest.java" "b/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/test/java/com/springboot101/ChainTest.java" deleted file mode 100644 index 4c34dc2e..00000000 --- "a/springboot101/\350\256\276\350\256\241\346\250\241\345\274\217/springboot-design-chain/src/test/java/com/springboot101/ChainTest.java" +++ /dev/null @@ -1,23 +0,0 @@ -package com.springboot101; - - -import com.springboot101.domain.OrderContext; -import com.springboot101.manager.OrderHandleManager; -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; - -@Slf4j -@SpringBootTest -public class ChainTest { - - @Autowired - private OrderHandleManager orderHandleManager; - - @Test - public void test(){ - boolean execute = orderHandleManager.execute(new OrderContext()); - System.out.println(execute); - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/.gitignore" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/.gitignore" deleted file mode 100644 index 724f6033..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/.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/ -!/.idea/ -!/.idea/ diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/pom.xml" deleted file mode 100644 index 4f7ee875..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/pom.xml" +++ /dev/null @@ -1,31 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-aop-unifiedlog - 0.0.1-SNAPSHOT - springboot-aop-unifiedlog - - - - - org.springframework.boot - spring-boot-starter-aop - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - 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/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/SpringBootAopUnifiedLogApplication.java" deleted file mode 100644 index b8ff19f1..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/SpringBootAopUnifiedLogApplication.java" +++ /dev/null @@ -1,16 +0,0 @@ -package com.springboot101; - -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 { - - public static void main(String[] args) { - SpringApplication.run(SpringBootAopUnifiedLogApplication.class, args); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/controller/OrderController.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/controller/OrderController.java" deleted file mode 100644 index 6cf1e7b0..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/java/com/springboot101/controller/OrderController.java" +++ /dev/null @@ -1,20 +0,0 @@ -package com.springboot101.controller; - - -import com.springboot101.config.PrintlnLog; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Slf4j -@RestController -@RequestMapping -public class OrderController { - - - @PrintlnLog(description = "订单详情Controller") - @RequestMapping("/order") - public void getOrder(String name) { - - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/resources/application.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/resources/application.yml" deleted file mode 100644 index 8845751d..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-aop-unifiedlog/src/main/resources/application.yml" +++ /dev/null @@ -1,3 +0,0 @@ -server: - port: 6668 - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/pom.xml" deleted file mode 100644 index c5ce650c..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/pom.xml" +++ /dev/null @@ -1,31 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - - springboot-banner - - - 8 - 8 - - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/java/com/springboot101/BannerApplication.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/java/com/springboot101/BannerApplication.java" deleted file mode 100644 index 15d2adc2..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/java/com/springboot101/BannerApplication.java" +++ /dev/null @@ -1,15 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Import; - -@SpringBootApplication -public class BannerApplication { - - public static void main(String[] args) { - ConfigurableApplicationContext run = SpringApplication.run(BannerApplication.class, args); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/resources/application.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/resources/application.yml" deleted file mode 100644 index 9a41d8ef..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/resources/application.yml" +++ /dev/null @@ -1,3 +0,0 @@ -server: - port: 9004 - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/resources/banner.txt" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/resources/banner.txt" deleted file mode 100644 index 8dc80673..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-banner/src/main/resources/banner.txt" +++ /dev/null @@ -1,23 +0,0 @@ -${AnsiColor.BRIGHT_GREEN}$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -${AnsiColor.BRIGHT_YELLOW}$$ _.ooOoo._ $$ -${AnsiColor.BRIGHT_RED}$$ o888888888o $$ -${AnsiColor.BRIGHT_CYAN}$$ 88" . "88 $$ -${AnsiColor.BRIGHT_MAGENTA}$$ (| ^_^ |) $$ -${AnsiColor.BRIGHT_GREEN}$$ O\ = /O $$ -${AnsiColor.BRIGHT_RED}$$ ____/`-----'\____ $$ -${AnsiColor.BRIGHT_CYAN}$$ .' \\| |$$ `. $$ -${AnsiColor.BRIGHT_MAGENTA}$$ / \\||| : |||$$ \ $$ -${AnsiColor.BRIGHT_GREEN}$$ / _||||| -:- |||||- \ $$ -${AnsiColor.BRIGHT_YELLOW}$$ | | \\\ - $$/ | | $$ -${AnsiColor.BRIGHT_GREEN}$$ | \_| ''\-----/'' | | $$ -${AnsiColor.BRIGHT_YELLOW}$$ \ .-\___ `-` ____/-. / $$ -${AnsiColor.BRIGHT_CYAN}$$ ___`. .' /--.--\ `. . ___ $$ -${AnsiColor.BRIGHT_RED}$$ ."" '< `.____\_<|>_/____.' >'"". $$ -${AnsiColor.BRIGHT_GREEN}$$ | | : `- \`.;`.\ _ /``;.`/ - ` : | | $$ -${AnsiColor.BRIGHT_YELLOW}$$ \ \ `-. \_ ___\ /___ _/ .-` / / $$ -${AnsiColor.BRIGHT_CYAN}$$ ========`-.____`-.____\_____/____.-`____.-'======== $$ -${AnsiColor.BRIGHT_MAGENTA}$$ `=---=' $$ -${AnsiColor.BRIGHT_YELLOW}$$ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ $$ -${AnsiColor.BRIGHT_GREEN}$$ 佛祖保佑 永无BUG 永不修改 $$ -${AnsiColor.BRIGHT_YELLOW}$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - ${AnsiColor.BRIGHT_YELLOW}Spring Boot: ${spring-boot.formatted-version} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/README.md" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/README.md" deleted file mode 100644 index cb80a2fb..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/README.md" +++ /dev/null @@ -1 +0,0 @@ -springboot注解实现动态数据源切换 \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/pom.xml" deleted file mode 100644 index fef7869d..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/pom.xml" +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.7.6 - - com.dynamic - springboot-config-order - 0.0.1-SNAPSHOT - - 8 - 8 - 3.5.3.1 - 8.0.32 - 1.2.6 - - - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-web - - - - com.mysql - mysql-connector-j - ${mysql.connector.version} - - - - org.projectlombok - lombok - true - - - - com.baomidou - mybatis-plus-boot-starter - ${mybatis.plus.version} - - - - com.alibaba - druid-spring-boot-starter - ${druid.version} - - - org.apache.commons - commons-lang3 - 3.7 - - - org.aspectj - aspectjweaver - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/DynamicDatasourceApplication.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/DynamicDatasourceApplication.java" deleted file mode 100644 index 75592071..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/DynamicDatasourceApplication.java" +++ /dev/null @@ -1,13 +0,0 @@ -package com.dynamic; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; - -@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) -public class DynamicDatasourceApplication { - - public static void main(String[] args) { - SpringApplication.run(DynamicDatasourceApplication.class, args); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/aspect/DS.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/aspect/DS.java" deleted file mode 100644 index 9e1367e7..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/aspect/DS.java" +++ /dev/null @@ -1,18 +0,0 @@ -package com.dynamic.aspect; - -import java.lang.annotation.*; - -/** - * 定于数据源切换注解 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -@Target({ElementType.METHOD, ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -@Inherited -public @interface DS { - // 默认数据源master - String value() default "master"; -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/aspect/DSAspect.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/aspect/DSAspect.java" deleted file mode 100644 index abbb28eb..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/aspect/DSAspect.java" +++ /dev/null @@ -1,44 +0,0 @@ -package com.dynamic.aspect; - -import com.dynamic.config.DataSourceContextHolder; -import lombok.extern.slf4j.Slf4j; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Pointcut; -import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.stereotype.Component; - -import java.lang.reflect.Method; -import java.util.Objects; - -/** - * 实现@DS注解的AOP切面 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -@Aspect -@Component -@Slf4j -public class DSAspect { - - @Pointcut("@annotation(com.dynamic.aspect.DS)") - public void dynamicDataSource() { - } - - @Around("dynamicDataSource()") - public Object datasourceAround(ProceedingJoinPoint point) throws Throwable { - MethodSignature signature = (MethodSignature) point.getSignature(); - Method method = signature.getMethod(); - DS ds = method.getAnnotation(DS.class); - if (Objects.nonNull(ds)) { - DataSourceContextHolder.setDataSource(ds.value()); - } - try { - return point.proceed(); - } finally { - DataSourceContextHolder.removeDataSource(); - } - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DataSourceContextHolder.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DataSourceContextHolder.java" deleted file mode 100644 index e00d3981..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DataSourceContextHolder.java" +++ /dev/null @@ -1,37 +0,0 @@ -package com.dynamic.config; - -/** - * ThreadLocal存放数据源变量 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -public class DataSourceContextHolder { - - private static final ThreadLocal DATASOURCE_HOLDER = new ThreadLocal<>(); - - /** - * 获取当前线程的数据源 - * - * @return 数据源名称 - */ - public static String getDataSource() { - return DATASOURCE_HOLDER.get(); - } - - /** - * 设置数据源 - * - * @param dataSourceName 数据源名称 - */ - public static void setDataSource(String dataSourceName) { - DATASOURCE_HOLDER.set(dataSourceName); - } - - /** - * 删除当前数据源 - */ - public static void removeDataSource() { - DATASOURCE_HOLDER.remove(); - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DateSourceConfig.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DateSourceConfig.java" deleted file mode 100644 index 11c9c1fd..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DateSourceConfig.java" +++ /dev/null @@ -1,44 +0,0 @@ -package com.dynamic.config; - -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; - -import javax.sql.DataSource; -import java.util.HashMap; -import java.util.Map; - -/** - * 注册多个数据源 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -@Configuration -public class DateSourceConfig { - - @Bean - @ConfigurationProperties("spring.datasource.druid.master") - public DataSource dynamicDatasourceMaster() { - return DruidDataSourceBuilder.create().build(); - } - - @Bean - @ConfigurationProperties("spring.datasource.druid.slave") - public DataSource dynamicDatasourceSlave() { - return DruidDataSourceBuilder.create().build(); - } - - @Bean(name = "dynamicDataSource") - @Primary - public DynamicDataSource createDynamicDataSource() { - Map dataSourceMap = new HashMap<>(); - // 设置默认的数据源为Master - DataSource defaultDataSource = dynamicDatasourceMaster(); - dataSourceMap.put("master", defaultDataSource); - dataSourceMap.put("slave", dynamicDatasourceSlave()); - return new DynamicDataSource(defaultDataSource, dataSourceMap); - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DynamicDataSource.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DynamicDataSource.java" deleted file mode 100644 index 7f22cf36..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/config/DynamicDataSource.java" +++ /dev/null @@ -1,30 +0,0 @@ -package com.dynamic.config; - -import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; - -import javax.sql.DataSource; -import java.util.Map; - -/** - * 继承 AbstractRoutingDataSource - * 重置当前的数据库路由,实现切换成想要执行的目标数据库 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -public class DynamicDataSource extends AbstractRoutingDataSource { - - public DynamicDataSource(DataSource defaultDataSource, Map targetDataSources) { - super.setDefaultTargetDataSource(defaultDataSource); - super.setTargetDataSources(targetDataSources); - } - - /** - * 这一步是关键 - * @return - */ - @Override - protected Object determineCurrentLookupKey() { - return DataSourceContextHolder.getDataSource(); - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/controller/DynamicSwitchController.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/controller/DynamicSwitchController.java" deleted file mode 100644 index db3c1315..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/controller/DynamicSwitchController.java" +++ /dev/null @@ -1,64 +0,0 @@ -package com.dynamic.controller; - -import com.dynamic.aspect.DS; -import com.dynamic.config.DataSourceContextHolder; -import com.dynamic.dao.DynamicDatasourceDataMapper; -import com.dynamic.entity.DynamicDatasourceData; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; - -/** - * 动态数据源切换 - * - * @author 公众号:程序员小富 - * @date 2023/11/27 11:02 - */ -@RestController -public class DynamicSwitchController { - - @Resource - private DynamicDatasourceDataMapper dynamicDatasourceDataMapper; - - @GetMapping("/switchDataSource/{datasourceName}") - public String switchDataSource(@PathVariable("datasourceName") String datasourceName) { - DataSourceContextHolder.setDataSource(datasourceName); - DynamicDatasourceData dynamicDatasourceData = dynamicDatasourceDataMapper.selectOne(null); - DataSourceContextHolder.removeDataSource(); - return dynamicDatasourceData.getSourceName(); - } - - @DS(value = "master") - @GetMapping("/dbMaster") - public String dbMaster() { - DynamicDatasourceData dynamicDatasourceData = dynamicDatasourceDataMapper.selectOne(null); - return dynamicDatasourceData.getSourceName(); - } - - @DS(value = "slave") - @GetMapping("/dbSlave") - public String dbSlave() { - DynamicDatasourceData dynamicDatasourceData = dynamicDatasourceDataMapper.selectOne(null); - return dynamicDatasourceData.getSourceName(); - } - - - /** - * 验证一下事物控制 - */ -// @Transactional(rollbackFor = Exception.class) - @DS(value = "slave") - @GetMapping("/dbTestTransactional") - public void dbTestTransactional() { - - DynamicDatasourceData datasourceData = new DynamicDatasourceData(); - datasourceData.setSourceName("test"); - dynamicDatasourceDataMapper.insert(datasourceData); - - DynamicDatasourceData datasourceData1 = new DynamicDatasourceData(); - datasourceData1.setSourceName("testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest"); - dynamicDatasourceDataMapper.insert(datasourceData1); - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/dao/DynamicDatasourceDataMapper.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/dao/DynamicDatasourceDataMapper.java" deleted file mode 100644 index 80311733..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/dao/DynamicDatasourceDataMapper.java" +++ /dev/null @@ -1,9 +0,0 @@ -package com.dynamic.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.dynamic.entity.DynamicDatasourceData; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface DynamicDatasourceDataMapper extends BaseMapper { -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/entity/DynamicDatasourceData.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/entity/DynamicDatasourceData.java" deleted file mode 100644 index 2fa0a61e..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-config-order/src/main/java/com/dynamic/entity/DynamicDatasourceData.java" +++ /dev/null @@ -1,12 +0,0 @@ -package com.dynamic.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -@TableName("t_dynamic_datasource_data") -@Data -public class DynamicDatasourceData { - - private Long id; - private String sourceName; -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/.gitignore" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/.gitignore" deleted file mode 100644 index 59eee11f..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/.gitignore" +++ /dev/null @@ -1,34 +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/ -!/mvnw diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/pom.xml" deleted file mode 100644 index 13aa3fe5..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/pom.xml" +++ /dev/null @@ -1,106 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - ../pom.xml - - springboot-database-doc - 0.0.1-SNAPSHOT - springboot-database-doc - - - - - org.freemarker - freemarker - 2.3.30 - - - - - cn.smallbun.screw - screw-core - 1.0.3 - - - - - com.zaxxer - HikariCP - 3.4.5 - - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - cn.smallbun.screw - screw-maven-plugin - 1.0.3 - - - - com.zaxxer - HikariCP - 3.4.5 - - - - com.mysql - mysql-connector-j - 8.0.32 - - - - - root - - 123456 - - com.mysql.cj.jdbc.Driver - - jdbc:mysql://127.0.0.1:3306/ds-0 - - WORD - - false - - freemarker - - - - 数据库文档生成 - - ${project.version} - - fire数据库文档 - - - - compile - - run - - - - - - - - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/main/resources/application.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/main/resources/application.yml" deleted file mode 100644 index 6c5d27be..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-database-doc/src/main/resources/application.yml" +++ /dev/null @@ -1,8 +0,0 @@ -server: - port: 6670 -spring: - datasource: - driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: 123456 - url: jdbc:mysql://127.0.0.1:3306/ds-0?useUnicode=true&characterEncoding=UTF-8&useSSL=false diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/.gitignore" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/.gitignore" deleted file mode 100644 index 5b548fd4..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/.gitignore" +++ /dev/null @@ -1,9 +0,0 @@ -# Created by .ignore support plugin (hsz.mobi) -### Example order template template -### Example order template - -# IntelliJ project files -.idea -*.iml -out -gen diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/README.md" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/README.md" deleted file mode 100644 index 2264e6a5..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/README.md" +++ /dev/null @@ -1 +0,0 @@ -延时任务 \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/pom.xml" deleted file mode 100644 index 40838998..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/pom.xml" +++ /dev/null @@ -1,61 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-delayqueue - 0.0.1-SNAPSHOT - springboot-delayqueue - - - - - - org.springframework.boot - spring-boot-starter-data-redis - 1.5.7.RELEASE - - - - org.apache.commons - commons-lang3 - 3.4 - - - - com.fasterxml.jackson.core - jackson-annotations - 2.9.0 - - - - org.springframework.boot - spring-boot-starter-quartz - - - - io.netty - netty-all - [4.1.42,) - - - - org.springframework.boot - spring-boot-starter-amqp - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - 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/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/controller/RedisController.java" deleted file mode 100644 index db4f8b1f..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/controller/RedisController.java" +++ /dev/null @@ -1,24 +0,0 @@ -package com.springboot101.controller;//package com.xinzf.project.controller; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -import java.io.IOException; -import java.util.Map; - -@Controller -@RequestMapping -public class RedisController { - - - - @RequestMapping(value = "/redis", method = RequestMethod.GET) - @ResponseBody - public Map redisTest(String type) throws IOException { - - return null ; - } - -} 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/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/delayQueue/Order.java" deleted file mode 100644 index cdbf7744..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/java/com/springboot101/delayQueue/Order.java" +++ /dev/null @@ -1,45 +0,0 @@ -package com.springboot101.delayQueue; - -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.util.concurrent.Delayed; -import java.util.concurrent.TimeUnit; - -/** - * @Author: 公众号:程序员小富 - * @Description: - */ -public class Order implements Delayed { - - /** - * 延迟时间 - */ - @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") - private long time; - - /** - * 订单号 - */ - String name; - - public Order(String name, long time, TimeUnit unit) { - this.name = name; - this.time = System.currentTimeMillis() + (time > 0 ? unit.toMillis(time) : 0); - } - - @Override - public long getDelay(TimeUnit unit) { - return time - System.currentTimeMillis(); - } - - @Override - public int compareTo(Delayed o) { - Order Order = (Order) o; - long diff = this.time - Order.time; - if (diff <= 0) { - return -1; - } else { - return 1; - } - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/resources/application.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/resources/application.yml" deleted file mode 100644 index bb647677..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-delayqueue/src/main/resources/application.yml" +++ /dev/null @@ -1,8 +0,0 @@ -server: - port: 6671 - -spring: - rabbitmq: - addresses: 127.0.0.1:5672 - password: guest - username: guest \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.gitignore" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.gitignore" deleted file mode 100644 index b0c0ffdf..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.gitignore" +++ /dev/null @@ -1,36 +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/ -!/.idea/ -!/.idea/ -!/.idea/ diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/.gitignore" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/.gitignore" deleted file mode 100644 index 26d33521..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/.gitignore" +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/compiler.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/compiler.xml" deleted file mode 100644 index 2f55cb63..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/compiler.xml" +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/encodings.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/encodings.xml" deleted file mode 100644 index aa00ffab..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/encodings.xml" +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/jarRepositories.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/jarRepositories.xml" deleted file mode 100644 index f0b4cc9c..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/jarRepositories.xml" +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/misc.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/misc.xml" deleted file mode 100644 index d5cd6143..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/misc.xml" +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/uiDesigner.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/uiDesigner.xml" deleted file mode 100644 index 2b63946d..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/.idea/uiDesigner.xml" +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/README.md" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/README.md" deleted file mode 100644 index b66375ca..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/README.md" +++ /dev/null @@ -1,4 +0,0 @@ -### 本案例对应的文章教程 - -[6 种方式读取 Springboot 的配置,老鸟都这么玩(原理+实战)](http://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247504127&idx=1&sn=7416045cdfb893b7f284a160ff168da2&chksm=9b864002acf1c914a055c72a0b943867fc98639fb15917839aaf8d2135a64e65bd030ce7e896&token=755618913&lang=zh_CN#rd) - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/pom.xml" deleted file mode 100644 index 3300b4f2..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/pom.xml" +++ /dev/null @@ -1,21 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-env-variables - 0.0.1-SNAPSHOT - springboot-env-variables - - - - org.springframework.boot - spring-boot-starter - 2.7.6 - - - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/java/com/springboot101/Application.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/java/com/springboot101/Application.java" deleted file mode 100644 index 0001cddc..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/java/com/springboot101/Application.java" +++ /dev/null @@ -1,14 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.core.env.CompositePropertySource; -import org.springframework.core.env.PropertySource; - -@SpringBootApplication -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/application.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/application.yml" deleted file mode 100644 index 89d5604a..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/application.yml" +++ /dev/null @@ -1,11 +0,0 @@ -server: - port: 6667 - -env101: - var1: var1-公众号:程序员小富 - var2: var2-公众号:程序员小富 - var3: var3-公众号:程序员小富 - var4: var4-公众号:程序员小富 - var5: var5-公众号:程序员小富 - var6: var6-公众号:程序员小富 - var7: var7-公众号:程序员小富 diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/test.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/test.yml" deleted file mode 100644 index c4c3f1a7..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/test.yml" +++ /dev/null @@ -1,11 +0,0 @@ - -test: - var1: var1-公众号:程序员小富1 - var2: var2-公众号:程序员小富2 - var3: var3-公众号:程序员小富3 - var4: var4-公众号:程序员小富4 - var5: var5-公众号:程序员小富5 - var6: var6-公众号:程序员小富6 - var7: var7-公众号:程序员小富7 - var8: var8-公众号:程序员小富8 - var9: var9-公众号:程序员小富9 \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.properties" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.properties" deleted file mode 100644 index 88a30507..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.properties" +++ /dev/null @@ -1,2 +0,0 @@ -env101.var9=var9-程序员小富 -env101.var10=var10-程序员小富 \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.xml" deleted file mode 100644 index f2d93a33..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.xml" +++ /dev/null @@ -1,5 +0,0 @@ - - - var9-公众号:程序员小富 - var10-公众号:程序员小富 - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.yaml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.yaml" deleted file mode 100644 index 9905ff3e..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.yaml" +++ /dev/null @@ -1,2 +0,0 @@ -env101: - var11: var11-公众号:程序员小富 diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.yml" deleted file mode 100644 index 97d66f70..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/main/resources/xiaofu.yml" +++ /dev/null @@ -1,3 +0,0 @@ -env101: - var9: var9-公众号:程序员小富 - var10: var10-公众号:程序员小富 diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesConf.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesConf.java" deleted file mode 100644 index 37acbbc4..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesConf.java" +++ /dev/null @@ -1,23 +0,0 @@ -package com.springboot101.PropertySources; - -import lombok.Data; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.context.annotation.PropertySources; - -@Data -@Configuration -@PropertySources({ - @PropertySource(value = "classpath:xiaofu.properties",encoding = "utf-8") -}) -public class PropertySourcesConf { - - @Value("${env101.var10}") - private String var10; - - @Value("${env101.var9}") - private String var9; - - -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesConf2.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesConf2.java" deleted file mode 100644 index fdc40e78..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesConf2.java" +++ /dev/null @@ -1,21 +0,0 @@ -package com.springboot101.PropertySources; - -import lombok.Data; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.context.annotation.PropertySources; - -@Data -@Configuration -@PropertySources({ - @PropertySource(value = "classpath:xiaofu.yaml", encoding = "utf-8", factory = YamlPropertySourceFactory.class) -}) -public class PropertySourcesConf2 { - - @Value("${env101.var10}") - private String var10; - - @Value("${env101.var9}") - private String var9; -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesTest.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesTest.java" deleted file mode 100644 index 7c1363a6..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/PropertySourcesTest.java" +++ /dev/null @@ -1,38 +0,0 @@ -package com.springboot101.PropertySources; - -import com.alibaba.fastjson.JSON; -import com.springboot101.configurationProperties.MyConf; -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.core.env.Environment; -import org.springframework.core.env.PropertyResolver; - -import javax.annotation.Resource; - -@Slf4j -@SpringBootTest -public class PropertySourcesTest { - - @Resource - private PropertySourcesConf propertySourcesConf; - - @Resource - private PropertySourcesConf2 propertySourcesConf2; - - @Resource - private Environment environment; - - @Test - public void myConfTest() { - log.info("@PropertySources注解 @Value 获取 {}", propertySourcesConf.getVar9()); - log.info("@PropertySources注解 environment 获取 {}", propertySourcesConf.getVar10()); - } - - - @Test - public void myConfTest2() { - log.info("@PropertySources注解 @Value 获取 {}", propertySourcesConf2.getVar9()); - log.info("@PropertySources注解 environment 获取 {}", propertySourcesConf2.getVar10()); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/YamlPropertySourceFactory.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/YamlPropertySourceFactory.java" deleted file mode 100644 index cf8035ff..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/PropertySources/YamlPropertySourceFactory.java" +++ /dev/null @@ -1,25 +0,0 @@ -package com.springboot101.PropertySources; - -import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; -import org.springframework.core.env.PropertiesPropertySource; -import org.springframework.core.env.PropertySource; -import org.springframework.core.io.support.EncodedResource; -import org.springframework.core.io.support.PropertySourceFactory; - -import java.io.IOException; -import java.util.Properties; - -public class YamlPropertySourceFactory implements PropertySourceFactory { - - @Override - public PropertySource createPropertySource(String name, EncodedResource encodedResource) throws IOException { - YamlPropertiesFactoryBean factory = new YamlPropertiesFactoryBean(); - factory.setResources(encodedResource.getResource()); - - Properties properties = factory.getObject(); - - return new PropertiesPropertySource(encodedResource.getResource().getFilename(), properties); - } -} - - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/configurationProperties/ConfTest.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/configurationProperties/ConfTest.java" deleted file mode 100644 index e93ff25e..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/configurationProperties/ConfTest.java" +++ /dev/null @@ -1,22 +0,0 @@ -package com.springboot101.configurationProperties; - -import com.alibaba.fastjson.JSON; -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.PropertySources; - -import javax.annotation.Resource; - -@Slf4j -@SpringBootTest -public class ConfTest { - - @Resource - private MyConf myConf; - - @Test - public void myConfTest() { - log.info("@ConfigurationProperties注解 配置获取 {}", JSON.toJSONString(myConf)); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/configurationProperties/MyConf.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/configurationProperties/MyConf.java" deleted file mode 100644 index 5fc786fc..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/configurationProperties/MyConf.java" +++ /dev/null @@ -1,16 +0,0 @@ -package com.springboot101.configurationProperties; - - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Configuration; - -@Data -@Configuration -@ConfigurationProperties(prefix = "env101") -public class MyConf { - - private String var1; - - private String var2; -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/custom/CustomTest.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/custom/CustomTest.java" deleted file mode 100644 index 9436c1af..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/custom/CustomTest.java" +++ /dev/null @@ -1,29 +0,0 @@ -package com.springboot101.custom; - -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; -import org.springframework.core.env.PropertyResolver; -import org.springframework.core.env.PropertySource; -import org.springframework.core.env.PropertySources; - -import javax.annotation.Resource; -import java.util.Arrays; - -@Slf4j -@SpringBootTest -public class CustomTest { - - @Autowired - private PropertySources propertySources; - - @Test - public void customTest() { - for (PropertySource propertySource : propertySources) { - log.info("自定义获取 配置获取 name {} ,{}", propertySource.getName(), propertySource.getSource()); - } - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/environment/EnvironmentTest.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/environment/EnvironmentTest.java" deleted file mode 100644 index 9f79c8ab..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/environment/EnvironmentTest.java" +++ /dev/null @@ -1,29 +0,0 @@ -package com.springboot101.environment; - -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.core.env.Environment; -import org.springframework.core.env.PropertyResolver; -import org.springframework.web.context.support.ServletContextPropertySource; - -import javax.annotation.Resource; - -@Slf4j -@SpringBootTest -public class EnvironmentTest { - - @Resource - private PropertyResolver env; - - @Test - public void var1Test() { - String var1 = env.getProperty("env101.var1"); - log.info("Environment 配置获取 {}", var1); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/value\346\263\250\350\247\243/EnvVariables2Test.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/value\346\263\250\350\247\243/EnvVariables2Test.java" deleted file mode 100644 index 3fe5e393..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/value\346\263\250\350\247\243/EnvVariables2Test.java" +++ /dev/null @@ -1,41 +0,0 @@ -package com.springboot101.value注解; - -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.test.context.SpringBootTest; - -import javax.annotation.Resource; - -@Slf4j -@SpringBootTest -public class EnvVariables2Test { - - private final String var6; - - @Autowired - EnvVariables2Test( @Value("${env101.var6}") String var6) { - - this.var6 = var6; - } - - - /** - * @value注解 final 获取 - */ - @Test - public void var6Test() { - log.info("final 注入: {}", var6); - } - - /** - * @value注解 非注册的类中使用 - * `@Component`、`@Service`、`@Controller`、`@Repository` 或 `@Configuration` 等**容器管理**注解的类中使用 @Value注解才会生效 - */ - @Test - public void var7Test() { - -// log.info("非注册的类中使用 注入: {}", testService.getVar7()); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/value\346\263\250\350\247\243/EnvVariablesTest.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/value\346\263\250\350\247\243/EnvVariablesTest.java" deleted file mode 100644 index b71209fe..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/value\346\263\250\350\247\243/EnvVariablesTest.java" +++ /dev/null @@ -1,119 +0,0 @@ -package com.springboot101.value注解; - -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.test.context.SpringBootTest; - -@Slf4j -@SpringBootTest -public class EnvVariablesTest { - - @Value("${env101.var1}") - private String var1; - - private static String var3; - - private static String var4; - - - @Value("${env101.var3}") - public void setVar3(String var3) { - EnvVariablesTest.var3 = var3; - } - - private final String var6; - - @Autowired - EnvVariablesTest(@Value("${env101.var4}") String var4,@Qualifier("var6") String var6) { - EnvVariablesTest.var4 = var4; - - this.var6 = var6; - } - - public static String getVar4() { - return var4; - } - - public static String getVar3() { - return var3; - } - - /** - * @value注解 普通获取 - */ - @Test - public void var1Test() { - log.info("配置文件属性: {}", var1); - } - - /** - * @value注解 静态变量获取 - */ - @Test - public void var2Test() { - log.info("普通方法注入:{}", var3); - log.info("构造函数注入:{}", var4); - } - - /** - * - */ - @Test - public void var3Test() { - log.info("静态变量注入:{}", var3); - log.info("静态变量注入:{}", var4); - log.info("final 注入:{}", var6); - } - - /** - * - */ - @Test - public void var4Test() { - log.info(var1); - } - - - /** - * - */ - @Test - public void var5Test() { - log.info(var1); - } - - /** - * 第六种方式 - */ - @Test - public void var6Test() { - log.info(var1); - } - - /** - * 第七种方式 - */ - @Test - public void var7Test() { - log.info(var1); - } - - /** - * 第八种方式 - */ - @Test - public void var8Test() { - log.info(var1); - } - - /** - * 第九种方式 - */ - @Test - public void var9Test() { - log.info(var1); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/yaml/MyYamlConfig.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/yaml/MyYamlConfig.java" deleted file mode 100644 index 30322f35..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/yaml/MyYamlConfig.java" +++ /dev/null @@ -1,22 +0,0 @@ -package com.springboot101.yaml; - -import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; -import org.springframework.core.io.ClassPathResource; - -import java.util.Objects; - -@Configuration -public class MyYamlConfig { - - @Bean - public static PropertySourcesPlaceholderConfigurer yamlConfigurer() { - PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer(); - YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean(); - yaml.setResources(new ClassPathResource("xiaofu.yml")); - configurer.setProperties(Objects.requireNonNull(yaml.getObject())); - return configurer; - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/yaml/YamlTest.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/yaml/YamlTest.java" deleted file mode 100644 index 6ed3a776..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-env-variables/src/test/java/com/springboot101/yaml/YamlTest.java" +++ /dev/null @@ -1,23 +0,0 @@ -package com.springboot101.yaml; - -import com.alibaba.fastjson.JSON; -import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.core.env.PropertyResolver; - -import javax.annotation.Resource; - -@Slf4j -@SpringBootTest -public class YamlTest { - - @Value("${env101.var11}") - private String var11; - - @Test - public void myYamlTest() { - log.info("Yaml 配置获取 {}", var11); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/README.md" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/README.md" deleted file mode 100644 index 20afdd0b..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/README.md" +++ /dev/null @@ -1 +0,0 @@ -shi \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/pom.xml" deleted file mode 100644 index fa7ef836..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/pom.xml" +++ /dev/null @@ -1,27 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - springboot-global-formatting - 0.0.1-SNAPSHOT - springboot-global-formatting - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/dto/OrderDTO.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/dto/OrderDTO.java" deleted file mode 100644 index ddb85c09..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/java/com/springboot101/dto/OrderDTO.java" +++ /dev/null @@ -1,21 +0,0 @@ -package com.springboot101.dto; - -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; - -import java.time.LocalDateTime; -import java.util.Date; - -/** - * @Author: 公众号:程序员小富 - * @Description: - */ -@Data -public class OrderDTO { - - @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd") - private LocalDateTime createTime; - - @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd") - private Date updateTime; -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/resources/application.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/resources/application.yml" deleted file mode 100644 index f45bfbe2..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-global-formatting/src/main/resources/application.yml" +++ /dev/null @@ -1,3 +0,0 @@ -server: - port: 6672 - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/README.md" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/README.md" deleted file mode 100644 index 46f2dfa4..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/README.md" +++ /dev/null @@ -1,3 +0,0 @@ -### 本案例对应的文章教程 - -[Springboot 配置文件、隐私数据脱敏的最佳实践(原理+源码)](http://mp.weixin.qq.com/s?__biz=MzAxNTM4NzAyNg==&mid=2247496247&idx=1&sn=643af4cbe578a1c52bc302af948803ef&chksm=9b8662caacf1ebdc628c48890a6f7274acfaae9fa4a3ec519d41c4dec92182802e46c621658b&token=755618913&lang=zh_CN#rd) diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/pom.xml" deleted file mode 100644 index b80c71a5..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/pom.xml" +++ /dev/null @@ -1,40 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - - springboot-jasypt - - - 8 - 8 - - - - - - com.github.ulisesbocchio - jasypt-spring-boot-starter - 2.1.0 - - - org.aspectj - aspectjweaver - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/JasyptApplication.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/JasyptApplication.java" deleted file mode 100644 index e87e5727..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/JasyptApplication.java" +++ /dev/null @@ -1,16 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Import; - -@ComponentScan("com.springboot101") -@SpringBootApplication -public class JasyptApplication { - - public static void main(String[] args) { - ConfigurableApplicationContext run = SpringApplication.run(JasyptApplication.class, args); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/annotation/EncryptMethod.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/annotation/EncryptMethod.java" deleted file mode 100644 index f5afdc8c..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/java/com/springboot101/annotation/EncryptMethod.java" +++ /dev/null @@ -1,14 +0,0 @@ -package com.springboot101.annotation; - -import java.lang.annotation.*; - -import static com.springboot101.enums.EncryptConstant.ENCRYPT; - -@Documented -@Target({ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface EncryptMethod { - - String type() default ENCRYPT; -} - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/resources/application.yml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/resources/application.yml" deleted file mode 100644 index 322bd95f..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-jasypt/src/main/resources/application.yml" +++ /dev/null @@ -1,13 +0,0 @@ -server: - port: 9000 - -spring: - datasource: - url: jdbc:mysql://1.2.3.4:3306/xiaofu?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai - username: 公众号:程序员小富 - password: ENC(mVTvp4IddqdaYGqPl9lCQbzM3H/b0B6l) - -jasypt: - encryptor: - password: 35579B7F9C8CB15E - poolSize: 3 \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/README.md" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/README.md" deleted file mode 100644 index af76a644..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/README.md" +++ /dev/null @@ -1,2 +0,0 @@ - -实现三种异步流式接口 \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/pom.xml" deleted file mode 100644 index ed734a58..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/pom.xml" +++ /dev/null @@ -1,24 +0,0 @@ - - - 4.0.0 - - com.notebook - Springboot-Notebook - 0.0.1-SNAPSHOT - - springboot-streaming - 0.0.1-SNAPSHOT - springboot-streaming - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-web - - - diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/StreamingApplication.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/StreamingApplication.java" deleted file mode 100644 index 6f7a0c4f..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/StreamingApplication.java" +++ /dev/null @@ -1,13 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class StreamingApplication { - - public static void main(String[] args) { - SpringApplication.run(StreamingApplication.class, args); - } - -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/ResponseBodyEmitterController.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/ResponseBodyEmitterController.java" deleted file mode 100644 index 201906a5..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/ResponseBodyEmitterController.java" +++ /dev/null @@ -1,42 +0,0 @@ -package com.springboot101.controller; - - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter; - -import java.util.Date; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -@Controller -public class ResponseBodyEmitterController { - private final ExecutorService nonBlockingService = Executors.newCachedThreadPool(); - - @GetMapping("bodyEmitter") - public ResponseBodyEmitter handle() { - - // 创建一个ResponseBodyEmitter,-1代表不超时 - ResponseBodyEmitter emitter = new ResponseBodyEmitter(-1L); - - // 异步执行耗时操作 - CompletableFuture.runAsync(() -> { - try { - // 模拟耗时操作 - for (int i = 0; i < 10000; i++) { - System.out.println("bodyEmitter " + i); - // 发送数据 - emitter.send("bodyEmitter " + i + " @ " + new Date() + "\n"); - Thread.sleep(2000); - } - // 完成 - emitter.complete(); - } catch (Exception e) { - // 发生异常时结束接口 - emitter.completeWithError(e); - } - }); - return emitter; - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/SseEmitterController.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/SseEmitterController.java" deleted file mode 100644 index 79d27fbc..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/SseEmitterController.java" +++ /dev/null @@ -1,68 +0,0 @@ -package com.springboot101.controller; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; - -import java.io.IOException; -import java.time.LocalTime; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ConcurrentHashMap; - -@Slf4j -@RestController -public class SseEmitterController { - - private static final Map EMITTER_MAP = new ConcurrentHashMap<>(); - - @GetMapping("/subSseEmitter/{userId}") - public SseEmitter sseEmitter(@PathVariable String userId) { - log.info("sseEmitter: {}", userId); - SseEmitter emitterTmp = new SseEmitter(-1L); - EMITTER_MAP.put(userId, emitterTmp); - CompletableFuture.runAsync(() -> { - try { - SseEmitter.SseEventBuilder event = SseEmitter.event() - .data("sseEmitter" + userId + " @ " + LocalTime.now()) - .id(String.valueOf(userId)) - .name("sseEmitter"); - emitterTmp.send(event); - } catch (Exception ex) { - emitterTmp.completeWithError(ex); - } - }); - return emitterTmp; - } - - @GetMapping("/sendSseMsg/{userId}") - public void sseEmitter(@PathVariable String userId, String msg) throws IOException { - SseEmitter sseEmitter = EMITTER_MAP.get(userId); - if (sseEmitter == null) { - return; - } - sseEmitter.send(msg); - } -// @GetMapping("/sseEmitter/{userId}") -// public SseEmitter sseEmitter(@PathVariable String userId) { -// -// CompletableFuture.runAsync(() -> { -// try { -// for (int i = 0; i < 10000; i++) { -// SseEmitter.SseEventBuilder event = SseEmitter.event() -// .data("sseEmitter" + i + " @ " + LocalTime.now()) -// .id(String.valueOf(i)) -// .name("sseEmitter"); -// emitter.send(event); -// Thread.sleep(1000); -// } -// emitter.complete(); -// } catch (Exception ex) { -// emitter.completeWithError(ex); -// } -// }); -// return emitter; -// } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/StreamingResponseBodyController.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/StreamingResponseBodyController.java" deleted file mode 100644 index ad8f29db..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/StreamingResponseBodyController.java" +++ /dev/null @@ -1,33 +0,0 @@ -package com.springboot101.controller; - -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; - -import java.util.concurrent.TimeUnit; - -@Controller -public class StreamingResponseBodyController { - - @GetMapping("/streamingResponse") - public ResponseEntity handleRbe() { - - StreamingResponseBody stream = out -> { - String message = "streamingResponse"; - for (int i = 0; i < 1000; i++) { - try { - out.write(((message + i) + "\r\n").getBytes()); - out.write("\r\n".getBytes()); - //调用一次flush就会像前端写入一次数据 - out.flush(); - TimeUnit.SECONDS.sleep(1); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - }; - return ResponseEntity.ok().contentType(MediaType.TEXT_HTML).body(stream); - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/TestController.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/TestController.java" deleted file mode 100644 index f1763704..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/java/com/springboot101/controller/TestController.java" +++ /dev/null @@ -1,15 +0,0 @@ -package com.springboot101.controller; - - -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.GetMapping; - -@Controller -public class TestController { - - @GetMapping("/sse") - public String sse(Model model) { - return "sse"; - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/resources/templates/sse.html" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/resources/templates/sse.html" deleted file mode 100644 index 51652d60..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-streaming/src/main/resources/templates/sse.html" +++ /dev/null @@ -1,46 +0,0 @@ - - - - - SSE - - -
-

SSE 接收服务端事件消息数据

-
等待连接...
-
- - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/README.md" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/README.md" deleted file mode 100644 index 117755ed..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/README.md" +++ /dev/null @@ -1 +0,0 @@ -springbott参数校验 \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/pom.xml" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/pom.xml" deleted file mode 100644 index 9d6902c2..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/pom.xml" +++ /dev/null @@ -1,29 +0,0 @@ - - - 4.0.0 - - com.springboot101 - springboot101 - 0.0.1-SNAPSHOT - - - springboot-valid-params - - - - org.springframework.boot - spring-boot-starter-validation - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/ValidApplication.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/ValidApplication.java" deleted file mode 100644 index fd75b80b..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/ValidApplication.java" +++ /dev/null @@ -1,12 +0,0 @@ -package com.springboot101; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class ValidApplication { - - public static void main(String[] args) { - SpringApplication.run(ValidApplication.class, args); - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/controller/TestController.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/controller/TestController.java" deleted file mode 100644 index 9aebd420..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/controller/TestController.java" +++ /dev/null @@ -1,22 +0,0 @@ -package com.springboot101.controller; - -import com.springboot101.params.UserVO; -import com.springboot101.params.ValidGroup; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class TestController { - - @PostMapping("/addUserInfo") - public String addUserInfo(@Validated @RequestBody UserVO user) { - return "插入成功!"; - } - - @PostMapping("/editUserInfo") - public String editUserInfo(@Validated({ValidGroup.Update.class}) @RequestBody UserVO user) { - return "编辑成功!"; - } -} diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/domain/ResponseResult.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/domain/ResponseResult.java" deleted file mode 100644 index ef6a5ece..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/domain/ResponseResult.java" +++ /dev/null @@ -1,50 +0,0 @@ -package com.springboot101.domain; - -import com.springboot101.enums.ResultCode; -import lombok.Data; - - -@Data -public class ResponseResult { - - private int code; - private String message; - private T data; - private long timestamp ; - - - public ResponseResult(){ - this.timestamp = System.currentTimeMillis(); - } - - public ResponseResult(int code) { - this.code = code; - } - - public ResponseResult(int code, String message) { - this.code = code; - this.message = message; - } - - public ResponseResult(int code, String message, T data) { - this.code = code; - this.message = message; - this.data = data; - } - - public static ResponseResult success(T data) { - ResponseResult resultData = new ResponseResult<>(); - resultData.setCode(ResultCode.OK.getCode()); - resultData.setMessage(ResultCode.OK.getMessage()); - resultData.setData(data); - return resultData; - } - - public static ResponseResult fail(int code, String message) { - ResponseResult resultData = new ResponseResult<>(); - resultData.setCode(code); - resultData.setMessage(message); - return resultData; - } - -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/enums/ResultCode.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/enums/ResultCode.java" deleted file mode 100644 index 92ef17c9..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/enums/ResultCode.java" +++ /dev/null @@ -1,49 +0,0 @@ -package com.springboot101.enums; - - -public enum ResultCode { - - /** - * 操作成功 - */ - OK(100, "操作成功"), - - /** - * 操作失败 - */ - OPS_ERROR(-1, "操作失败"), - - /** - * 参数校验不通过 - */ - PARAMETER_ERROR(204, "参数校验不通过"), - - /** - * 服务异常 - */ - SYSTEM_ERROR(500, "系统异常,请稍后重试"); - - /** - * 自定义状态码 - **/ - private final int code; - - /** - * 自定义描述 - **/ - private final String message; - - ResultCode(int code, String message) { - this.code = code; - this.message = message; - } - - - public int getCode() { - return code; - } - - public String getMessage() { - return message; - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/exception/GlobalExceptionHandler.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/exception/GlobalExceptionHandler.java" deleted file mode 100644 index aaf23e2d..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/exception/GlobalExceptionHandler.java" +++ /dev/null @@ -1,90 +0,0 @@ -package com.springboot101.exception; - -import com.springboot101.enums.ResultCode; -import com.springboot101.domain.ResponseResult; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.http.HttpStatus; -import org.springframework.http.converter.HttpMessageNotReadableException; -import org.springframework.validation.BindingResult; -import org.springframework.validation.FieldError; -import org.springframework.validation.ObjectError; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.MissingServletRequestParameterException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -import java.util.List; - -@Slf4j -@RestControllerAdvice -public class GlobalExceptionHandler { - - /** - * 忽略参数异常处理器 - * - * @param e 忽略参数异常 - * @return ResponseResult - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(MissingServletRequestParameterException.class) - public ResponseResult parameterMissingExceptionHandler(MissingServletRequestParameterException e) { - log.error("", e); - return new ResponseResult(ResultCode.PARAMETER_ERROR.getCode(), "请求参数 " + e.getParameterName() + " 不能为空"); - } - - /** - * 缺少请求体异常处理器 - * - * @param e 缺少请求体异常 - * @return ResponseResult - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(HttpMessageNotReadableException.class) - public ResponseResult parameterBodyMissingExceptionHandler(HttpMessageNotReadableException e) { - log.error("", e); - return new ResponseResult(ResultCode.PARAMETER_ERROR.getCode(), "参数体不能为空"); - } - - /** - * 参数效验异常处理器 - * - * @param e 参数验证异常 - * @return ResponseInfo - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(MethodArgumentNotValidException.class) - public ResponseResult parameterExceptionHandler(MethodArgumentNotValidException e) { - log.error("", e); - // 获取异常信息 - BindingResult exceptions = e.getBindingResult(); - // 判断异常中是否有错误信息,如果存在就使用异常中的消息,否则使用默认消息 - if (exceptions.hasErrors()) { - List errors = exceptions.getAllErrors(); - if (!errors.isEmpty()) { - // 这里列出了全部错误参数,按正常逻辑,只需要第一条错误即可 - FieldError fieldError = (FieldError) errors.get(0); - return new ResponseResult(ResultCode.PARAMETER_ERROR.getCode(), fieldError.getDefaultMessage()); - } - } - return new ResponseResult(ResultCode.PARAMETER_ERROR.getCode()); - } - - /** - * 自定义参数错误异常处理器 - * - * @param e 自定义参数 - * @return ResponseInfo - */ - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler({ParamsErrorException.class}) - public ResponseResult paramExceptionHandler(ParamsErrorException e) { - log.error("", e); - // 判断异常中是否有错误信息,如果存在就使用异常中的消息,否则使用默认消息 - if (!StringUtils.isEmpty(e.getMessage())) { - return new ResponseResult(ResultCode.PARAMETER_ERROR.getCode(), e.getMessage()); - } - return new ResponseResult(ResultCode.PARAMETER_ERROR.getCode()); - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/exception/ParamsErrorException.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/exception/ParamsErrorException.java" deleted file mode 100644 index 6bf5a0db..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/exception/ParamsErrorException.java" +++ /dev/null @@ -1,16 +0,0 @@ -package com.springboot101.exception; - - -public class ParamsErrorException extends RuntimeException { - - private final int code; - - public ParamsErrorException(int code, String message) { - super(message); - this.code = code; - } - - public int getCode() { - return code; - } -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/params/UserVO.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/params/UserVO.java" deleted file mode 100644 index 710f559f..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/params/UserVO.java" +++ /dev/null @@ -1,41 +0,0 @@ -package com.springboot101.params; - - -import lombok.Data; -import org.springframework.web.bind.annotation.GetMapping; - -import javax.validation.constraints.*; -import java.util.Date; - -/** - * gon - */ -@Data -public class UserVO { - - @NotBlank(message = "姓名不为空", groups = ValidGroup.Insert.class) - private String username; - - @NotBlank(message = "密码不为空", groups = ValidGroup.Update.class) - private String password; - - @Min(value = 18, message = "年龄不小于18", groups = {ValidGroup.Update.class, ValidGroup.Insert.class}) - @Max(value = 100, message = "年龄不大于100", groups = {ValidGroup.Update.class, ValidGroup.Insert.class}) - @NotNull(message = "age不为空", groups = {ValidGroup.Update.class, ValidGroup.Insert.class}) - private int age; - - @Email(message = "邮件格式不对") - @NotBlank(message = "邮件不为空", groups = ValidGroup.Insert.class) - private String email; - - // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") -// @Future(message = "必须是将来时间") - @NotNull(message = "createTime不为空", groups = {ValidGroup.Update.class, ValidGroup.Insert.class}) - private Date createTime; - - @GetMapping("/hello") - public String getStr() { - return "hello,javadaily"; - } - -} \ No newline at end of file diff --git "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/params/ValidGroup.java" "b/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/params/ValidGroup.java" deleted file mode 100644 index 469c0b52..00000000 --- "a/springboot101/\351\200\232\347\224\250\345\212\237\350\203\275/springboot-valid-params/src/main/java/com/springboot101/params/ValidGroup.java" +++ /dev/null @@ -1,32 +0,0 @@ -package com.springboot101.params; - -import javax.validation.GroupSequence; - -/** - * 分组校验 - 定义分组 - */ - -/** - * 分组校验 - 定义分组 - * @author 公众号:程序员小富 - * @date 2023/10/24 11:02 - */ -public class ValidGroup { - - // 新增使用 - public interface Insert { - } - - // 更新使用 - public interface Update { - } - - // 删除使用 - public interface Delete { - } - - // 属性必须有这两个分组的才验证(配合spring的@Validated功能分组使用) - @GroupSequence({Insert.class, Update.class, Delete.class}) - public interface All { - } -} \ No newline at end of file