diff --git a/.gitignore b/.gitignore index d6a7748..ac33853 100755 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,31 @@ -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ -.kotlin +# ----------------------------------------------------------------------------- +# 构建产物和依赖 +# ----------------------------------------------------------------------------- +target/ # Maven 默认的编译输出目录 +**/target/ +!.mvn/wrapper/maven-wrapper.jar # 保留 Maven Wrapper jar 包 +!**/src/main/**/target/ # 排除 src/main 下的 target 目录,但如果上面的 target/ 已经生效,这行可能冗余,但安全起见保留 +!**/src/test/**/target/ # 排除 src/test 下的 target 目录 + +/build/ # Gradle 默认的编译输出目录 +!**/src/main/**/build/ # 排除 src/main 下的 build 目录 +!**/src/test/**/build/ # 排除 src/test 下的 build 目录 +/dist/ # NetBeans / 通用分发目录 +/nbbuild/ +/nbdist/ +/.nb-gradle/ + +# ----------------------------------------------------------------------------- +# IDE 配置文件 +# ----------------------------------------------------------------------------- ### IntelliJ IDEA ### -.idea/modules.xml -.idea/jarRepositories.xml -.idea/compiler.xml +.idea/ # IntelliJ IDEA 配置目录 +# 保留某些重要的 IDEA 文件 (如果需要,但通常 .idea/ 排除足够) +!.idea/modules.xml +!.idea/jarRepositories.xml +!.idea/compiler.xml +# 排除掉不需要的版本控制的文件 .idea/libraries/ *.iws *.iml @@ -24,31 +42,31 @@ target/ ### NetBeans ### /nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ ### VS Code ### .vscode/ -### Mac OS ### -.DS_Store -/.idea/ -/han-note-auth/src/main/resources/application-dev.yml -/han-note-auth/src/main/resources/application-prod.yml -/han-note-auth/logs/ -/logs/ -/han-note-oss/han-note-oss-biz/src/main/resources/application-dev.yml -/han-note-user/han-note-user-biz/src/main/resources/application-dev.yml -/han-note-user/han-note-user-biz/logs/ -/han-note-kv/han-note-kv-biz/src/main/resources/application-dev.yml -/han-note-kv/han-note-kv-biz/src/main/resources/application-prod.yml -/han-note-kv/han-note-kv-biz/logs/ -/han-note-note/han-note-note-biz/src/main/resources/application-dev.yml -/han-note-user-relation/han-note-user-relation-biz/src/main/resources/application-dev.yml -/han-note-user-relation/han-note-user-relation-biz/logs/ -/han-note-count/han-note-count-biz/src/main/resources/application-dev.yml +# ----------------------------------------------------------------------------- +# OS/平台文件 +# ----------------------------------------------------------------------------- +.DS_Store # Mac OS X +# .idea/ (已在 IDEA 部分排除,但 Mac 用户有时会在项目根目录生成一个隐藏的 .idea 文件夹) + +# ----------------------------------------------------------------------------- +# 语言特定文件 +# ----------------------------------------------------------------------------- +.kotlin # Kotlin 缓存文件 + +# ----------------------------------------------------------------------------- +# 自定义应用配置文件和日志 (重点优化部分) +# ----------------------------------------------------------------------------- + +# 排除所有模块的 logs/ 目录 +*/logs/ +# 统一排除所有模块的日志目录(如果上面的 *\/logs/ 不够全面) +logs/ + +# 排除所有 application-dev.yml 和 application-prod.yml +# 这种方式更简洁,排除所有环境的本地配置,统一管理 +application-dev.yml +application-prod.yml diff --git a/.idea/MyBatisCodeHelperDatasource.xml b/.idea/MyBatisCodeHelperDatasource.xml new file mode 100644 index 0000000..c889800 --- /dev/null +++ b/.idea/MyBatisCodeHelperDatasource.xml @@ -0,0 +1,380 @@ + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..0d5519e --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..9cf016d --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,57 @@ + + + + + mysql.8 + true + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://127.0.0.1:3306/han_note?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true + + + + + + $ProjectFileDir$ + + + redis + true + true + jdbc.RedisDriver + jdbc:redis://127.0.0.1:6379/5 + + + + + + $ProjectFileDir$ + + + cassandra + true + true + com.ing.data.cassandra.jdbc.CassandraDriver + jdbc:cassandra://127.0.0.1:9042/hannote + + + + + + $ProjectFileDir$ + + + mysql.8 + true + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://127.0.0.1:3306/leaf?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai + + + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/data_source_mapping.xml b/.idea/data_source_mapping.xml new file mode 100644 index 0000000..a734c44 --- /dev/null +++ b/.idea/data_source_mapping.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dictionaries/project.xml b/.idea/dictionaries/project.xml new file mode 100644 index 0000000..a32c9e6 --- /dev/null +++ b/.idea/dictionaries/project.xml @@ -0,0 +1,15 @@ + + + + asyn + hannote + hanserwei + nacos + operationlog + rustfs + zadd + zrevrangebyscore + zset + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml index 530d611..b80d928 100755 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -9,6 +9,8 @@ + + diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml new file mode 100644 index 0000000..a0fb8bf --- /dev/null +++ b/.idea/sqldialects.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/swagger-settings.xml b/.idea/swagger-settings.xml new file mode 100644 index 0000000..2d089b8 --- /dev/null +++ b/.idea/swagger-settings.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/han-note-data-align/pom.xml b/han-note-data-align/pom.xml new file mode 100644 index 0000000..9431ba1 --- /dev/null +++ b/han-note-data-align/pom.xml @@ -0,0 +1,91 @@ + + 4.0.0 + + + com.hanserwei + han-note + ${revision} + + + + jar + han-note-data-align + ${project.artifactId} + 数据对齐服务 + + + + com.hanserwei + hanserwei-common + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + com.baomidou + mybatis-plus-spring-boot3-starter + + + + + com.mysql + mysql-connector-j + + + + + com.alibaba + druid-spring-boot-3-starter + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.apache.commons + commons-pool2 + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/han-note-data-align/src/main/java/com/hanserwei/hannote/data/align/HannoteDataAlignApplication.java b/han-note-data-align/src/main/java/com/hanserwei/hannote/data/align/HannoteDataAlignApplication.java new file mode 100644 index 0000000..95fc4cb --- /dev/null +++ b/han-note-data-align/src/main/java/com/hanserwei/hannote/data/align/HannoteDataAlignApplication.java @@ -0,0 +1,13 @@ +package com.hanserwei.hannote.data.align; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +@MapperScan("com.hanserwei.hannote.data.align.domain.mapper") +public class HannoteDataAlignApplication { + public static void main(String[] args) { + SpringApplication.run(HannoteDataAlignApplication.class, args); + } +} diff --git a/han-note-data-align/src/main/resources/application.yml b/han-note-data-align/src/main/resources/application.yml new file mode 100644 index 0000000..6eef217 --- /dev/null +++ b/han-note-data-align/src/main/resources/application.yml @@ -0,0 +1,31 @@ +server: + port: 8091 # 项目启动的端口 + +spring: + profiles: + active: dev # 默认激活 dev 本地开发环境 + servlet: + multipart: + max-file-size: 20MB # 单个文件最大大小 + max-request-size: 100MB # 单次请求最大大小(包含多个文件) + data: + redis: + database: 5 # Redis 数据库索引(默认为 0) + host: 127.0.0.1 # Redis 服务器地址 + port: 6379 # Redis 服务器连接端口 + password: redis # Redis 服务器连接密码(默认为空) + timeout: 5s # 读超时时间 + connect-timeout: 5s # 链接超时时间 + lettuce: + pool: + max-active: 200 # 连接池最大连接数 + max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制) + min-idle: 0 # 连接池中的最小空闲连接 + max-idle: 10 # 连接池中的最大空闲连接 +mybatis-plus: + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl + global-config: + banner: false + mapper-locations: classpath*:/mapperxml/*.xml \ No newline at end of file diff --git a/han-note-data-align/src/main/resources/bootstrap.yml b/han-note-data-align/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..735da3b --- /dev/null +++ b/han-note-data-align/src/main/resources/bootstrap.yml @@ -0,0 +1,19 @@ +spring: + application: + name: han-note-data-align # 应用名称 + profiles: + active: dev # 默认激活 dev 本地开发环境 + cloud: + nacos: + discovery: + enabled: true # 启用服务发现 + group: DEFAULT_GROUP # 所属组 + namespace: han-note # 命名空间 + server-addr: 127.0.0.1:8848 # 指定 Nacos 配置中心的服务器地址 + config: + server-addr: http://127.0.0.1:8848 # 指定 Nacos 配置中心的服务器地址 + prefix: ${spring.application.name} # 配置 Data Id 前缀,这里使用应用名称作为前缀 + group: DEFAULT_GROUP # 所属组 + namespace: han-note # 命名空间 + file-extension: yaml # 配置文件格式 + refresh-enabled: true # 是否开启动态刷新 \ No newline at end of file diff --git a/han-note-data-align/src/main/resources/logback-spring.xml b/han-note-data-align/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..60db215 --- /dev/null +++ b/han-note-data-align/src/main/resources/logback-spring.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + ${LOG_FILE}-%i.log + + 30 + + 10MB + + 0 + + false + + + ${LOG_PATTERN} + UTF-8 + + + + + + + 0 + + 256 + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 98df385..d01fbb7 100755 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,7 @@ han-note-note/han-note-note-biz han-note-user-relation han-note-count + han-note-data-align @@ -65,6 +66,7 @@ 2.3.4 5.3.2 0.2.21 + 3.2.0 @@ -292,6 +294,12 @@ buffer-trigger ${buffertrigger.version} + + + com.xuxueli + xxl-job-core + ${xxl-job.version} +