Compare commits
2 Commits
7fc24e1e2a
...
efd2e51d24
| Author | SHA1 | Date | |
|---|---|---|---|
| efd2e51d24 | |||
| 023d0c0926 |
82
.gitignore
vendored
82
.gitignore
vendored
@@ -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
|
||||
|
||||
380
.idea/MyBatisCodeHelperDatasource.xml
generated
Normal file
380
.idea/MyBatisCodeHelperDatasource.xml
generated
Normal 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=" #* @vtlvariable name="tableName" type="java.lang.String" *# #* @vtlvariable name="entityPackageName" type="java.lang.String" *# #* @vtlvariable name="entityClassName" type="java.lang.String" *# #* @vtlvariable name="servicePackageName" type="java.lang.String" *# #* @vtlvariable name="serviceInterfacePackage" type="java.lang.String" *# #* @vtlvariable name="serviceClassName" type="java.lang.String" *# #* @vtlvariable name="serviceInterfaceClassName" type="java.lang.String" *# #* @vtlvariable name="mapperPackageName" type="java.lang.String" *# #* @vtlvariable name="mapperClassName" type="java.lang.String" *# #* @vtlvariable name="controllerPackage" type="java.lang.String" *# #* @vtlvariable name="tableRemark" type="java.lang.String" *# #* @vtlvariable name="myDate" type="java.util.Date" *# #* @vtlvariable name="simpleDateFormat" type="java.text.SimpleDateFormat" *# package $!{controllerPackage}; import $!{entityPackageName}.$!{entityClassName}; ###set($realServiceName = $!{serviceClassName}+'Impl') import $!{servicePackageName}.$!{serviceClassName}; import org.springframework.web.bind.annotation.*; #set($serviceFirstLower = $!{serviceClassName.substring(0,1).toLowerCase()}+$!{serviceClassName.substring(1,$!{serviceClassName.length()})}) import org.springframework.beans.factory.annotation.Autowired; /** * $!{tableRemark}($!{tableName})表控制层 * * @author xxxxx */ @RestController @RequestMapping("/$!{tableName}") public class $!{entityClassName}Controller { /** * 服务对象 */ @Autowired private $!{serviceClassName} $!{serviceFirstLower}; /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @GetMapping("selectOne") public $!{entityClassName} selectOne(Integer id) { return $!{serviceFirstLower}.selectByPrimaryKey(id); } }" />
|
||||
<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
50
.idea/compiler.xml
generated
Normal 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
57
.idea/dataSources.xml
generated
Normal 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&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai&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&characterEncoding=utf-8&autoReconnect=true&useSSL=false&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
10
.idea/data_source_mapping.xml
generated
Normal 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
15
.idea/dictionaries/project.xml
generated
Normal 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
2
.idea/encodings.xml
generated
@@ -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/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-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/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" />
|
||||
|
||||
20
.idea/jarRepositories.xml
generated
Normal file
20
.idea/jarRepositories.xml
generated
Normal 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
9
.idea/sqldialects.xml
generated
Normal 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
6
.idea/swagger-settings.xml
generated
Normal 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>
|
||||
97
han-note-data-align/pom.xml
Normal file
97
han-note-data-align/pom.xml
Normal file
@@ -0,0 +1,97 @@
|
||||
<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>
|
||||
|
||||
<!-- XXL-JOB 分布式定时任务调度 -->
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.hanserwei.hannote.data.align.config;
|
||||
|
||||
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class XxlJobConfig {
|
||||
|
||||
@Resource
|
||||
private XxlJobProperties xxlJobProperties;
|
||||
|
||||
/**
|
||||
* 初始化执行器
|
||||
*
|
||||
* @return xxlJobSpringExecutor
|
||||
*/
|
||||
@Bean
|
||||
public XxlJobSpringExecutor xxlJobExecutor() {
|
||||
log.info(">>>>>>>>>>> xxl-job config init.");
|
||||
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||
xxlJobSpringExecutor.setAdminAddresses(xxlJobProperties.getAdminAddresses());
|
||||
xxlJobSpringExecutor.setAppname(xxlJobProperties.getAppName());
|
||||
xxlJobSpringExecutor.setIp(xxlJobProperties.getIp());
|
||||
xxlJobSpringExecutor.setPort(xxlJobProperties.getPort());
|
||||
xxlJobSpringExecutor.setAccessToken(xxlJobProperties.getAccessToken());
|
||||
xxlJobSpringExecutor.setLogPath(xxlJobProperties.getLogPath());
|
||||
xxlJobSpringExecutor.setLogRetentionDays(xxlJobProperties.getLogRetentionDays());
|
||||
return xxlJobSpringExecutor;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.hanserwei.hannote.data.align.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ConfigurationProperties(prefix = XxlJobProperties.PREFIX)
|
||||
@Component
|
||||
@Data
|
||||
public class XxlJobProperties {
|
||||
|
||||
public static final String PREFIX = "xxl.job";
|
||||
|
||||
private String adminAddresses;
|
||||
|
||||
private String accessToken;
|
||||
|
||||
private String appName;
|
||||
|
||||
private String ip;
|
||||
|
||||
private int port;
|
||||
|
||||
private String logPath;
|
||||
|
||||
private int logRetentionDays = 30;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.hanserwei.hannote.data.align.job;
|
||||
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class CreateTableXxlJob {
|
||||
|
||||
/**
|
||||
* 1、简单任务示例(Bean模式)
|
||||
*/
|
||||
@XxlJob("createTableJobHandler")
|
||||
public void createTableJobHandler() throws Exception {
|
||||
XxlJobHelper.log("## 开始初始化明日增量数据表...");
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
}
|
||||
31
han-note-data-align/src/main/resources/application.yml
Normal file
31
han-note-data-align/src/main/resources/application.yml
Normal 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
|
||||
19
han-note-data-align/src/main/resources/bootstrap.yml
Normal file
19
han-note-data-align/src/main/resources/bootstrap.yml
Normal 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 # 是否开启动态刷新
|
||||
58
han-note-data-align/src/main/resources/logback-spring.xml
Normal file
58
han-note-data-align/src/main/resources/logback-spring.xml
Normal 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>
|
||||
8
pom.xml
8
pom.xml
@@ -22,6 +22,7 @@
|
||||
<module>han-note-note/han-note-note-biz</module>
|
||||
<module>han-note-user-relation</module>
|
||||
<module>han-note-count</module>
|
||||
<module>han-note-data-align</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
@@ -65,6 +66,7 @@
|
||||
<rocketmq-spring-boot.version>2.3.4</rocketmq-spring-boot.version>
|
||||
<rocketmq-client.version>5.3.2</rocketmq-client.version>
|
||||
<buffertrigger.version>0.2.21</buffertrigger.version>
|
||||
<xxl-job.version>3.2.0</xxl-job.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
@@ -292,6 +294,12 @@
|
||||
<artifactId>buffer-trigger</artifactId>
|
||||
<version>${buffertrigger.version}</version>
|
||||
</dependency>
|
||||
<!-- XXL-JOB 分布式定时任务调度 -->
|
||||
<dependency>
|
||||
<groupId>com.xuxueli</groupId>
|
||||
<artifactId>xxl-job-core</artifactId>
|
||||
<version>${xxl-job.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
Reference in New Issue
Block a user