feat(data-align): 初始化数据对齐模块

- 添加 han-note-data-align 模块基础结构
- 配置 application.yml 和 bootstrap.yml 文件
- 设置 MyBatis Plus 和 Redis 配置
- 集成 Nacos 服务发现与配置中心
- 添加日志配置文件 logback-spring.xml
- 创建数据源和 MyBatis 相关 IDEA 配置文件- 更新 .gitignore 排除特定开发环境配置和日志文件
- 配置 IntelliJ IDEA 编译器和编码设置
This commit is contained in:
2025-10-19 20:01:31 +08:00
parent 7fc24e1e2a
commit 023d0c0926
16 changed files with 819 additions and 32 deletions

82
.gitignore vendored
View File

@@ -1,13 +1,31 @@
target/ # -----------------------------------------------------------------------------
!.mvn/wrapper/maven-wrapper.jar # 构建产物和依赖
!**/src/main/**/target/ # -----------------------------------------------------------------------------
!**/src/test/**/target/ target/ # Maven 默认的编译输出目录
.kotlin **/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 ### ### IntelliJ IDEA ###
.idea/modules.xml .idea/ # IntelliJ IDEA 配置目录
.idea/jarRepositories.xml # 保留某些重要的 IDEA 文件 (如果需要,但通常 .idea/ 排除足够)
.idea/compiler.xml !.idea/modules.xml
!.idea/jarRepositories.xml
!.idea/compiler.xml
# 排除掉不需要的版本控制的文件
.idea/libraries/ .idea/libraries/
*.iws *.iws
*.iml *.iml
@@ -24,31 +42,31 @@ target/
### NetBeans ### ### NetBeans ###
/nbproject/private/ /nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ### ### VS Code ###
.vscode/ .vscode/
### Mac OS ### # -----------------------------------------------------------------------------
.DS_Store # OS/平台文件
/.idea/ # -----------------------------------------------------------------------------
/han-note-auth/src/main/resources/application-dev.yml .DS_Store # Mac OS X
/han-note-auth/src/main/resources/application-prod.yml # .idea/ (已在 IDEA 部分排除,但 Mac 用户有时会在项目根目录生成一个隐藏的 .idea 文件夹)
/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/ .kotlin # Kotlin 缓存文件
/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/ # 排除所有模块的 logs/ 目录
/han-note-count/han-note-count-biz/src/main/resources/application-dev.yml */logs/
# 统一排除所有模块的日志目录(如果上面的 *\/logs/ 不够全面)
logs/
# 排除所有 application-dev.yml 和 application-prod.yml
# 这种方式更简洁,排除所有环境的本地配置,统一管理
application-dev.yml
application-prod.yml

380
.idea/MyBatisCodeHelperDatasource.xml generated Normal file
View File

@@ -0,0 +1,380 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MyBatisCodeHelperDatasource">
<option name="projectProfile">
<ProjectProfile>
<option name="controllerTemplateString" value="&#10;#* @vtlvariable name=&quot;tableName&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;entityPackageName&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;entityClassName&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;servicePackageName&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;serviceInterfacePackage&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;serviceClassName&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;serviceInterfaceClassName&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;mapperPackageName&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;mapperClassName&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;controllerPackage&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;tableRemark&quot; type=&quot;java.lang.String&quot; *#&#10;#* @vtlvariable name=&quot;myDate&quot; type=&quot;java.util.Date&quot; *#&#10;#* @vtlvariable name=&quot;simpleDateFormat&quot; type=&quot;java.text.SimpleDateFormat&quot; *#&#10;package $!{controllerPackage};&#10;import $!{entityPackageName}.$!{entityClassName};&#10;###set($realServiceName = $!{serviceClassName}+'Impl')&#10;import $!{servicePackageName}.$!{serviceClassName};&#10;import org.springframework.web.bind.annotation.*;&#10;&#10;#set($serviceFirstLower = $!{serviceClassName.substring(0,1).toLowerCase()}+$!{serviceClassName.substring(1,$!{serviceClassName.length()})})&#10;import org.springframework.beans.factory.annotation.Autowired;&#10;&#10;/**&#10;* $!{tableRemark}($!{tableName})表控制层&#10;*&#10;* @author xxxxx&#10;*/&#10;@RestController&#10;@RequestMapping(&quot;/$!{tableName}&quot;)&#10;public class $!{entityClassName}Controller {&#10;/**&#10;* 服务对象&#10;*/&#10; @Autowired&#10; private $!{serviceClassName} $!{serviceFirstLower};&#10;&#10; /**&#10; * 通过主键查询单条数据&#10; *&#10; * @param id 主键&#10; * @return 单条数据&#10; */&#10; @GetMapping(&quot;selectOne&quot;)&#10; public $!{entityClassName} selectOne(Integer id) {&#10; return $!{serviceFirstLower}.selectByPrimaryKey(id);&#10; }&#10;&#10;}" />
<option name="customizedLombokAnnotation" value="true" />
<option name="customizedLombokValue" value="@lombok.Builder" />
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generateService" value="true" />
<option name="generateServiceInterface" value="true" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaMapperPackage" value="com.hanserwei.hannote.note.biz.domain.mapper" />
<option name="javaMapperPath" value="$PROJECT_DIR$/han-note-note/han-note-note-biz/src/main/java" />
<option name="javaModelPackage" value="com.hanserwei.hannote.note.biz.domain.dataobject" />
<option name="javaModelPath" value="$PROJECT_DIR$/han-note-note/han-note-note-biz/src/main/java" />
<option name="lastDatabaseCrudChooseModuleName" value="han-note-note-biz" />
<option name="lombokAllArgConstructor" value="true" />
<option name="lombokDataAnnotation" value="true" />
<option name="lombokNoArgsConstructor" value="true" />
<option name="mapperAnnotaion" value="true" />
<option name="mapperFilesFolder" value="$PROJECT_DIR$/han-note-auth/src/main/resources/mapperxml" />
<option name="mapperFilesFolderList">
<list>
<option value="$PROJECT_DIR$/han-note-auth/src/main/resources/mapperxml" />
</list>
</option>
<option name="moduleNameToPackageAndPathMap">
<map>
<entry key="han-note-auth">
<value>
<UserPackageAndPathInfoByModule>
<option name="javaMapperPackage" value="com.hanserwei.hannote.count.biz.domain.mapper" />
<option name="javaMapperPath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/java" />
<option name="javaModelPacakge" value="com.hanserwei.hannote.count.biz.domain.dataobject" />
<option name="javaModelPath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/java" />
<option name="javaServiceInterfacePackage" value="com.hanserwei.hannote.count.biz.service" />
<option name="javaServiceInterfacePath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/java" />
<option name="javaServicePackage" value="com.hanserwei.hannote.count.biz.service.impl" />
<option name="javaServicePath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/java" />
<option name="xmlPackage" value="mapperxml" />
<option name="xmlPath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/resources" />
</UserPackageAndPathInfoByModule>
</value>
</entry>
<entry key="han-note-count-biz">
<value>
<UserPackageAndPathInfoByModule>
<option name="javaMapperPackage" value="com.hanserwei.hannote.count.biz.domain.mapper" />
<option name="javaMapperPath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/java" />
<option name="javaModelPacakge" value="com.hanserwei.hannote.count.biz.domain.dataobject" />
<option name="javaModelPath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/java" />
<option name="javaServiceInterfacePackage" value="com.hanserwei.hannote.count.biz.service" />
<option name="javaServiceInterfacePath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/java" />
<option name="javaServicePackage" value="com.hanserwei.hannote.count.biz.service.impl" />
<option name="javaServicePath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/java" />
<option name="xmlPackage" value="mapperxml" />
<option name="xmlPath" value="$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/resources" />
</UserPackageAndPathInfoByModule>
</value>
</entry>
<entry key="han-note-note-biz">
<value>
<UserPackageAndPathInfoByModule>
<option name="javaMapperPackage" value="com.hanserwei.hannote.note.biz.domain.mapper" />
<option name="javaMapperPath" value="$PROJECT_DIR$/han-note-note/han-note-note-biz/src/main/java" />
<option name="javaModelPacakge" value="com.hanserwei.hannote.note.biz.domain.dataobject" />
<option name="javaModelPath" value="$PROJECT_DIR$/han-note-note/han-note-note-biz/src/main/java" />
<option name="javaServiceInterfacePackage" value="com.hanserwei.hannote.note.biz.service" />
<option name="javaServiceInterfacePath" value="$PROJECT_DIR$/han-note-note/han-note-note-biz/src/main/java" />
<option name="javaServicePackage" value="com.hanserwei.hannote.note.biz.service.impl" />
<option name="javaServicePath" value="$PROJECT_DIR$/han-note-note/han-note-note-biz/src/main/java" />
<option name="xmlPackage" value="mapperxml" />
<option name="xmlPath" value="$PROJECT_DIR$/han-note-note/han-note-note-biz/src/main/resources" />
</UserPackageAndPathInfoByModule>
</value>
</entry>
</map>
</option>
<option name="mybatisPlusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="tableGenerateConfigs">
<map>
<entry key="han_note:t_channel">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="ChannelDO" />
<option name="moduleName" value="han-note-note-biz" />
<option name="mybatisplusIdType" value="ASSIGN_ID" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_channel_topic_rel">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="ChannelTopicRelDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_fans">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="FansDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_following">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="FollowingDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_note">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="NoteDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_note_collection">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="NoteCollectionDO" />
<option name="moduleName" value="han-note-note-biz" />
<option name="mybatisplusIdType" value="ASSIGN_ID" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_note_count">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="NoteCountDO" />
<option name="moduleName" value="han-note-count-biz" />
<option name="mybatisplusIdType" value="ASSIGN_ID" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_note_like">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="NoteLikeDO" />
<option name="moduleName" value="han-note-note-biz" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_permission">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="PermissionDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_role">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="RoleDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_role_permission_rel">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="RolePermissionDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_topic">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="TopicDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_user">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="UserDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="ASSIGN_ID" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_user_count">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="UserCountDO" />
<option name="moduleName" value="han-note-count-biz" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
<entry key="han_note:t_user_role_rel">
<value>
<TableGenerateConfig>
<option name="deleteByPrimayKeyEnabled" value="false" />
<option name="generatedKey" value="id" />
<option name="insertMethodEnabled" value="false" />
<option name="insertSelectiveMethodEnabled" value="false" />
<option name="javaModelName" value="UserRoleDO" />
<option name="moduleName" value="han-note-auth" />
<option name="mybatisplusIdType" value="AUTO" />
<option name="selectByPrimaryKeyEnabled" value="false" />
<option name="sequenceColumn" value="" />
<option name="sequenceId" value="" />
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="useActualColumnName" value="false" />
</TableGenerateConfig>
</value>
</entry>
</map>
</option>
<option name="updateByPrimaryKeySelectiveEnabled" value="false" />
<option name="updateByPrimaykeyEnabled" value="false" />
<option name="userMybatisPlus" value="true" />
<option name="xmlMapperPackage" value="mapperxml" />
<option name="xmlMapperPath" value="$PROJECT_DIR$/han-note-note/han-note-note-biz/src/main/resources" />
</ProjectProfile>
</option>
</component>
</project>

50
.idea/compiler.xml generated Normal file
View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
</profile>
<profile name="Annotation profile for han-note" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.30/lombok-1.18.30.jar" />
</processorPath>
<module name="han-note-oss-biz" />
<module name="han-note-count-api" />
<module name="han-note-oss-api" />
<module name="han-note-count-biz" />
<module name="hanserwei-spring-boot-starter-biz-operationlog" />
<module name="han-note-gateway" />
<module name="han-note-note-api" />
<module name="hanserwei-spring-boot-starter-jackson" />
<module name="han-note-distributed-id-generator-api" />
<module name="han-note-data-align" />
<module name="han-note-kv-api" />
<module name="han-note-note-biz" />
<module name="han-note-user-relation-api" />
<module name="han-note-user-api" />
<module name="han-note-user-biz" />
<module name="han-note-kv-biz" />
<module name="hanserwei-common" />
<module name="han-note-distributed-id-generator-biz" />
<module name="han-note-auth" />
<module name="han-note-user-relation-biz" />
<module name="hanserwei-spring-boot-starter-biz-context" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="hanserwei-spring-starter-biz-context" target="21" />
</bytecodeTargetLevel>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="han-note-auth" options="" />
</option>
</component>
</project>

57
.idea/dataSources.xml generated Normal file
View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="han_note@127.0.0.1" uuid="f2474a4a-e4f1-4afa-bd43-7ae7738b47c5">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://127.0.0.1:3306/han_note?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false&amp;serverTimezone=Asia/Shanghai&amp;allowPublicKeyRetrieval=true</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="5@127.0.0.1" uuid="5b969fbe-0f66-42be-8d30-ff21036ab8a4">
<driver-ref>redis</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<jdbc-driver>jdbc.RedisDriver</jdbc-driver>
<jdbc-url>jdbc:redis://127.0.0.1:6379/5</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="hannote@127.0.0.1" uuid="19b59a4f-95b9-451e-9051-bb3d5ce210ee">
<driver-ref>cassandra</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<jdbc-driver>com.ing.data.cassandra.jdbc.CassandraDriver</jdbc-driver>
<jdbc-url>jdbc:cassandra://127.0.0.1:9042/hannote</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="leaf@127.0.0.1" uuid="c4c1f1dc-816f-4113-88d6-9ebd7677af82">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://127.0.0.1:3306/leaf?useUnicode=true&amp;characterEncoding=utf-8&amp;autoReconnect=true&amp;useSSL=false&amp;serverTimezone=Asia/Shanghai</jdbc-url>
<jdbc-additional-properties>
<property name="com.intellij.clouds.kubernetes.db.host.port" />
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
<property name="com.intellij.clouds.kubernetes.db.container.port" />
</jdbc-additional-properties>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

10
.idea/data_source_mapping.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourcePerFileMappings">
<file url="file://$APPLICATION_CONFIG_DIR$/consoles/db/5b969fbe-0f66-42be-8d30-ff21036ab8a4/console.sql" value="5b969fbe-0f66-42be-8d30-ff21036ab8a4" />
<file url="file://$APPLICATION_CONFIG_DIR$/consoles/db/f2474a4a-e4f1-4afa-bd43-7ae7738b47c5/console.sql" value="f2474a4a-e4f1-4afa-bd43-7ae7738b47c5" />
<file url="file://$PROJECT_DIR$/sql/createData.sql" value="f2474a4a-e4f1-4afa-bd43-7ae7738b47c5" />
<file url="file://$PROJECT_DIR$/sql/createTable.sql" value="f2474a4a-e4f1-4afa-bd43-7ae7738b47c5" />
<file url="file://$PROJECT_DIR$/sql/leafcreatetable.sql" value="c4c1f1dc-816f-4113-88d6-9ebd7677af82" />
</component>
</project>

15
.idea/dictionaries/project.xml generated Normal file
View File

@@ -0,0 +1,15 @@
<component name="ProjectDictionaryState">
<dictionary name="project">
<words>
<w>asyn</w>
<w>hannote</w>
<w>hanserwei</w>
<w>nacos</w>
<w>operationlog</w>
<w>rustfs</w>
<w>zadd</w>
<w>zrevrangebyscore</w>
<w>zset</w>
</words>
</dictionary>
</component>

2
.idea/encodings.xml generated
View File

@@ -9,6 +9,8 @@
<file url="file://$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/han-note-count/han-note-count-biz/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/han-note-count/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/han-note-count/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/han-note-count/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/han-note-count/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/han-note-data-align/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/han-note-data-align/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/han-note-distributed-id-generator/han-note-distributed-id-generator-api/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/han-note-distributed-id-generator/han-note-distributed-id-generator-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/han-note-distributed-id-generator/han-note-distributed-id-generator-api/src/main/resources" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/han-note-distributed-id-generator/han-note-distributed-id-generator-api/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/han-note-distributed-id-generator/han-note-distributed-id-generator-biz/src/main/java" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/han-note-distributed-id-generator/han-note-distributed-id-generator-biz/src/main/java" charset="UTF-8" />

20
.idea/jarRepositories.xml generated Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

9
.idea/sqldialects.xml generated Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/sql/createData.sql" dialect="MySQL" />
<file url="file://$PROJECT_DIR$/sql/createTable.sql" dialect="MySQL" />
<file url="file://$PROJECT_DIR$/sql/leafcreatetable.sql" dialect="MySQL" />
<file url="PROJECT" dialect="MySQL" />
</component>
</project>

6
.idea/swagger-settings.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SwaggerSettings">
<option name="defaultPreviewType" value="REDOC" />
</component>
</project>

View File

@@ -0,0 +1,91 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- 指定父项目 -->
<parent>
<groupId>com.hanserwei</groupId>
<artifactId>han-note</artifactId>
<version>${revision}</version>
</parent>
<!-- 指定打包方式 -->
<packaging>jar</packaging>
<artifactId>han-note-data-align</artifactId>
<name>${project.artifactId}</name>
<description>数据对齐服务</description>
<dependencies>
<dependency>
<groupId>com.hanserwei</groupId>
<artifactId>hanserwei-common</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Mybatis -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
</dependency>
<!-- MySQL 驱动 -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<!-- Druid 数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-3-starter</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Redis 连接池 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<!-- Nacos 配置中心 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<!-- 服务注册发现 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -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);
}
}

View File

@@ -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

View File

@@ -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 # 是否开启动态刷新

View File

@@ -0,0 +1,58 @@
<configuration>
<!-- 引用 Spring Boot 的 logback 基础配置 -->
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<!-- 应用名称 -->
<property scope="context" name="appName" value="data-align"/>
<!-- 自定义日志输出路径,以及日志名称前缀 -->
<property name="LOG_FILE" value="./logs/${appName}.%d{yyyy-MM-dd}"/>
<!-- 每行日志输出的格式 -->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n"/>
<!-- 文件输出 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 日志文件的命名格式 -->
<fileNamePattern>${LOG_FILE}-%i.log</fileNamePattern>
<!-- 保留 30 天的日志文件 -->
<maxHistory>30</maxHistory>
<!-- 单个日志文件最大大小 -->
<maxFileSize>10MB</maxFileSize>
<!-- 日志文件的总大小0 表示不限制 -->
<totalSizeCap>0</totalSizeCap>
<!-- 重启服务时,是否清除历史日志,不推荐清理 -->
<cleanHistoryOnStart>false</cleanHistoryOnStart>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<!-- 异步写入日志,提升性能 -->
<appender name="ASYNC_FILE" class="ch.qos.logback.classic.AsyncAppender">
<!-- 是否丢弃日志, 0 表示不丢弃。默认情况下,如果队列满 80%, 会丢弃 TRACE、DEBUG、INFO 级别的日志 -->
<discardingThreshold>0</discardingThreshold>
<!-- 队列大小。默认值为 256 -->
<queueSize>256</queueSize>
<appender-ref ref="FILE"/>
</appender>
<!-- 本地 dev 开发环境 -->
<springProfile name="dev">
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="INFO">
<appender-ref ref="CONSOLE"/> <!-- 输出控制台日志 -->
<appender-ref ref="ASYNC_FILE"/> <!-- 打印日志到文件中。PS: 本地环境下,如果不想打印日志到文件,可注释掉此行 -->
</root>
</springProfile>
<!-- 其它环境 -->
<springProfile name="prod">
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="INFO">
<appender-ref ref="ASYNC_FILE"/> <!-- 生产环境下,仅打印日志到文件中 -->
</root>
</springProfile>
</configuration>

View File

@@ -22,6 +22,7 @@
<module>han-note-note/han-note-note-biz</module> <module>han-note-note/han-note-note-biz</module>
<module>han-note-user-relation</module> <module>han-note-user-relation</module>
<module>han-note-count</module> <module>han-note-count</module>
<module>han-note-data-align</module>
</modules> </modules>
<properties> <properties>
@@ -65,6 +66,7 @@
<rocketmq-spring-boot.version>2.3.4</rocketmq-spring-boot.version> <rocketmq-spring-boot.version>2.3.4</rocketmq-spring-boot.version>
<rocketmq-client.version>5.3.2</rocketmq-client.version> <rocketmq-client.version>5.3.2</rocketmq-client.version>
<buffertrigger.version>0.2.21</buffertrigger.version> <buffertrigger.version>0.2.21</buffertrigger.version>
<xxl-job.version>3.2.0</xxl-job.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
@@ -292,6 +294,12 @@
<artifactId>buffer-trigger</artifactId> <artifactId>buffer-trigger</artifactId>
<version>${buffertrigger.version}</version> <version>${buffertrigger.version}</version>
</dependency> </dependency>
<!-- XXL-JOB 分布式定时任务调度 -->
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>${xxl-job.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>