# spring-boot-example **Repository Path**: zhouanan511/spring-boot-example ## Basic Information - **Project Name**: spring-boot-example - **Description**: 代码案例库 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2024-11-20 - **Last Updated**: 2024-11-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # spring-boot-example ## 介绍 spring boot 各类方案案例。作为自己平时代码的案例库。 ## 软件架构 lab_00_module 是依赖于maven,可以自定义批量创建maven模块。本项目的模块全部都是由此创建出来的。 module.list 是全部module的列表,用来生成module ![输入图片说明](https://images.gitee.com/uploads/images/2020/0906/212339_98f7cf91_635176.png "屏幕截图.png") ## 软件架构 | 模块 | 备注 | 完成度 | | ------------------------------ | ----------------------------------- | -------- | | lab_0_common | 公共插件,分为java工具和shell脚本 | √ | | lab_000_base_web | spring 基础案例 | √ | | lab_001_base_sources | spring 源码案例 | | | lab_002_base_actuator | 监控 | √ | | lab_003_web_swagger | rest接口文档 | √ | | lab_004_web_freemarker | 模板引擎 | √ | | lab_005_web_tiles2 | 模板引擎 | √ | | lab_006_web_thymeleaf | html模板引擎 | √ | | lab_007_web_dwr | js调用Java api | √ | | lab_008_web_Jersey | Jersey rest api | √ | | lab_009_db_RWSplitting | 读写分离案例 | √ | | lab_010_db_jdbctemplate | spring jdbcTemplate | √ | | lab_011_db_jpa | jpa | √ | | lab_012_db_mybatis | mybatis | √ | | lab_013_db_mybatisplus | mybatis 插件 | √ | | lab_014_db_dbutils | jdbc 小工具 | √ | | lab_015_db_shardingsphere | 数据库分库分表插件 | √ | | lab_016_db_snowflake | 分布式ID--雪花算法 | √ | | lab_017_db_atomikos | 分布式事务 | √ | | lab_018_db_seata | 分布式事务 | | | lab_019_db_mybatis_generator | mybatis代码生成 | √ | | lab_020_redis_jedis | Redis客户端jedis | √ | | lab_021_redis_redisson | Redis客户端redisson | √ | | lab_022_redis_lettuce | Redis客户端lettuce | √ | | lab_023_se_lucene | 搜索引擎 | √ | | lab_024_se_solr | 搜索引擎--lucene的分装 | √ | | lab_025_se_elasticsearch | 搜索引擎--lucene的分装 | √ | | lab_026_mogodb | 文档数据库 | √ | | lab_027_neo4j | 图形数据库 | √ | | lab_028_derby | 嵌入式数据库 | √ | | lab_029_db_pool | 数据库连接池 | √ | | lab_030_cache_ehcache | 缓存 | √ | | lab_031_cache_memcache | 缓存 | | | lab_032_cache_caffeine | 缓存 | √ | | lab_033_cache_j2cache | 缓存 | | | lab_034_ | | | | lab_035_ | | | | lab_036_bpm_activiti | 工作流 | | | lab_037_bpm_jbpm | 工作流 | | | lab_038_ | | | | lab_039_web_security | web安全 | | | lab_040_auth_shiro | 权限 | √ | | lab_041_log | 日志 | | | lab_042_jfinal | | | | lab_043_Front | 前端工具合集 | | | lab_044_dbBeanch | 数据库测试工具合集 | | | lab_045_ | | | | lab_046_ | | | | lab_047_netty | netty | | | lab_048_reptile_anti | 反爬虫kk-anti-reptile | √ | | lab_049_webSocket | webSocket案例 | √ | | lab_050_http_httpClient | http客户端 | √ | | lab_051_job_quarter | 定时任务quarter | √ | | lab_052_job_spring | 定时任务spring | √ | | lab_053_job_xxlJob | 定时任务xxlJob | √ | | lab_054_ | | | | lab_055_apache_commons | apache工具集 | √ | | lab_056_util_jFreeChart | java 图表 | √ | | lab_057_util_excel | excel工具 | √ | | lab_058_util_CKEditor | HTML富文本编辑器 | √ | | lab_059_util_fastDFS | 文件系统 | √ | | lab_060_util_guava | guava | √ | | lab_061_util_disruptor | 高并发处理框架 | √ | | lab_062_util_lombok | 代码简易开发 | √ | | lab_063_util_bytes | 字节码增强 | √ | | lab_064_util_pdf | pdf | √ | | lab_065_util_json | json处理 | √ | | lab_066_util_xml | xml处理 | √ | | lab_067_util_email | 邮件 | √ | | lab_068_util_math | 数学公式&表达式解析 | √ | | lab_069_util_image | 图形处理 | √ | | lab_070_util_pinyin | 拼音处理 | √ | | lab_071_util_compress | 压缩解压 | √ | | lab_072_util_QRcode | 二维码 | √ | | lab_073_util_serizable | | | | lab_074_rpc_dubbo_xml | rpc--dubbo | √ | | lab_075_rpc_dubbo_annotation | rpc--dubbo | √ | | lab_076_rpc_openfeign | openfeign | | | lab_077_rpc_thrift | rpc--dubbo | √ | | lab_078_ | | | | lab_079_ | | | | lab_080_cfg_zk | zookeeper | √ | | lab_081_cfg_eureka | | | | lab_082_cfg_nacos | nacos | √ | | lab_083_ | | | | lab_084_docker | docker | | | lab_085_ | | | | lab_086_trace_sleuth | 全链路 | | | lab_087_ | | | | lab_088_ | | | | lab_089_ | | | | lab_090_mq_rocketmq | MQ | √ | | lab_091_mq_kafka | MQ | √ | | lab_092_ | | | | lab_093_ | | | | lab_094_ag_zuul | ApiGateway | | | lab_095_ag_sentinel | 流量控制 | | | lab_096_ | | | | lab_097_ | | | | lab_098_ | | | | lab_099_ | | | | lab_100_ | | | | lab_101_base_mointor | 服务器监控 | √ | | lab_102_ | | | | lab_103_ | | | | lab_104_ | | | | lab_105_etl_canal | canal | | | lab_106_ | | | | lab_107_ | | | | lab_109_ | | | | lab_110_ | | | | lab_111_hadoop | hadoop | | | lab_112_hbase | hbase | | | lab_113_ | | | | lab_114_ | | | | lab_115_ | | | | lab_116_ | | | | lab_117_ | | | | lab_118_ | | | | lab_119_ | | | | lab_120_stream_flink | flink | | | lab_121_ | | | | lab_122_ | | | | lab_123_ | | | | lab_124_yun_tencent | 腾讯云API | | | lab_125_ | | | | lab_126_ | | | Process finished with exit code 0 ## 代码统计[2021年] 1.提交次数:106次 ```shell $ git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --since="2021-01-01" --until="2021-12-31" --no-merges | grep -e 'commit [a-zA-Z0-9]*' | wc -l; done ``` 2. 增加代码:373,275行 ```shell $ git log --format='%aN' --since="2021-01-01" --until="2021-12-31" | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done 1039791136 added lines: 202302, removed lines: 15018, total lines: 187284 xuezzzhang added lines: 687, removed lines: 326, total lines: 361 zhangxue added lines: 193719, removed lines: 8374, total lines: 185345 zhangxue01 added lines: 286, removed lines: 1, total lines: 285 ``` 3. 项目代码量 ```shell D:\workspace-2021\spring-boot-example>cloc-1.64.exe D:\workspace-2021\spring-boot-example 2985 text files. 2270 unique files. 5177 files ignored. http://cloc.sourceforge.net v 1.64 T=13.23 s (129.5 files/s, 14284.2 lines/s) ---------------------------------------------------------------------------------------- Language files blank comment code ---------------------------------------------------------------------------------------- Javascript 224 12256 15936 65899 Java 925 9306 9309 36909 HTML 95 1173 1040 8460 XML 257 351 675 5708 Maven 90 339 169 5615 CSS 17 440 405 2433 ColdFusion CFScript 2 208 30 1359 SQL 7 147 75 1328 ColdFusion 12 300 384 1211 Python 16 266 394 987 Perl 8 200 410 969 PHP 9 231 346 817 ASP 8 188 296 702 YAML 22 55 296 437 Velocity Template Language 6 64 67 351 ASP.Net 3 13 4 145 JSP 8 13 0 139 JSON 2 0 0 100 Lua 1 3 22 10 RobotFramework 2 0 0 6 ---------------------------------------------------------------------------------------- SUM: 1714 25553 29858 133585 ---------------------------------------------------------------------------------------- ``` ## 代码统计[2022年] 1.提交次数:89次 ```shell $ git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --since="2022-01-01" --until="2022-12-31" --no-merges | grep -e 'commit [a-zA-Z0-9]*' | wc -l; done ``` 2. 增加代码:223,509行 ```shell $ git log --format='%aN' --since="2022-01-01" --until="2022-12-31" | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done 1039791136@qq.com added lines: 260991, removed lines: 38990, total lines: 222001 xuezzzhang added lines: 2031, removed lines: 523, total lines: 1508 ``` 3. 项目代码量 ```shell D:\workspace\spring-boot-example\lab_0_common\src\main\resources\exe>cloc-1.64.exe D:\workspace\spring-boot-example 4049 text files. 3095 unique files. 4843 files ignored. http://cloc.sourceforge.net v 1.64 T=19.33 s (134.4 files/s, 35871.9 lines/s) ---------------------------------------------------------------------------------------- Language files blank comment code ---------------------------------------------------------------------------------------- Javascript 452 37468 69064 406526 Java 1127 11504 11899 49253 TypeScript 72 2555 36888 13825 HTML 143 1377 1051 10380 XML 411 373 699 8348 Maven 103 405 208 6405 JSON 69 62 0 3405 CSS 20 461 408 2651 Python 25 541 693 2435 SQL 28 316 141 2285 ColdFusion CFScript 2 208 30 1359 ColdFusion 12 300 384 1211 YAML 41 131 432 1042 Perl 8 200 410 969 PHP 9 231 346 817 Bourne Shell 27 165 144 777 ASP 8 188 296 702 Velocity Template Language 6 64 67 351 DOS Batch 11 81 29 176 JSP 10 13 0 164 ASP.Net 3 13 4 145 PowerShell 6 6 30 132 Ant 1 8 2 30 Lua 1 3 22 10 RobotFramework 2 0 0 6 CoffeeScript 1 1 0 0 ---------------------------------------------------------------------------------------- SUM: 2598 56674 123247 513404 ---------------------------------------------------------------------------------------- ``` ## 代码统计[2023年] 1.提交次数:78次 ```shell git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --since="2023-01-01" --until="2023-12-31" --no-merges | grep -e 'commit [a-zA-Z0-9]*' | wc -l; done ``` 2. 增加代码:27W ```shell $ git log --format='%aN' --since="2022-01-01" --until="2022-12-31" | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done 1039791136 added lines: 319251, removed lines: 46086, total lines: 273165 lucksnow added lines: 202, removed lines: 72, total lines: 130 zhangxue07 added lines: 1014, removed lines: 243, total lines: 771 ``` 3. 项目代码量 ```shell D:\workspace\spring-boot-example\lab_0_common\src\main\resources\exe>cloc-1.64.exe D:\workspace\spring-boot-example 5567 text files. 4296 unique files. 7402 files ignored. http://cloc.sourceforge.net v 1.64 T=33.73 s (104.3 files/s, 25345.1 lines/s) ---------------------------------------------------------------------------------------- Language files blank comment code ---------------------------------------------------------------------------------------- Javascript 456 38408 70290 409342 HTML 802 1509 26171 108788 Java 1427 14380 16310 63588 TypeScript 72 2555 36888 13825 CSS 24 642 472 10441 XML 328 435 911 8866 Maven 123 597 365 7742 JSON 80 62 0 4028 Python 25 541 693 2435 SQL 28 316 141 2285 ColdFusion CFScript 2 208 30 1359 ColdFusion 12 300 384 1211 YAML 40 130 464 1071 Perl 8 200 410 969 Bourne Shell 33 179 172 852 PHP 9 231 346 817 ASP 8 188 296 702 Velocity Template Language 6 64 67 351 DOS Batch 12 81 29 177 JSP 10 13 0 164 ASP.Net 3 13 4 145 PowerShell 6 6 30 132 Ant 1 8 2 30 Lua 1 3 22 10 RobotFramework 2 0 0 6 CoffeeScript 1 1 0 0 ---------------------------------------------------------------------------------------- SUM: 3519 61070 154497 639336 ---------------------------------------------------------------------------------------- ```