mirror of https://gitee.com/stylefeng/roses
【7.6.0】【框架改造】移除migration
parent
d09df7dc96
commit
13a0832da8
|
@ -64,13 +64,6 @@
|
|||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--迁移模块的sdk-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>migration-sdk-data-aggregation</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--web模块-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.timer.modular.migration;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.stylefeng.roses.kernel.migration.api.AccessMigrationApi;
|
||||
import cn.stylefeng.roses.kernel.migration.api.enums.MigrationAggregationTypeEnum;
|
||||
import cn.stylefeng.roses.kernel.migration.api.pojo.MigrationInfo;
|
||||
import cn.stylefeng.roses.kernel.timer.api.enums.TimerJobStatusEnum;
|
||||
import cn.stylefeng.roses.kernel.timer.modular.entity.SysTimers;
|
||||
import cn.stylefeng.roses.kernel.timer.modular.migration.pojo.TimerMigrationInfo;
|
||||
import cn.stylefeng.roses.kernel.timer.modular.migration.pojo.v1.SysTimersMigration;
|
||||
import cn.stylefeng.roses.kernel.timer.modular.param.SysTimersParam;
|
||||
import cn.stylefeng.roses.kernel.timer.modular.service.SysTimersService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 定时任务迁移接入实现
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/8 9:24
|
||||
*/
|
||||
@Component
|
||||
public class TimerMigrationImpl implements AccessMigrationApi {
|
||||
|
||||
@Resource
|
||||
private SysTimersService sysTimersService;
|
||||
|
||||
@Override
|
||||
public String getAppName() {
|
||||
return "系统应用";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return "定时任务";
|
||||
}
|
||||
|
||||
@Override
|
||||
public MigrationInfo exportData() {
|
||||
MigrationInfo migrationInfo = new MigrationInfo();
|
||||
migrationInfo.setVersion("v1");
|
||||
|
||||
// 聚合对象
|
||||
TimerMigrationInfo timerMigrationInfo = new TimerMigrationInfo();
|
||||
migrationInfo.setData(timerMigrationInfo);
|
||||
|
||||
// 填充数据
|
||||
List<SysTimers> sysTimers = sysTimersService.list();
|
||||
List<SysTimersMigration> sysTimersMigrations;
|
||||
if (ObjectUtil.isNotEmpty(sysTimers)) {
|
||||
sysTimersMigrations = sysTimers.stream().map(item -> BeanUtil.toBean(item, SysTimersMigration.class)).collect(Collectors.toList());
|
||||
} else {
|
||||
sysTimersMigrations = new ArrayList<>();
|
||||
}
|
||||
timerMigrationInfo.setSysTimersMigrationList(sysTimersMigrations);
|
||||
|
||||
return migrationInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean importData(String type, MigrationInfo data) {
|
||||
TimerMigrationInfo timerMigrationInfo = JSONObject.toJavaObject((JSONObject) data.getData(), TimerMigrationInfo.class);
|
||||
|
||||
if (MigrationAggregationTypeEnum.MIGRATION_INCREMENTAL.getCode().equals(type)) {
|
||||
// 查询配置信息
|
||||
List<SysTimersMigration> sysTimersMigrationList = timerMigrationInfo.getSysTimersMigrationList();
|
||||
if (ObjectUtil.isNotEmpty(sysTimersMigrationList)) {
|
||||
Set<Long> ids = sysTimersMigrationList.stream().map(SysTimersMigration::getTimerId).collect(Collectors.toSet());
|
||||
|
||||
// 组装查询条件
|
||||
LambdaQueryWrapper<SysTimers> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.select(SysTimers::getTimerId);
|
||||
lambdaQueryWrapper.in(SysTimers::getTimerId, ids);
|
||||
List<SysTimers> dbList = sysTimersService.list(lambdaQueryWrapper);
|
||||
|
||||
// 移除已存在项
|
||||
for (SysTimers db : dbList) {
|
||||
sysTimersMigrationList.removeIf(item -> item.getTimerId().equals(db.getTimerId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 入库
|
||||
List<SysTimersMigration> sysTimersMigrationList = timerMigrationInfo.getSysTimersMigrationList();
|
||||
if (ObjectUtil.isNotEmpty(sysTimersMigrationList)) {
|
||||
List<SysTimers> sysTimers = sysTimersMigrationList.stream().map(item -> BeanUtil.toBean(item, SysTimers.class)).collect(Collectors.toList());
|
||||
sysTimersService.saveOrUpdateBatch(sysTimers);
|
||||
|
||||
// 启动任务
|
||||
for (SysTimers sysTimer : sysTimers) {
|
||||
SysTimersParam sysTimersParam = BeanUtil.toBean(sysTimer, SysTimersParam.class);
|
||||
if (TimerJobStatusEnum.RUNNING.getCode().equals(sysTimer.getJobStatus())) {
|
||||
sysTimersService.start(sysTimersParam);
|
||||
} else {
|
||||
sysTimersService.stop(sysTimersParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.timer.modular.migration.pojo;
|
||||
|
||||
import cn.stylefeng.roses.kernel.timer.modular.migration.pojo.v1.SysTimersMigration;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 定时任务迁移信息
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/8 9:13
|
||||
*/
|
||||
@Data
|
||||
public class TimerMigrationInfo {
|
||||
|
||||
/**
|
||||
* 定时任务列表
|
||||
*/
|
||||
private List<SysTimersMigration> sysTimersMigrationList;
|
||||
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
/*
|
||||
* Copyright [2020-2030] [https://www.stylefeng.cn]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Guns采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Guns源码头部的版权声明。
|
||||
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 6.若您的项目无法满足以上几点,可申请商业授权
|
||||
*/
|
||||
package cn.stylefeng.roses.kernel.timer.modular.migration.pojo.v1;
|
||||
|
||||
import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 定时任务
|
||||
*
|
||||
* @author stylefeng
|
||||
* @since 2020/6/30 18:26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SysTimersMigration extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 定时器id
|
||||
*/
|
||||
private Long timerId;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String timerName;
|
||||
|
||||
/**
|
||||
* 执行任务的class的类名(实现了TimerAction接口的类的全称)
|
||||
*/
|
||||
private String actionClass;
|
||||
|
||||
/**
|
||||
* 定时任务表达式
|
||||
*/
|
||||
private String cron;
|
||||
|
||||
/**
|
||||
* 参数
|
||||
*/
|
||||
private String params;
|
||||
|
||||
/**
|
||||
* 状态:1-运行,2-停止
|
||||
*/
|
||||
private Integer jobStatus;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否删除:Y-被删除,N-未删除
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-s-migration</artifactId>
|
||||
<version>7.6.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>migration-api</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--参数校验模块-->
|
||||
<!--用在控制器,参数校验-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>validator-api</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,54 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.api;
|
||||
|
||||
import cn.stylefeng.roses.kernel.migration.api.enums.MigrationAggregationTypeEnum;
|
||||
import cn.stylefeng.roses.kernel.migration.api.pojo.MigrationInfo;
|
||||
|
||||
/**
|
||||
* 接入迁移模块Api
|
||||
* <p>
|
||||
* 1.所有需要接入迁移模块的业务,只需要实现本类即可
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 15:17
|
||||
*/
|
||||
public interface AccessMigrationApi {
|
||||
|
||||
/**
|
||||
* 获取应用名称
|
||||
*
|
||||
* @return {@link java.lang.String}
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 17:15
|
||||
**/
|
||||
String getAppName();
|
||||
|
||||
/**
|
||||
* 获取模块名称
|
||||
*
|
||||
* @return {@link java.lang.String}
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 17:15
|
||||
**/
|
||||
String getModuleName();
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*
|
||||
* @return {@link MigrationInfo}
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 15:20
|
||||
**/
|
||||
MigrationInfo exportData();
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param type 导入类型-参考{@link MigrationAggregationTypeEnum} 枚举
|
||||
* @param data 导出的数据
|
||||
* @return {@link boolean}
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 15:23
|
||||
**/
|
||||
boolean importData(String type, MigrationInfo data);
|
||||
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* Copyright [2020-2030] [https://www.stylefeng.cn]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Guns采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Guns源码头部的版权声明。
|
||||
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 6.若您的项目无法满足以上几点,可申请商业授权
|
||||
*/
|
||||
package cn.stylefeng.roses.kernel.migration.api.constants;
|
||||
|
||||
/**
|
||||
* migration 模块常量
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 15:04
|
||||
*/
|
||||
public interface MigrationConstants {
|
||||
|
||||
/**
|
||||
* migration模块的名称
|
||||
*/
|
||||
String MIGRATION_MODULE_NAME = "kernel-d-migration";
|
||||
|
||||
/**
|
||||
* 异常枚举的步进值
|
||||
*/
|
||||
String MIGRATION_EXCEPTION_STEP_CODE = "32";
|
||||
|
||||
/**
|
||||
* 名称分隔符
|
||||
*/
|
||||
String NAME_SEPARATOR = "#";
|
||||
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.api.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 迁移类型枚举
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 16:25
|
||||
*/
|
||||
@Getter
|
||||
public enum MigrationAggregationTypeEnum {
|
||||
|
||||
/**
|
||||
* 全量迁移
|
||||
*/
|
||||
MIGRATION_FULL("FULL", "全量迁移"),
|
||||
|
||||
/**
|
||||
* 增量迁移
|
||||
*/
|
||||
MIGRATION_INCREMENTAL("INCREMENTAL", "增量迁移");
|
||||
|
||||
private final String code;
|
||||
|
||||
private final String name;
|
||||
|
||||
MigrationAggregationTypeEnum(String code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright [2020-2030] [https://www.stylefeng.cn]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Guns采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Guns源码头部的版权声明。
|
||||
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 6.若您的项目无法满足以上几点,可申请商业授权
|
||||
*/
|
||||
package cn.stylefeng.roses.kernel.migration.api.exception;
|
||||
|
||||
import cn.stylefeng.roses.kernel.migration.api.constants.MigrationConstants;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
||||
|
||||
/**
|
||||
* migration模块异常
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 15:07
|
||||
*/
|
||||
public class MigrationException extends ServiceException {
|
||||
|
||||
public MigrationException(AbstractExceptionEnum exception) {
|
||||
super(MigrationConstants.MIGRATION_MODULE_NAME, exception);
|
||||
}
|
||||
|
||||
public MigrationException(String errorCode, String userTip) {
|
||||
super(MigrationConstants.MIGRATION_MODULE_NAME, errorCode, userTip);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
* Copyright [2020-2030] [https://www.stylefeng.cn]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Guns采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Guns源码头部的版权声明。
|
||||
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 6.若您的项目无法满足以上几点,可申请商业授权
|
||||
*/
|
||||
package cn.stylefeng.roses.kernel.migration.api.exception.enums;
|
||||
|
||||
import cn.stylefeng.roses.kernel.migration.api.constants.MigrationConstants;
|
||||
import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Migration模块相关异常枚举
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 15:09
|
||||
*/
|
||||
@Getter
|
||||
public enum MigrationExceptionEnum implements AbstractExceptionEnum {
|
||||
|
||||
/**
|
||||
* Migration操作异常
|
||||
*/
|
||||
MIGRATION_ERROR(RuleConstants.THIRD_ERROR_TYPE_CODE + MigrationConstants.MIGRATION_EXCEPTION_STEP_CODE + "01", "操作异常,具体信息为:{}");
|
||||
|
||||
/**
|
||||
* 错误编码
|
||||
*/
|
||||
private final String errorCode;
|
||||
|
||||
/**
|
||||
* 提示用户信息
|
||||
*/
|
||||
private final String userTip;
|
||||
|
||||
MigrationExceptionEnum(String errorCode, String userTip) {
|
||||
this.errorCode = errorCode;
|
||||
this.userTip = userTip;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* Copyright [2020-2030] [https://www.stylefeng.cn]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Guns采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Guns源码头部的版权声明。
|
||||
* 3.请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/stylefeng/guns
|
||||
* 6.若您的项目无法满足以上几点,可申请商业授权
|
||||
*/
|
||||
package cn.stylefeng.roses.kernel.migration.api.expander;
|
||||
|
||||
/**
|
||||
* Migration权限相关配置快速获取
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 15:11
|
||||
*/
|
||||
public class MigrationConfigExpander {
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.api.pojo;
|
||||
|
||||
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 数据迁移聚合类
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 16:10
|
||||
*/
|
||||
@Data
|
||||
public class MigrationAggregationPOJO extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 应用和模块名称列表
|
||||
*/
|
||||
@NotNull(message = "模块名称不能为空", groups = {export.class, restore.class})
|
||||
@ChineseDescription("应用和模块名称列表")
|
||||
private List<String> appAndModuleNameList;
|
||||
|
||||
/**
|
||||
* 数据集
|
||||
*/
|
||||
@NotNull(message = "数据集不能为空", groups = {restore.class})
|
||||
@ChineseDescription("数据集")
|
||||
private Map<String, MigrationInfo> data;
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
public @interface export {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复
|
||||
*/
|
||||
public @interface restore {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.api.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 迁移数据信息
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 16:30
|
||||
*/
|
||||
@Data
|
||||
public class MigrationInfo {
|
||||
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
private Object data;
|
||||
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-s-migration</artifactId>
|
||||
<version>7.6.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>migration-business-web</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--资源api模块-->
|
||||
<!--用在资源控制器,资源扫描上-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>scanner-api</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--数据迁移sdk-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>migration-sdk-data-aggregation</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--web模块-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,84 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.web.controller;
|
||||
|
||||
import cn.stylefeng.roses.kernel.migration.api.pojo.MigrationAggregationPOJO;
|
||||
import cn.stylefeng.roses.kernel.migration.web.pojo.MigrationRequest;
|
||||
import cn.stylefeng.roses.kernel.migration.web.service.MigrationService;
|
||||
import cn.stylefeng.roses.kernel.rule.enums.ResBizTypeEnum;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
||||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据迁移控制器
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 17:35
|
||||
*/
|
||||
@RestController
|
||||
@ApiResource(name = "数据迁移控制器", resBizType = ResBizTypeEnum.SYSTEM)
|
||||
public class MigrationController {
|
||||
|
||||
@Resource
|
||||
private MigrationService migrationService;
|
||||
|
||||
/**
|
||||
* 获取所有可备份数据列表
|
||||
*
|
||||
* @return {@link ResponseData}
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 17:37
|
||||
**/
|
||||
@GetResource(name = "获取所有可备份数据列表", path = "/dataMigration/getAllMigrationList")
|
||||
public ResponseData<List<MigrationRequest>> getAllMigrationList() {
|
||||
List<MigrationRequest> migrationRequestList = migrationService.getAllMigrationList();
|
||||
return new SuccessResponseData<>(migrationRequestList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 备份指定数据列表
|
||||
*
|
||||
* @return {@link cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData}
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 11:11
|
||||
**/
|
||||
@GetResource(name = "备份指定数据列表", path = "/dataMigration/migrationSelectData")
|
||||
public ResponseData<String> migrationSelectData(@Validated(MigrationAggregationPOJO.export.class) MigrationAggregationPOJO migrationAggregationPOJO) {
|
||||
List<String> res = new ArrayList<>();
|
||||
for (String s : migrationAggregationPOJO.getAppAndModuleNameList()) {
|
||||
try {
|
||||
String decode = URLDecoder.decode(s, "UTF-8");
|
||||
res.add(decode);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
migrationAggregationPOJO.setAppAndModuleNameList(res);
|
||||
String migrationSelectDataStr = migrationService.migrationSelectData(migrationAggregationPOJO);
|
||||
return new SuccessResponseData<>(migrationSelectDataStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复备份数据
|
||||
*
|
||||
* @return {@link ResponseData}
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 11:11
|
||||
**/
|
||||
@PostResource(name = "恢复备份数据", path = "/dataMigration/restoreData")
|
||||
public ResponseData<?> restoreData(@RequestPart("file") MultipartFile file, String type) {
|
||||
migrationService.restoreData(file, type);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.web.pojo;
|
||||
|
||||
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 迁移数据请求对象
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 9:15
|
||||
*/
|
||||
@Data
|
||||
public class MigrationRequest {
|
||||
|
||||
/**
|
||||
* 应用名称
|
||||
*/
|
||||
@ChineseDescription("应用名称")
|
||||
private String appName;
|
||||
|
||||
/**
|
||||
* 模块列表
|
||||
*/
|
||||
@ChineseDescription("模块列表")
|
||||
private List<String> moduleNames;
|
||||
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.web.service;
|
||||
|
||||
import cn.stylefeng.roses.kernel.migration.api.pojo.MigrationAggregationPOJO;
|
||||
import cn.stylefeng.roses.kernel.migration.web.pojo.MigrationRequest;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 迁移服务接口
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 9:34
|
||||
*/
|
||||
public interface MigrationService {
|
||||
|
||||
/**
|
||||
* 获取所有可备份数据列表
|
||||
*
|
||||
* @return {@link List< MigrationRequest>}
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 9:36
|
||||
**/
|
||||
List<MigrationRequest> getAllMigrationList();
|
||||
|
||||
/**
|
||||
* 备份指定数据列表
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 9:37
|
||||
**/
|
||||
String migrationSelectData(MigrationAggregationPOJO migrationAggregationPOJO);
|
||||
|
||||
/**
|
||||
* 恢复备份数据
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 11:14
|
||||
**/
|
||||
void restoreData(MultipartFile file,String type);
|
||||
}
|
|
@ -1,99 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.web.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.stylefeng.roses.kernel.migration.aggregation.scheduling.SchedulingCenter;
|
||||
import cn.stylefeng.roses.kernel.migration.api.constants.MigrationConstants;
|
||||
import cn.stylefeng.roses.kernel.migration.api.pojo.MigrationAggregationPOJO;
|
||||
import cn.stylefeng.roses.kernel.migration.web.pojo.MigrationRequest;
|
||||
import cn.stylefeng.roses.kernel.migration.web.service.MigrationService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializeConfig;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.alibaba.fastjson.serializer.ToStringSerializer;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 迁移服务实现类
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 9:34
|
||||
*/
|
||||
@Service
|
||||
public class MigrationServiceImpl implements MigrationService {
|
||||
|
||||
@Override
|
||||
public List<MigrationRequest> getAllMigrationList() {
|
||||
// 结构:应用-模块列表
|
||||
Map<String, MigrationRequest> migrationRequestList = new HashMap<>();
|
||||
|
||||
// 获取所有应用和模块的名称列表
|
||||
List<String> allMigrationInfo = SchedulingCenter.getAllMigrationInfo();
|
||||
|
||||
// 应用,模块映射关系
|
||||
for (String migration : allMigrationInfo) {
|
||||
|
||||
// 分割应用名称和模块名称
|
||||
String[] appAndModuleName = migration.split(MigrationConstants.NAME_SEPARATOR);
|
||||
|
||||
// 获取应用名称
|
||||
String appName = appAndModuleName[0];
|
||||
|
||||
// 获取模块名称
|
||||
String moduleName = appAndModuleName[1];
|
||||
|
||||
// 查找该应用
|
||||
MigrationRequest migrationRequest = migrationRequestList.get(appName);
|
||||
if (ObjectUtil.isEmpty(migrationRequest)) {
|
||||
migrationRequest = new MigrationRequest();
|
||||
migrationRequest.setAppName(appName);
|
||||
migrationRequestList.put(appName, migrationRequest);
|
||||
}
|
||||
|
||||
// 该应用是否有模块
|
||||
List<String> moduleNames = migrationRequest.getModuleNames();
|
||||
if (ObjectUtil.isEmpty(moduleNames)) {
|
||||
moduleNames = new ArrayList<>();
|
||||
migrationRequest.setModuleNames(moduleNames);
|
||||
}
|
||||
|
||||
moduleNames.add(moduleName);
|
||||
}
|
||||
return new ArrayList<>(migrationRequestList.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String migrationSelectData(MigrationAggregationPOJO migrationAggregationPOJO) {
|
||||
// 执行导出逻辑
|
||||
SchedulingCenter.exportData(migrationAggregationPOJO);
|
||||
|
||||
// 转换为Json字符串
|
||||
return JSONObject.toJSONString(migrationAggregationPOJO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreData(MultipartFile file, String type) {
|
||||
String jsonStr = null;
|
||||
try {
|
||||
// 转换文件为String类型
|
||||
jsonStr = new String(file.getBytes(), StandardCharsets.UTF_8);
|
||||
|
||||
// 把字符串转为java对象
|
||||
MigrationAggregationPOJO migrationAggregationPOJO = JSON.parseObject(jsonStr, MigrationAggregationPOJO.class);
|
||||
|
||||
// 交给调度中心去调度
|
||||
SchedulingCenter.importData(migrationAggregationPOJO, type);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-s-migration</artifactId>
|
||||
<version>7.6.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>migration-sdk-data-aggregation</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<!--migration模块的api-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>migration-api</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -1,122 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.aggregation.scheduling;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.stylefeng.roses.kernel.migration.api.AccessMigrationApi;
|
||||
import cn.stylefeng.roses.kernel.migration.api.constants.MigrationConstants;
|
||||
import cn.stylefeng.roses.kernel.migration.api.pojo.MigrationAggregationPOJO;
|
||||
import cn.stylefeng.roses.kernel.migration.api.pojo.MigrationInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* 调度中心
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 16:01
|
||||
*/
|
||||
public class SchedulingCenter {
|
||||
|
||||
/**
|
||||
* 迁移数据接入集合
|
||||
*/
|
||||
private static final ConcurrentHashMap<String, AccessMigrationApi> migrationCollection = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* 接入一个迁移类
|
||||
*
|
||||
* @param accessMigrationApi 迁移接口
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 17:21
|
||||
**/
|
||||
public static void addMigration(AccessMigrationApi accessMigrationApi) {
|
||||
|
||||
// 拼接key值
|
||||
String appAndModuleNameItem = accessMigrationApi.getAppName() + MigrationConstants.NAME_SEPARATOR + accessMigrationApi.getModuleName();
|
||||
|
||||
// 存储迁移类
|
||||
migrationCollection.put(appAndModuleNameItem, accessMigrationApi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据
|
||||
*
|
||||
* @param migrationAggregationPOJO 导入的数据
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 16:10
|
||||
**/
|
||||
public static void importData(MigrationAggregationPOJO migrationAggregationPOJO, String type) {
|
||||
|
||||
// 所有导入数据集合
|
||||
Map<String, MigrationInfo> migrationInfoMap = migrationAggregationPOJO.getData();
|
||||
|
||||
// 找到每个应用的处理程序,调用相关方法
|
||||
for (String appAndModuleName : migrationAggregationPOJO.getAppAndModuleNameList()) {
|
||||
AccessMigrationApi accessMigrationApi = migrationCollection.get(appAndModuleName);
|
||||
if (ObjectUtil.isNotEmpty(accessMigrationApi)) {
|
||||
|
||||
// 找到数据
|
||||
MigrationInfo migrationInfo = migrationInfoMap.get(appAndModuleName);
|
||||
|
||||
// 发送给实现类处理
|
||||
try {
|
||||
accessMigrationApi.importData(type, migrationInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*
|
||||
* @param migrationAggregationPOJO 导出要求
|
||||
* @return {@link MigrationAggregationPOJO}
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 16:11
|
||||
**/
|
||||
public static MigrationAggregationPOJO exportData(MigrationAggregationPOJO migrationAggregationPOJO) {
|
||||
Map<String, MigrationInfo> data = migrationAggregationPOJO.getData();
|
||||
if (ObjectUtil.isEmpty(data)) {
|
||||
data = new HashMap<>();
|
||||
migrationAggregationPOJO.setData(data);
|
||||
}
|
||||
|
||||
// 导出所有指定项
|
||||
for (String appAndModuleName : migrationAggregationPOJO.getAppAndModuleNameList()) {
|
||||
// 查找对应的实现类
|
||||
AccessMigrationApi accessMigrationApi = migrationCollection.get(appAndModuleName);
|
||||
if (ObjectUtil.isNotEmpty(accessMigrationApi)) {
|
||||
// 执行导出
|
||||
try {
|
||||
// 获取数据
|
||||
MigrationInfo migrationInfo = accessMigrationApi.exportData();
|
||||
|
||||
// 放入返回结果中
|
||||
data.put(appAndModuleName, migrationInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
data.put(appAndModuleName, new MigrationInfo());
|
||||
}
|
||||
}
|
||||
|
||||
return migrationAggregationPOJO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有迁移数据列表
|
||||
*
|
||||
* @return {@link java.util.List<MigrationInfo>}
|
||||
* @author majianguo
|
||||
* @since 2021/7/6 16:13
|
||||
**/
|
||||
public static List<String> getAllMigrationInfo() {
|
||||
return new ArrayList<>(migrationCollection.keySet());
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-s-migration</artifactId>
|
||||
<version>7.6.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>migration-spring-boot-starter</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--migration的业务模块-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>migration-business-web</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,33 +0,0 @@
|
|||
package cn.stylefeng.roses.kernel.migration.starter.spring;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import cn.stylefeng.roses.kernel.migration.aggregation.scheduling.SchedulingCenter;
|
||||
import cn.stylefeng.roses.kernel.migration.api.AccessMigrationApi;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Spring boot启动完成的回调
|
||||
* <p>
|
||||
* 用于扫描所有的迁移实现类
|
||||
*
|
||||
* @author majianguo
|
||||
* @since 2021/7/7 9:49
|
||||
*/
|
||||
@Component
|
||||
public class MigrationApplicationRunnerImpl implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
|
||||
// 获取所有的实现类
|
||||
Map<String, AccessMigrationApi> accessMigrationApiMap = SpringUtil.getBeansOfType(AccessMigrationApi.class);
|
||||
for (AccessMigrationApi accessMigrationApi : accessMigrationApiMap.values()) {
|
||||
// 加入调度中心
|
||||
SchedulingCenter.addMigration(accessMigrationApi);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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>cn.stylefeng.roses</groupId>
|
||||
<artifactId>roses-kernel</artifactId>
|
||||
<version>7.6.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>kernel-s-migration</artifactId>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>migration-api</module>
|
||||
<module>migration-sdk-data-aggregation</module>
|
||||
<module>migration-business-web</module>
|
||||
<module>migration-spring-boot-starter</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 开发规则 -->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-a-rule</artifactId>
|
||||
<version>${roses.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
Loading…
Reference in New Issue