commit afe542010b5001d8e861b177e267cde884e357a0 Author: Leo <98382335+gaoziman@users.noreply.github.com> Date: Sat Jul 5 12:29:03 2025 +0800 初始化项目 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..87b5c37 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml new file mode 100644 index 0000000..7dc1249 --- /dev/null +++ b/.idea/git_toolbox_blame.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..9febb5a --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..a2da2e7 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/coder-common-thin-common/pom.xml b/coder-common-thin-common/pom.xml new file mode 100644 index 0000000..c9b9f04 --- /dev/null +++ b/coder-common-thin-common/pom.xml @@ -0,0 +1,94 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-backend + ${revision} + + + + coder-common-thin-common + coder-common-thin-common + 全局工具类 + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + org.springframework.boot + spring-boot-starter-actuator + + + + eu.bitwalker + UserAgentUtils + + + + org.apache.commons + commons-lang3 + + + + com.alibaba.fastjson2 + fastjson2 + + + + org.projectlombok + lombok + + + + org.slf4j + slf4j-api + + + + joda-time + joda-time + + + + net.dreamlu + mica-ip2region + + + + com.google.guava + guava + + + + cn.hutool + hutool-all + + + + com.baomidou + dynamic-datasource-spring-boot3-starter + + + + cn.dev33 + sa-token-spring-boot3-starter + + + + com.github.whvcse + easy-captcha + + + + \ No newline at end of file diff --git a/coder-common-thin-model/pom.xml b/coder-common-thin-model/pom.xml new file mode 100644 index 0000000..7cb2ce0 --- /dev/null +++ b/coder-common-thin-model/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-backend + ${revision} + + + + coder-common-thin-model + coder-common-thin-model + 实体类模块 + + + + + org.projectlombok + lombok + + + + com.baomidou + mybatis-plus-spring-boot3-starter + + + + org.springframework.boot + spring-boot-starter-validation + + + + + + + + + + org.hibernate.validator + hibernate-validator + + + + com.alibaba + easyexcel + + + + \ No newline at end of file diff --git a/coder-common-thin-modules/coder-common-thin-system/pom.xml b/coder-common-thin-modules/coder-common-thin-system/pom.xml new file mode 100644 index 0000000..ae29af7 --- /dev/null +++ b/coder-common-thin-modules/coder-common-thin-system/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-backend + ${revision} + ../../pom.xml + + + + coder-common-thin-system + coder-common-thin-system + 系统模块 + + + + + org.leocoder.thin + coder-common-thin-common + ${revision} + + + + org.leocoder.thin + coder-common-thin-resultex + ${revision} + + + + org.leocoder.thin + coder-common-thin-sa-token + ${revision} + + + + + + + + + + \ No newline at end of file diff --git a/coder-common-thin-modules/pom.xml b/coder-common-thin-modules/pom.xml new file mode 100644 index 0000000..6d03398 --- /dev/null +++ b/coder-common-thin-modules/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-backend + ${revision} + + + + coder-common-thin-modules + pom + 业务模块 + + + + coder-common-thin-system + + + \ No newline at end of file diff --git a/coder-common-thin-mybatisplus/pom.xml b/coder-common-thin-mybatisplus/pom.xml new file mode 100644 index 0000000..000d44d --- /dev/null +++ b/coder-common-thin-mybatisplus/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-backend + ${revision} + + + + coder-mybatis-plus + coder-common-thin-mybatisplus + MybatisPlus插件 + + + + + org.leocoder.thin + coder-common-thin-model + ${revision} + + + + com.mysql + mysql-connector-j + + + + com.baomidou + mybatis-plus-spring-boot3-starter + + + + com.baomidou + mybatis-plus-jsqlparser + + + + p6spy + p6spy + + + + \ No newline at end of file diff --git a/coder-common-thin-plugins/coder-common-thin-resultex/pom.xml b/coder-common-thin-plugins/coder-common-thin-resultex/pom.xml new file mode 100644 index 0000000..18639a4 --- /dev/null +++ b/coder-common-thin-plugins/coder-common-thin-resultex/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-plugins + ${revision} + + + + coder-common-thin-resultex + coder-common-thin-resultex + 全局统一返回 和 全局异常类 + + + + + org.leocoder.thin + coder-common-thin-model + ${revision} + + + + org.leocoder.thin + coder-common-thin-mybatisplus + ${revision} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cn.dev33 + sa-token-spring-boot3-starter + + + + \ No newline at end of file diff --git a/coder-common-thin-plugins/coder-common-thin-sa-token/pom.xml b/coder-common-thin-plugins/coder-common-thin-sa-token/pom.xml new file mode 100644 index 0000000..86fd42e --- /dev/null +++ b/coder-common-thin-plugins/coder-common-thin-sa-token/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-plugins + ${revision} + + + + coder-common-thin-sa-token + coder-common-thin-sa-token + Sa-Token模块 + + + + + org.leocoder.thin + coder-common-thin-common + ${revision} + + + + org.leocoder.thin + coder-common-thin-mybatisplus + ${revision} + + + + org.springframework.boot + spring-boot-starter-aop + + + + cn.dev33 + sa-token-spring-boot3-starter + + + + cn.dev33 + sa-token-redis-jackson + + + + + org.apache.commons + commons-pool2 + + + + cn.dev33 + sa-token-spring-aop + + + + \ No newline at end of file diff --git a/coder-common-thin-plugins/pom.xml b/coder-common-thin-plugins/pom.xml new file mode 100644 index 0000000..d8dd6b0 --- /dev/null +++ b/coder-common-thin-plugins/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-backend + ${revision} + + + + coder-common-thin-plugins + pom + 插件模块 + + + coder-common-thin-resultex + coder-common-thin-sa-token + + + \ No newline at end of file diff --git a/coder-common-thin-web/pom.xml b/coder-common-thin-web/pom.xml new file mode 100644 index 0000000..b9d7ec4 --- /dev/null +++ b/coder-common-thin-web/pom.xml @@ -0,0 +1,88 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-backend + ${revision} + + + + coder-common-thin-web + coder-common-thin-web + 入口项目,负责打包 + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.leocoder.thin + coder-common-thin-system + ${revision} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + coder-admin + + + org.springframework.boot + spring-boot-maven-plugin + ${springboot.version} + + + + repackage + + + + + + + + src/main/java + + **/*.xml + + + + src/main/resources + + **/* + + + + + + \ No newline at end of file diff --git a/coder-common-thin-web/src/main/java/org/leocoder/thin/web/CoderApplication.java b/coder-common-thin-web/src/main/java/org/leocoder/thin/web/CoderApplication.java new file mode 100644 index 0000000..04dc9c7 --- /dev/null +++ b/coder-common-thin-web/src/main/java/org/leocoder/thin/web/CoderApplication.java @@ -0,0 +1,43 @@ +package org.leocoder.thin.web; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * @author : Leocoder + * @version 1.0 + * @date 2025-06-28 14:05 + * @description : 开头的注解是一个插件插入的开关,如果不是相同目录级别的可以使用这个进行跨包! + */ +// @EnableCoderSaToken +// @EnableCoderEasyExcel +// @EnableCoderDesensitize +// @EnableCoderRepeatSubmit +// @EnableCoderLimit +// @EnableMybatisPlus +// @EnableResultEx +// @EnableOperLog +// @EnableCoderDict +@EnableScheduling +@Slf4j +@SpringBootApplication(scanBasePackages = "org.leocoder.thin") +public class CoderApplication { + public static void main(String[] args) { + /* 注意:注入依赖三种选择:@Autowired(required = false) OR @Resource[推荐] OR @RequiredArgsConstructor[推荐] */ + SpringApplication.run(CoderApplication.class, args); + log.info( + "\n" + + "Coder-Admin管理平台starter =>ヽ(✿゚▽゚)ノ \n" + + "超级无敌宇宙最强最帅最可爱系统启动成功(๑‾ ꇴ ‾๑) \n" + + " ____ __. .__ _____ ________ _____ .___ _______ \n" + + "| |/ _|____ |__| / _ \\ \\______ \\ / \\ | |\\ \\ \n" + + "| < / _ \\| | ______ / /_\\ \\ | | \\ / \\ / \\| |/ | \\ \n" + + "| | ( <_> ) | /_____/ / | \\| ` \\/ Y \\ / | \\ \n" + + "|____|__ \\____/|__| \\____|__ /_______ /\\____|__ /___\\____|__ / \n" + + " \\/ \\/ \\/ \\/ \\/ \n" + + "CoderApplication[18088] => 闪亮登场(๑•̀ㅂ•́) ✧" + ); + } +} diff --git a/coder-common-thin-web/src/main/resources/application-dev.yml b/coder-common-thin-web/src/main/resources/application-dev.yml new file mode 100755 index 0000000..31619e3 --- /dev/null +++ b/coder-common-thin-web/src/main/resources/application-dev.yml @@ -0,0 +1,79 @@ +spring: + datasource: + type: com.zaxxer.hikari.HikariDataSource + hikari: + # 连接池名字 + pool-name: CORDER-HIKARI-DEV + # 最大连接池数量 + maximum-pool-size: 20 + # 最小空闲线程数量 + minimum-idle: 10 + # 配置获取连接等待超时的时间 + connectionTimeout: 30000 + # 校验超时时间 + validationTimeout: 5000 + # 空闲连接存活最大时间,默认10分钟 + idleTimeout: 600000 + # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟 + maxLifetime: 1800000 + # 连接测试query[配置检测连接是否有效] + connectionTestQuery: SELECT 1 + # 多久检查一次连接的活性 + keepaliveTime: 30000 + dynamic: + # 性能分析插件[有性能损耗,不建议生产环境使用] + p6spy: true + # 默认数据源[master] + primary: master + # 严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源 + strict: false + datasource: + # 主库数据源 + master: # 没有@DS,默认数据源 + type: ${spring.datasource.type} + url: jdbc:mysql://localhost:3306/coder-common-thin?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: coder + # 从库数据源 + slave: # @DS("dsName"),dsName可以为组名也可以为具体某个库的名称,使用多数据源遵循格式,注解都在mapper层使用。 + lazy: true + type: ${spring.datasource.type} + url: jdbc:mysql://localhost:3306/coder-common-thin-backup?serverTimezone=GMT%2b8&useUnicode=true&characterEncoding=utf-8&useSSL=false&rewriteBatchedStatements=true + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: coder + # redis配置 + data: + redis: + # 地址 + host: localhost + # 端口,默认为6379 + port: 16379 + # 数据库索引 + database: 0 + # 密码[若没有密码请注释掉,若有账号密码:则 账号:密码] + password: coder + # 连接超时时间 + timeout: 10s + # 是否开启ssl + ssl.enabled: false + +# 项目配置 +coder: + # 名称 + projectName: CORDER-ADMIN-THIN + # 版本 + projectVersion: 1.0.0 + # 文件路径 示例[Windows配置D:/CoderFile,Linux配置 /usr/local/CoderFile] + filePath: /Users/leocoder/leocoder/develop/templates/coder-common-thin/coder-common-thin-backend/picture + # 全局限流 + globalLimit: + # 是否开启全局限流 + enabled: false + # 默认限流时间[秒] + time: 1 + # 默认限流次数 + count: 12 + # 是否封禁IP + ban: false diff --git a/coder-common-thin-web/src/main/resources/application.yml b/coder-common-thin-web/src/main/resources/application.yml new file mode 100755 index 0000000..beb2536 --- /dev/null +++ b/coder-common-thin-web/src/main/resources/application.yml @@ -0,0 +1,177 @@ +server: + port: ${port:18099} + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # Tomcat默认限制文件上传的大小是2MB ,超过就不会被捕获,需要调整大一点或者-1不限制 + max-swallow-size: -1 + # 不限制POST提交请求的数据大小,默认是2MB + max-http-form-post-size: -1 + # 连接数满后的排队数,默认为100 + accept-count: 1000 + threads: + # tomcat最大线程数,默认为200 + max: 800 + # Tomcat启动初始化的线程数,默认值10 + min-spare: 100 + # 开启GZIP压缩,利于你静态资源传输,提升网站请求响应速度 + compression: + enabled: true + min-response-size: 1024 + # 默认是8k + max-http-request-header-size: 80KB +spring: + messages: + encoding: UTF-8 + basename: i18n/messages + profiles: + active: dev + +# 操作日志配置 +coder: + oper-log: + # 异步线程池配置 + async: + core-pool-size: 2 + max-pool-size: 5 + queue-capacity: 1000 + keep-alive-seconds: 60 + # 日志清理配置 + clean: + enabled: true + days: 90 + cron: "0 0 2 * * ?" + # 参数记录配置 + param: + max-length: 2000 + exclude-fields: + - password + - pwd + - oldPassword + - newPassword + - confirmPassword + # 结果记录配置 + result: + max-length: 2000 + exclude-large-result: true + + # 解决时间的保存及显示错误问题[实体中就无需再额外注解] + jackson: + date-format: yyyy-MM-dd HH:mm:ss + locale: zh_CN + # 解决java中时间是对的,序列化后到前端差8小时 + time-zone: GMT+8 + default-property-inclusion: non_null + mvc: + # 解决时间的保存及显示错误问题[实体中就无需再额外注解] + format: + date: yyyy-MM-dd HH:mm:ss + main: # SpringBootv2.6.3中,做了循环应用的检查,默认情况下,如果类中存在有循环引用的情况,就会报上面的错误 + allow-circular-references: true + application: + name: coder-web + servlet: + multipart: + enabled: true + # 是单个文件大小 默认1M 10KB + max-file-size: 10MB + # 是设置总上传的数据大小 + max-request-size: 20MB + freemarker: + # 指定HttpServletRequest的属性是否可以覆盖controller的model的同名项 + allow-request-override: false + # req访问request + request-context-attribute: request + # 后缀名freemarker默认后缀为.ftl,当然你也可以改成自己习惯的.html + suffix: .html + # 设置响应的内容类型 + content-type: text/html;charset=utf-8 + # 是否允许mvc使用freemarker + enabled: true + # 是否开启template caching + cache: false + # 检查模板位置是否存在 + check-template-location: true + # 设定模板的加载路径,多个以逗号分隔,默认: [“classpath:/templates/”] + template-loader-path: classpath:/templates/,classpath:/templates/**/ + # 设定Template的编码 + charset: UTF-8 + settings: + template_update_delay: 0 # 检查模板更新延迟时间,设置为0表示立即检查,如果时间大于0会有缓存不方便进行模板测试 + tag_syntax: auto_detect + default_encoding: UTF-8 + output_encoding: UTF-8 + locale: zh_CN + date_format: yyyy-MM-dd + time_format: HH:mm:ss + boolean_format: true,false + whitespace_stripping: true + url_escaping_charset: UTF-8 + datetime_format: yyyy/MM/dd HH:mm:ss + number_format: 0.## + classic_compatible: true + # ignore,debug,html_debug,rethrow + template_exception_handler: rethrow + prefer-file-system-access: false + +# mybatis-plus配置 +mybatis-plus: + mapper-locations: classpath*:mapper/**/*.xml,mapper/*.xml + configuration: + # MybatisPlus配置中设置将sql日志和结果集输出到控制台,会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl + # 关闭日志记录[单纯使用 p6spy 分析] org.apache.ibatis.logging.nologging.NoLoggingImpl + # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl + log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl + global-config: + # 是否打印 Logo banner + banner: true + dbConfig: + # 主键类型 + # AUTO[自增] NONE[空] INPUT[用户输入] ASSIGN_ID[雪花] ASSIGN_UUID[唯一] UUID[UUID] + idType: ASSIGN_ID + # 逻辑已删除值[框架表均使用此值 禁止随意修改] + logicDeleteValue: 0 + # 逻辑未删除值 + logicNotDeleteValue: 1 + insertStrategy: NOT_NULL + updateStrategy: NOT_NULL + whereStrategy: NOT_NULL +############## Sa-Token 配置 [文档: https://sa-token.cc] ############## +# 1、被顶下线旧的token为何还存在? 如果还是用旧token来请求,就会返回你已被顶下线 +# 2、前后端分离模式记录的sa-session存在哪个地方? 会存在Redis中 +# 3、前后端分离模式,退出时,前后端模式获取到token的值只从前端传递过来headers中拿(yml中进行配置的,如下方所示) +# 然后StpUtil.logout();自动根据Headers的Authorization获取值,进行从redis中删除token +# 是否尝试从header里读取token,Header用来获取客户端使用的操作系统和浏览器名称和版本和token,前端将token怎么存储的需要跟yml下方中配置的保持一致 +# is-read-header: true +# 是否尝试从cookie里读取token +# is-read-cookie: false +# 是否尝试从请求体里读取token +# is-read-body: false +# StpUtil.getLoginIdAsString() 使用这种Sa-Token封装的方法必须携带token +sa-token: + # token名称 [同时也是cookie名称,推荐使用] + token-name: Authorization + # token 前缀 + token-prefix: Bearer + # token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik) + token-style: tik + # token有效期,单位s 默认30天, -1代表永不过期(10800[3小时]后端生成的 token,即使用户一直操作,在 30 天后一定会过期,要求用户重新登录) + timeout: -1 + # token 最低活跃频率[单位:秒],如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结 3600 + active-timeout: -1 + # 自动续签,指定时间内有操作,则会自动续签 + auto-renew: true + # 是否尝试从cookie里读取token + is-read-cookie: false + # 是否尝试从header里读取token + is-read-header: true + # 是否允许同一账号多地同时登录[为 true 时允许一起登录, 为 false 时新登录挤掉旧登录] + is-concurrent: true + # 在多人登录同一账号时,是否共用一个 token[为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token] + is-share: false + # 是否在初始化配置时打印版本字符画 + is-print: true + # 是否输出操作日志 + is-log: true + + diff --git a/coder-common-thin-web/src/main/resources/logback-spring-hour.xml b/coder-common-thin-web/src/main/resources/logback-spring-hour.xml new file mode 100755 index 0000000..b1997c6 --- /dev/null +++ b/coder-common-thin-web/src/main/resources/logback-spring-hour.xml @@ -0,0 +1,60 @@ + + + + coder-common-thin-logback + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + UTF-8 + + + + + + INFO + + + ERROR + + + WARN + + + + ${CORDER_ADMIN_LOGS}/%d{yyyy-MM-dd_HH}.log + 30 + + + + + + UTF-8 + [[TraceId: %X{traceId}]%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %-5level %logger{36} : %msg%n + + + + + + + + + + + + + + + + + diff --git a/coder-common-thin-web/src/main/resources/logback-spring-part.xml b/coder-common-thin-web/src/main/resources/logback-spring-part.xml new file mode 100755 index 0000000..1fb0a50 --- /dev/null +++ b/coder-common-thin-web/src/main/resources/logback-spring-part.xml @@ -0,0 +1,101 @@ + + + + + + coder-common-thin-logback + + + + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + INFO + + + ${CORDER_ADMIN_LOGS}/info/%d{yyyy-MM-dd}/%d{HH}.log + + + 100MB + + 30 + + 10GB + + + UTF-8 + [[TraceId: %X{traceId}]%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %-5level %logger{36} : %msg%n + + + + + + + + + ERROR + + + ${CORDER_ADMIN_LOGS}/error/%d{yyyy-MM-dd}/%d{HH}.log + + + 100MB + + 30 + + 10GB + + + UTF-8 + [[TraceId: %X{traceId}]%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %-5level %logger{36} : %msg%n + + + + + + + + + + + + + + + + + + + + + + diff --git a/coder-common-thin-web/src/main/resources/logback-spring.xml b/coder-common-thin-web/src/main/resources/logback-spring.xml new file mode 100755 index 0000000..49c737e --- /dev/null +++ b/coder-common-thin-web/src/main/resources/logback-spring.xml @@ -0,0 +1,64 @@ + + + + coder-common-thin-logback + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + UTF-8 + + + + + + INFO + + + ERROR + + + WARN + + + + ${CORDER_ADMIN_LOGS}/%d{yyyy-MM-dd}.log + 30 + + + + + + + + + + UTF-8 + [[TraceId: %X{traceId}]%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %-5level %logger{36} : %msg%n + + + + + + + + + + + + + + + + + diff --git a/logs/2025-07-05.log b/logs/2025-07-05.log new file mode 100644 index 0000000..1f5d8a1 --- /dev/null +++ b/logs/2025-07-05.log @@ -0,0 +1,88 @@ +[[TraceId: ]2025-07-05 12:26:15.487] [background-preinit] INFO o.h.validator.internal.util.Version : HV000001: Hibernate Validator 9.0.0.Final +[[TraceId: ]2025-07-05 12:26:15.509] [main] INFO o.leocoder.thin.web.CoderApplication : Starting CoderApplication using Java 17.0.13 with PID 87212 (/Users/leocoder/leocoder/develop/templates/coder-common-thin/coder-common-thin-backend/coder-common-thin-web/target/classes started by leocoder in /Users/leocoder/leocoder/develop/templates/coder-common-thin/coder-common-thin-backend) +[[TraceId: ]2025-07-05 12:26:15.509] [main] INFO o.leocoder.thin.web.CoderApplication : The following 1 profile is active: "dev" +[[TraceId: ]2025-07-05 12:26:16.046] [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode +[[TraceId: ]2025-07-05 12:26:16.048] [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode. +[[TraceId: ]2025-07-05 12:26:16.059] [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 2 ms. Found 0 Redis repository interfaces. +[[TraceId: ]2025-07-05 12:26:16.110] [main] WARN o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[org.leocoder.thin.web]' package. Please check your configuration. +[[TraceId: ]2025-07-05 12:26:16.293] [main] WARN o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker : Bean 'cn.dev33.satoken.aop.SaAopPointcutAdvisorBeanRegister' of type [cn.dev33.satoken.aop.SaAopPointcutAdvisorBeanRegister$$SpringCGLIB$$0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [meterRegistryPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE. +[[TraceId: ]2025-07-05 12:26:16.301] [main] WARN o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker : Bean 'saAroundAnnotationHandlePointcutAdvisor' of type [cn.dev33.satoken.aop.SaAroundAnnotationPointcutAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [meterRegistryPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE. +[[TraceId: ]2025-07-05 12:26:16.536] [main] INFO o.s.b.w.e.tomcat.TomcatWebServer : Tomcat initialized with port 18099 (http) +[[TraceId: ]2025-07-05 12:26:16.545] [main] INFO o.a.coyote.http11.Http11NioProtocol : Initializing ProtocolHandler ["http-nio-18099"] +[[TraceId: ]2025-07-05 12:26:16.546] [main] INFO o.a.catalina.core.StandardService : Starting service [Tomcat] +[[TraceId: ]2025-07-05 12:26:16.546] [main] INFO o.a.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.41] +[[TraceId: ]2025-07-05 12:26:16.577] [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +[[TraceId: ]2025-07-05 12:26:16.578] [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1044 ms +[[TraceId: ]2025-07-05 12:26:17.114] [main] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource detect P6SPY plugin and enabled it +[[TraceId: ]2025-07-05 12:26:17.121] [main] INFO com.zaxxer.hikari.HikariDataSource : master - Starting... +[[TraceId: ]2025-07-05 12:26:17.228] [main] INFO com.zaxxer.hikari.pool.HikariPool : master - Added connection com.mysql.cj.jdbc.ConnectionImpl@6a4f7c17 +[[TraceId: ]2025-07-05 12:26:17.229] [main] INFO com.zaxxer.hikari.HikariDataSource : master - Start completed. +[[TraceId: ]2025-07-05 12:26:17.230] [main] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource - add a datasource named [slave] success +[[TraceId: ]2025-07-05 12:26:17.230] [main] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource - add a datasource named [master] success +[[TraceId: ]2025-07-05 12:26:17.230] [main] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource initial loaded [2] datasource,primary datasource named [master] +[[TraceId: ]2025-07-05 12:26:17.298] [main] INFO c.b.m.e.s.MybatisPlusApplicationContextAware : Register ApplicationContext instances org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@4c432866 +[[TraceId: ]2025-07-05 12:26:17.665] [main] INFO o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint beneath base path '/actuator' +[[TraceId: ]2025-07-05 12:26:17.710] [main] INFO o.a.coyote.http11.Http11NioProtocol : Starting ProtocolHandler ["http-nio-18099"] +[[TraceId: ]2025-07-05 12:26:17.725] [main] INFO o.s.b.w.e.tomcat.TomcatWebServer : Tomcat started on port 18099 (http) with context path '/' +[[TraceId: ]2025-07-05 12:26:17.737] [main] INFO o.leocoder.thin.web.CoderApplication : Started CoderApplication in 2.582 seconds (process running for 3.154) +[[TraceId: ]2025-07-05 12:26:17.741] [main] INFO o.leocoder.thin.web.CoderApplication : +Coder-Admin管理平台starter =>ヽ(✿゚▽゚)ノ +超级无敌宇宙最强最帅最可爱系统启动成功(๑‾ ꇴ ‾๑) + ____ __. .__ _____ ________ _____ .___ _______ +| |/ _|____ |__| / _ \ \______ \ / \ | |\ \ +| < / _ \| | ______ / /_\ \ | | \ / \ / \| |/ | \ +| | ( <_> ) | /_____/ / | \| ` \/ Y \ / | \ +|____|__ \____/|__| \____|__ /_______ /\____|__ /___\____|__ / + \/ \/ \/ \/ \/ +CoderApplication[18088] => 闪亮登场(๑•̀ㅂ•́) ✧ +[[TraceId: ]2025-07-05 12:26:18.238] [RMI TCP Connection(2)-192.168.86.9] INFO o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' +[[TraceId: ]2025-07-05 12:26:18.238] [RMI TCP Connection(2)-192.168.86.9] INFO o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' +[[TraceId: ]2025-07-05 12:26:18.239] [RMI TCP Connection(2)-192.168.86.9] INFO o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms +[[TraceId: ]2025-07-05 12:27:02.694] [SpringApplicationShutdownHook] INFO o.s.b.w.e.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete +[[TraceId: ]2025-07-05 12:27:04.707] [tomcat-shutdown] INFO o.s.b.w.e.tomcat.GracefulShutdown : Graceful shutdown complete +[[TraceId: ]2025-07-05 12:27:04.720] [SpringApplicationShutdownHook] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource start closing .... +[[TraceId: ]2025-07-05 12:27:04.722] [SpringApplicationShutdownHook] INFO c.b.d.d.d.DefaultDataSourceDestroyer : dynamic-datasource close the datasource named [slave] success, +[[TraceId: ]2025-07-05 12:27:04.722] [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource : master - Shutdown initiated... +[[TraceId: ]2025-07-05 12:27:04.729] [SpringApplicationShutdownHook] INFO com.zaxxer.hikari.HikariDataSource : master - Shutdown completed. +[[TraceId: ]2025-07-05 12:27:04.729] [SpringApplicationShutdownHook] INFO c.b.d.d.d.DefaultDataSourceDestroyer : dynamic-datasource close the datasource named [master] success, +[[TraceId: ]2025-07-05 12:27:04.729] [SpringApplicationShutdownHook] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource all closed success,bye +[[TraceId: ]2025-07-05 12:27:06.855] [background-preinit] INFO o.h.validator.internal.util.Version : HV000001: Hibernate Validator 9.0.0.Final +[[TraceId: ]2025-07-05 12:27:06.891] [main] INFO o.leocoder.thin.web.CoderApplication : Starting CoderApplication using Java 17.0.13 with PID 87235 (/Users/leocoder/leocoder/develop/templates/coder-common-thin/coder-common-thin-backend/coder-common-thin-web/target/classes started by leocoder in /Users/leocoder/leocoder/develop/templates/coder-common-thin/coder-common-thin-backend) +[[TraceId: ]2025-07-05 12:27:06.892] [main] INFO o.leocoder.thin.web.CoderApplication : The following 1 profile is active: "dev" +[[TraceId: ]2025-07-05 12:27:07.433] [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode +[[TraceId: ]2025-07-05 12:27:07.434] [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode. +[[TraceId: ]2025-07-05 12:27:07.445] [main] INFO o.s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 2 ms. Found 0 Redis repository interfaces. +[[TraceId: ]2025-07-05 12:27:07.495] [main] WARN o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[org.leocoder.thin.web]' package. Please check your configuration. +[[TraceId: ]2025-07-05 12:27:07.676] [main] WARN o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker : Bean 'cn.dev33.satoken.aop.SaAopPointcutAdvisorBeanRegister' of type [cn.dev33.satoken.aop.SaAopPointcutAdvisorBeanRegister$$SpringCGLIB$$0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [meterRegistryPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE. +[[TraceId: ]2025-07-05 12:27:07.685] [main] WARN o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker : Bean 'saAroundAnnotationHandlePointcutAdvisor' of type [cn.dev33.satoken.aop.SaAroundAnnotationPointcutAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected/applied to a currently created BeanPostProcessor [meterRegistryPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE. +[[TraceId: ]2025-07-05 12:27:07.925] [main] INFO o.s.b.w.e.tomcat.TomcatWebServer : Tomcat initialized with port 18099 (http) +[[TraceId: ]2025-07-05 12:27:07.935] [main] INFO o.a.coyote.http11.Http11NioProtocol : Initializing ProtocolHandler ["http-nio-18099"] +[[TraceId: ]2025-07-05 12:27:07.936] [main] INFO o.a.catalina.core.StandardService : Starting service [Tomcat] +[[TraceId: ]2025-07-05 12:27:07.937] [main] INFO o.a.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.41] +[[TraceId: ]2025-07-05 12:27:07.969] [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +[[TraceId: ]2025-07-05 12:27:07.970] [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1057 ms +[[TraceId: ]2025-07-05 12:27:08.525] [main] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource detect P6SPY plugin and enabled it +[[TraceId: ]2025-07-05 12:27:08.532] [main] INFO com.zaxxer.hikari.HikariDataSource : master - Starting... +[[TraceId: ]2025-07-05 12:27:08.641] [main] INFO com.zaxxer.hikari.pool.HikariPool : master - Added connection com.mysql.cj.jdbc.ConnectionImpl@6a4f7c17 +[[TraceId: ]2025-07-05 12:27:08.642] [main] INFO com.zaxxer.hikari.HikariDataSource : master - Start completed. +[[TraceId: ]2025-07-05 12:27:08.643] [main] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource - add a datasource named [slave] success +[[TraceId: ]2025-07-05 12:27:08.643] [main] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource - add a datasource named [master] success +[[TraceId: ]2025-07-05 12:27:08.644] [main] INFO c.b.d.d.DynamicRoutingDataSource : dynamic-datasource initial loaded [2] datasource,primary datasource named [master] +[[TraceId: ]2025-07-05 12:27:08.713] [main] INFO c.b.m.e.s.MybatisPlusApplicationContextAware : Register ApplicationContext instances org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@4c432866 +[[TraceId: ]2025-07-05 12:27:09.079] [main] INFO o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint beneath base path '/actuator' +[[TraceId: ]2025-07-05 12:27:09.128] [main] INFO o.a.coyote.http11.Http11NioProtocol : Starting ProtocolHandler ["http-nio-18099"] +[[TraceId: ]2025-07-05 12:27:09.145] [main] INFO o.s.b.w.e.tomcat.TomcatWebServer : Tomcat started on port 18099 (http) with context path '/' +[[TraceId: ]2025-07-05 12:27:09.160] [main] INFO o.leocoder.thin.web.CoderApplication : Started CoderApplication in 2.62 seconds (process running for 3.133) +[[TraceId: ]2025-07-05 12:27:09.164] [main] INFO o.leocoder.thin.web.CoderApplication : +Coder-Admin管理平台starter =>ヽ(✿゚▽゚)ノ +超级无敌宇宙最强最帅最可爱系统启动成功(๑‾ ꇴ ‾๑) + ____ __. .__ _____ ________ _____ .___ _______ +| |/ _|____ |__| / _ \ \______ \ / \ | |\ \ +| < / _ \| | ______ / /_\ \ | | \ / \ / \| |/ | \ +| | ( <_> ) | /_____/ / | \| ` \/ Y \ / | \ +|____|__ \____/|__| \____|__ /_______ /\____|__ /___\____|__ / + \/ \/ \/ \/ \/ +CoderApplication[18088] => 闪亮登场(๑•̀ㅂ•́) ✧ +[[TraceId: ]2025-07-05 12:27:09.600] [RMI TCP Connection(1)-192.168.86.9] INFO o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' +[[TraceId: ]2025-07-05 12:27:09.600] [RMI TCP Connection(1)-192.168.86.9] INFO o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' +[[TraceId: ]2025-07-05 12:27:09.601] [RMI TCP Connection(1)-192.168.86.9] INFO o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..739221f --- /dev/null +++ b/pom.xml @@ -0,0 +1,273 @@ + + + 4.0.0 + + org.leocoder.thin + coder-common-thin-backend + ${revision} + + + + coder-common-thin-backend + pom + 父模块 + + coder-common-thin-web + coder-common-thin-mybatisplus + coder-common-thin-modules + coder-common-thin-plugins + coder-common-thin-model + coder-common-thin-common + + + + + UTF-8 + UTF-8 + 17 + 17 + 1.0.0 + 17 + 3.5.0 + 1.18.38 + 9.3.0 + 3.0.4 + 3.5.12 + 3.9.1 + 4.3.1 + 1.43.0 + 5.8.38 + 2.0.57 + 3.17.0 + 6.8.1 + 33.4.8-jre + 3.4.5 + 4.0.3 + 1.21 + 2.12.1 + 9.0.0.Final + 2.14.0 + 1.6.2 + 2.3.34 + + + 3.14.0 + 3.3.1 + + + + + + + org.springframework.boot + spring-boot-dependencies + ${springboot.version} + import + pom + + + + org.projectlombok + lombok + ${lombok.version} + + + + com.mysql + mysql-connector-j + ${mysql.version} + + + + org.mybatis + mybatis-spring + ${mybatis.version} + + + + com.baomidou + mybatis-plus-spring-boot3-starter + ${mybatisplus.version} + + + + com.baomidou + mybatis-plus-jsqlparser + ${mybatisplus.version} + + + + p6spy + p6spy + ${p6spy.version} + + + + com.baomidou + dynamic-datasource-spring-boot3-starter + ${dynamic.version} + + + + cn.hutool + hutool-all + ${hutool.version} + + + + com.alibaba.fastjson2 + fastjson2 + ${fastjson2.version} + + + + + org.apache.commons + commons-lang3 + ${lang3.version} + + + + org.hibernate.validator + hibernate-validator + ${validator.version} + + + + joda-time + joda-time + ${jodaTime.version} + + + + eu.bitwalker + UserAgentUtils + ${UserAgentUtils.version} + + + + + com.github.oshi + oshi-core + ${oshi.version} + + + + + com.google.guava + guava + ${guava.version} + + + + net.dreamlu + mica-ip2region + ${ip2region.version} + + + + com.alibaba + easyexcel + ${easyexcel.version} + + + + cn.dev33 + sa-token-spring-boot3-starter + ${satoken.version} + + + + cn.dev33 + sa-token-redis-jackson + ${satoken.version} + + + + + org.apache.commons + commons-pool2 + ${pool2.version} + + + + cn.dev33 + sa-token-spring-aop + ${satoken.version} + + + + com.github.whvcse + easy-captcha + ${captcha.version} + + + + org.freemarker + freemarker + ${freemarker.version} + + + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${springboot.version} + + + + org.projectlombok + lombok + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.verison} + + true + ${java.version} + ${java.version} + + + org.projectlombok + lombok + ${lombok.version} + + + + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + + + + + src/main/java + + **/*.xml + + + + src/main/resources + + **/* + + + + + + \ No newline at end of file