feat(支持springboot3): 支持springboot3框架

This commit is contained in:
zhuangpeng.li
2025-04-27 17:56:52 +08:00
parent 5b6ec185c4
commit 4d8e1c5167
156 changed files with 528 additions and 549 deletions

View File

@@ -33,6 +33,7 @@
<groupId>com.fastbee</groupId>
<artifactId>fastbee-common</artifactId>
</dependency>
<dependency>
<groupId>com.fastbee</groupId>
<artifactId>fastbee-framework</artifactId>

View File

@@ -4,7 +4,7 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import com.fastbee.common.core.page.PageDomain;
import com.fastbee.common.core.page.TableSupport;
@@ -36,7 +36,7 @@ import com.fastbee.generator.service.IGenTableService;
/**
* 代码生成 操作处理
*
*
* @author ruoyi
*/
@Api(tags = "代码生成模块")
@@ -238,4 +238,4 @@ public class GenController extends BaseController
public AjaxResult getCurrentDataSourceNameList() {
return success(DataBaseHelper.getDataSourceNameList());
}
}
}

View File

@@ -1,8 +1,8 @@
package com.fastbee.generator.domain;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -16,7 +16,7 @@ import com.fastbee.common.utils.StringUtils;
/**
* 业务表 gen_table
*
*
* @author ruoyi
*/
@ApiModel(value = "GenTable", description = "业务表 gen_table")
@@ -431,4 +431,4 @@ public class GenTable extends BaseEntity
public void setDataName(String dataName) {
this.dataName = dataName;
}
}
}

View File

@@ -1,6 +1,6 @@
package com.fastbee.generator.domain;
import javax.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotBlank;
import com.fastbee.common.core.domain.BaseEntity;
import com.fastbee.common.utils.StringUtils;
import io.swagger.annotations.ApiModel;
@@ -8,7 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* 代码生成业务字段表 gen_table_column
*
*
* @author ruoyi
*/
@ApiModel(value = "GenTableColumn", description = "代码生成业务字段表 gen_table_column")

View File

@@ -48,11 +48,11 @@ import com.fastbee.generator.util.GenUtils;
import com.fastbee.generator.util.VelocityInitializer;
import com.fastbee.generator.util.VelocityUtils;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
/**
* 业务 服务层实现
*
*
* @author ruoyi
*/
@Service
@@ -73,7 +73,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 查询业务信息
*
*
* @param id 业务ID
* @return 业务信息
*/
@@ -87,7 +87,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 查询业务列表
*
*
* @param genTable 业务信息
* @return 业务集合
*/
@@ -99,7 +99,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 查询据库列表
*
*
* @param genTable 业务信息
* @return 数据库表集合
*/
@@ -162,7 +162,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 查询据库列表
*
*
* @param tableNames 表名称组
* @return 数据库表集合
*/
@@ -197,7 +197,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 查询所有表信息
*
*
* @return 表信息集合
*/
@Override
@@ -208,7 +208,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 修改业务
*
*
* @param genTable 业务信息
* @return 结果
*/
@@ -230,7 +230,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 删除业务对象
*
*
* @param tableIds 需要删除的数据ID
* @return 结果
*/
@@ -244,7 +244,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 导入表结构
*
*
* @param tableList 导入表列表
*/
@Override
@@ -303,7 +303,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 预览代码
*
*
* @param tableId 表编号
* @return 预览数据列表
*/
@@ -342,7 +342,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 生成代码(下载方式)
*
*
* @param tableName 表名称
* @return 数据
*/
@@ -358,7 +358,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 生成代码(自定义路径)
*
*
* @param tableName 表名称
*/
@Override
@@ -400,7 +400,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 同步数据库
*
*
* @param tableName 表名称
*/
@Override
@@ -455,7 +455,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 批量生成代码(下载方式)
*
*
* @param tableNames 表数组
* @return 数据
*/
@@ -514,7 +514,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 修改保存参数校验
*
*
* @param genTable 业务信息
*/
@Override
@@ -552,7 +552,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 设置主键列信息
*
*
* @param table 业务表信息
*/
public void setPkColumn(GenTable table)
@@ -588,7 +588,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 设置主子表信息
*
*
* @param table 业务表信息
*/
public void setSubTable(GenTable table)
@@ -602,7 +602,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 设置代码生成其他选项值
*
*
* @param genTable 设置后的生成对象
*/
public void setTableFromOptions(GenTable genTable)
@@ -626,7 +626,7 @@ public class GenTableServiceImpl implements IGenTableService
/**
* 获取代码生成地址
*
*
* @param table 业务表信息
* @param template 模板文件路径
* @return 生成地址
@@ -640,4 +640,4 @@ public class GenTableServiceImpl implements IGenTableService
}
return genPath + File.separator + VelocityUtils.getFileName(template, table);
}
}
}

View File

@@ -1,7 +1,7 @@
package ${packageName}.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo;
/**
* ${functionName}Controller
*
*
* @author ${author}
* @date ${datetime}
*/

View File

@@ -21,7 +21,7 @@
<dependency>
<groupId>com.dtflys.forest</groupId>
<artifactId>forest-spring-boot-starter</artifactId>
<artifactId>forest-spring-boot3-starter</artifactId>
<version>${forest.version}</version>
</dependency>

View File

@@ -5,7 +5,7 @@ import com.fastbee.http.client.Cn12306;
import com.fastbee.http.client.Gitee;
import com.fastbee.http.model.*;
import com.dtflys.forest.http.ForestResponse;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

View File

@@ -1,8 +1,8 @@
package com.fastbee.http.controller;
import com.fastbee.http.client.TestInterceptorClient;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@@ -1,7 +1,7 @@
package com.fastbee.http.controller;
import com.fastbee.http.client.DownloadClient;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import org.apache.commons.io.FileUtils;
import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequest;
import java.io.*;
import java.util.LinkedHashMap;
import java.util.LinkedList;
@@ -26,13 +26,13 @@ public class TestUploadController {
private final static Logger logger = LoggerFactory.getLogger(TestUploadController.class);
@javax.annotation.Resource
@jakarta.annotation.Resource
private FileService fileService;
@Value("${fastbee.profile}")
private String uploadPath;
@javax.annotation.Resource
@jakarta.annotation.Resource
private UploadClient uploadClient;

View File

@@ -9,7 +9,7 @@ import com.fastbee.http.model.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import java.math.BigDecimal;
@Slf4j

View File

@@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.paho.client.mqttv3.*;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import java.util.Arrays;
/**

View File

@@ -9,7 +9,7 @@ import org.eclipse.paho.client.mqttv3.*;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
/**
* 发布服务mqtt客户端

View File

@@ -1,7 +1,7 @@
package com.fastbee.quartz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -32,7 +32,7 @@ import com.fastbee.quartz.util.ScheduleUtils;
/**
* 调度任务信息操作处理
*
*
* @author ruoyi
*/
@Api(tags = "调度任务信息操作处理")

View File

@@ -1,7 +1,7 @@
package com.fastbee.quartz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -24,7 +24,7 @@ import com.fastbee.quartz.service.ISysJobLogService;
/**
* 调度日志操作处理
*
*
* @author ruoyi
*/
@Api(tags = "调度日志操作处理")
@@ -61,7 +61,7 @@ public class SysJobLogController extends BaseController
ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class);
util.exportExcel(response, list, "调度日志");
}
/**
* 根据调度编号获取详细信息
*/

View File

@@ -1,8 +1,8 @@
package com.fastbee.quartz.domain;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -18,7 +18,7 @@ import com.fastbee.quartz.util.CronUtils;
/**
* 定时任务调度表 sys_job
*
*
* @author ruoyi
*/
@ApiModel(value = "SysJob", description = "定时任务调度表 sys_job")

View File

@@ -1,7 +1,7 @@
package com.fastbee.quartz.service.impl;
import java.util.List;
import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;
import org.quartz.JobDataMap;
import org.quartz.JobKey;
import org.quartz.Scheduler;
@@ -19,7 +19,7 @@ import com.fastbee.quartz.util.ScheduleUtils;
/**
* 定时任务调度信息 服务层
*
*
* @author ruoyi
*/
@Service
@@ -47,7 +47,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 获取quartz调度器的计划任务列表
*
*
* @param job 调度信息
* @return
*/
@@ -59,7 +59,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 通过调度任务ID查询调度信息
*
*
* @param jobId 调度任务ID
* @return 调度任务对象信息
*/
@@ -71,7 +71,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 暂停任务
*
*
* @param job 调度信息
*/
@Override
@@ -91,7 +91,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 恢复任务
*
*
* @param job 调度信息
*/
@Override
@@ -111,7 +111,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 删除任务后所对应的trigger也将被删除
*
*
* @param job 调度信息
*/
@Override
@@ -130,7 +130,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 批量删除调度信息
*
*
* @param jobIds 需要删除的任务ID
* @return 结果
*/
@@ -147,7 +147,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 任务调度状态修改
*
*
* @param job 调度信息
*/
@Override
@@ -169,7 +169,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 立即运行任务
*
*
* @param job 调度信息
*/
@Override
@@ -194,7 +194,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 新增任务
*
*
* @param job 调度信息 调度信息
*/
@Override
@@ -212,7 +212,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 更新任务的时间表达式
*
*
* @param job 调度信息
*/
@Override
@@ -230,7 +230,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 更新任务
*
*
* @param job 任务对象
* @param jobGroup 任务组名
*/
@@ -249,7 +249,7 @@ public class SysJobServiceImpl implements ISysJobService
/**
* 校验cron表达式是否有效
*
*
* @param cronExpression 表达式
* @return 结果
*/

View File

@@ -8,7 +8,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import jakarta.annotation.Resource;
import java.util.Objects;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;