diff --git a/springboot/fastbee-admin/pom.xml b/springboot/fastbee-admin/pom.xml index 770fa7c8..8b3cf7a7 100644 --- a/springboot/fastbee-admin/pom.xml +++ b/springboot/fastbee-admin/pom.xml @@ -39,8 +39,9 @@ - mysql - mysql-connector-java + com.mysql + mysql-connector-j + ${mysql.version} diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/FastBeeApplication.java b/springboot/fastbee-admin/src/main/java/com/fastbee/FastBeeApplication.java index ed86ee4d..cc65908a 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/FastBeeApplication.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/FastBeeApplication.java @@ -1,5 +1,6 @@ package com.fastbee; +import com.dtflys.forest.springboot.annotation.ForestScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,6 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * @author ruoyi */ @SpringBootApplication +@ForestScan(basePackages = "com.fastbee") public class FastBeeApplication { public static void main(String[] args) diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CaptchaController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CaptchaController.java index bce23720..a172b03f 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CaptchaController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CaptchaController.java @@ -3,9 +3,9 @@ package com.fastbee.web.controller.common; import java.awt.image.BufferedImage; import java.io.IOException; import java.util.concurrent.TimeUnit; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import javax.imageio.ImageIO; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -25,7 +25,7 @@ import com.fastbee.system.service.ISysConfigService; /** * 验证码操作处理 - * + * * @author ruoyi */ @Api(tags = "验证码操作") @@ -40,7 +40,7 @@ public class CaptchaController @Autowired private RedisCache redisCache; - + @Autowired private ISysConfigService configService; /** diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CommonController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CommonController.java index 97ea214b..3e176222 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CommonController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CommonController.java @@ -2,8 +2,8 @@ package com.fastbee.web.controller.common; import java.util.ArrayList; import java.util.List; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -26,7 +26,7 @@ import com.fastbee.framework.config.ServerConfig; /** * 通用请求处理 - * + * * @author ruoyi */ @Api(tags = "通用请求处理") @@ -43,7 +43,7 @@ public class CommonController /** * 通用下载请求 - * + * * @param fileName 文件名称 * @param delete 是否删除 */ diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/monitor/SysLogininforController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/monitor/SysLogininforController.java index e2e0fc07..38ab0ccd 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/monitor/SysLogininforController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/monitor/SysLogininforController.java @@ -1,7 +1,7 @@ package com.fastbee.web.controller.monitor; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -25,7 +25,7 @@ import com.fastbee.system.service.ISysLogininforService; /** * 系统访问记录 - * + * * @author ruoyi */ @Api(tags = "日志管理:登录日志") diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/monitor/SysOperlogController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/monitor/SysOperlogController.java index d6ad7141..90a0d69b 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/monitor/SysOperlogController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/monitor/SysOperlogController.java @@ -1,7 +1,7 @@ package com.fastbee.web.controller.monitor; 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.system.service.ISysOperLogService; /** * 操作日志记录 - * + * * @author ruoyi */ @Api(tags = "日志管理:操作日志") diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysConfigController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysConfigController.java index 7b48f986..c7819d93 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysConfigController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysConfigController.java @@ -1,7 +1,7 @@ package com.fastbee.web.controller.system; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictDataController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictDataController.java index 7fa03d78..6064a13e 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictDataController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictDataController.java @@ -2,7 +2,7 @@ package com.fastbee.web.controller.system; import java.util.ArrayList; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -27,7 +27,7 @@ import com.fastbee.system.service.ISysDictTypeService; /** * 数据字典信息 - * + * * @author ruoyi */ @RestController diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictTypeController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictTypeController.java index 40bac930..73d07bb2 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictTypeController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictTypeController.java @@ -1,7 +1,7 @@ package com.fastbee.web.controller.system; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysPostController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysPostController.java index 77d87b7b..bd37f07a 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysPostController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysPostController.java @@ -1,7 +1,7 @@ package com.fastbee.web.controller.system; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRoleController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRoleController.java index 19656800..3921aab0 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRoleController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRoleController.java @@ -1,7 +1,7 @@ package com.fastbee.web.controller.system; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysUserController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysUserController.java index 8f5a27c2..d1c1f804 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysUserController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysUserController.java @@ -22,7 +22,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; import java.util.stream.Collectors; diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/tool/TestController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/tool/TestController.java index f05f972a..301ca37d 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/tool/TestController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/tool/TestController.java @@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; -import javax.annotation.Resource; +import jakarta.annotation.Resource; /** * swagger 用户测试方法 diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/tool/TestController2.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/tool/TestController2.java index 6e8cf86f..7c83bdbe 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/tool/TestController2.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/tool/TestController2.java @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.HashSet; import java.util.List; import java.util.Map; diff --git a/springboot/fastbee-admin/src/main/resources/application.yml b/springboot/fastbee-admin/src/main/resources/application.yml index fb1ffa68..ccab6ce6 100644 --- a/springboot/fastbee-admin/src/main/resources/application.yml +++ b/springboot/fastbee-admin/src/main/resources/application.yml @@ -90,11 +90,20 @@ token: # mybatis-plus配置 mybatis-plus: - typeAliasesPackage: com.fastbee.**.domain # 搜索指定包别名 - mapperLocations: classpath*:mapper/**/*Mapper.xml # 配置mapper的扫描,找到所有的mapper.xml映射文件 + # 自定义配置 是否全局开启逻辑删除 关闭后 所有逻辑删除功能将失效 + enableLogicDelete: true + # 多包名使用 例如 org.dromara.**.mapper,org.xxx.**.mapper + mapperPackage: com.fastbee.**.mapper + # 对应的 XML 文件位置 + mapperLocations: classpath*:mapper/**/*Mapper.xml configLocation: classpath:mybatis/mybatis-config.xml # 加载全局的配置文件 + # 实体扫描,多个package用逗号或者分号分隔 + typeAliasesPackage: org.dromara.**.domain global-config: - db-config: + dbConfig: + # 主键类型 + # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID + # 如需改为自增 需要将数据库表全部设置为自增 id-type: AUTO # 自增 ID logic-delete-value: 1 # 逻辑已删除值(默认为 1) logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) @@ -110,3 +119,8 @@ xss: enabled: true # 过滤开关 excludes: /system/notice # 排除链接(多个用逗号分隔) urlPatterns: /system/*,/monitor/*,/tool/* # 匹配链接 + +forest: + max-connections: 1000 # 连接池最大连接数 + connect-timeout: 3000 # 连接超时时间,单位为毫秒 + read-timeout: 3000 # 数据读取超时时间,单位为毫秒 diff --git a/springboot/fastbee-common/pom.xml b/springboot/fastbee-common/pom.xml index b769c977..fae4eaec 100644 --- a/springboot/fastbee-common/pom.xml +++ b/springboot/fastbee-common/pom.xml @@ -38,7 +38,7 @@ com.baomidou - mybatis-plus-boot-starter + mybatis-plus-spring-boot3-starter @@ -74,7 +74,7 @@ com.baomidou - dynamic-datasource-spring-boot-starter + dynamic-datasource-spring-boot3-starter @@ -139,9 +139,10 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api + org.projectlombok lombok @@ -173,16 +174,16 @@ guava - - - - - com.alibaba easyexcel-core + + com.mysql + mysql-connector-j + + diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/annotation/Excel.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/annotation/Excel.java index 7b4c044b..05e0ed45 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/annotation/Excel.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/annotation/Excel.java @@ -1,14 +1,13 @@ package com.fastbee.common.annotation; -import com.fastbee.common.utils.poi.ExcelHandlerAdapter; -import org.apache.poi.ss.usermodel.HorizontalAlignment; -import org.apache.poi.ss.usermodel.IndexedColors; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.math.BigDecimal; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.IndexedColors; +import com.fastbee.common.utils.poi.ExcelHandlerAdapter; /** * 自定义导出Excel数据注解 @@ -57,6 +56,7 @@ public @interface Excel /** * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN */ + @SuppressWarnings("deprecation") public int roundingMode() default BigDecimal.ROUND_HALF_EVEN; /** diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/controller/BaseController.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/controller/BaseController.java index b331ba3b..5b9f63b1 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/controller/BaseController.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/controller/BaseController.java @@ -15,12 +15,13 @@ import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.sql.SqlUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import jakarta.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; -import javax.annotation.Resource; + import java.beans.PropertyEditorSupport; import java.util.Date; import java.util.List; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/PageParam.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/PageParam.java index b1873e70..3fc0aac6 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/PageParam.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/PageParam.java @@ -1,10 +1,11 @@ package com.fastbee.common.core.domain; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.Min; import lombok.Data; -import javax.validation.constraints.Max; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotNull; + +import jakarta.validation.constraints.NotNull; import java.io.Serializable; @Data diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/TreeSelect.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/TreeSelect.java index cbb874b8..2f90a29a 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/TreeSelect.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/TreeSelect.java @@ -4,12 +4,14 @@ import java.io.Serializable; import java.util.List; import java.util.stream.Collectors; import com.fasterxml.jackson.annotation.JsonInclude; +import com.fastbee.common.constant.UserConstants; import com.fastbee.common.core.domain.entity.SysDept; import com.fastbee.common.core.domain.entity.SysMenu; +import com.fastbee.common.utils.StringUtils; /** * Treeselect树结构实体类 - * + * * @author ruoyi */ public class TreeSelect implements Serializable @@ -22,6 +24,9 @@ public class TreeSelect implements Serializable /** 节点名称 */ private String label; + /** 节点禁用 */ + private boolean disabled = false; + /** 子节点 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children; @@ -35,6 +40,7 @@ public class TreeSelect implements Serializable { this.id = dept.getDeptId(); this.label = dept.getDeptName(); + this.disabled = StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()); this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); } @@ -65,6 +71,16 @@ public class TreeSelect implements Serializable this.label = label; } + public boolean isDisabled() + { + return disabled; + } + + public void setDisabled(boolean disabled) + { + this.disabled = disabled; + } + public List getChildren() { return children; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDept.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDept.java index d4883954..b5a5eed2 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDept.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDept.java @@ -2,20 +2,20 @@ package com.fastbee.common.core.domain.entity; import java.util.ArrayList; import java.util.List; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fastbee.common.core.domain.BaseEntity; /** * 部门表 sys_dept - * + * * @author ruoyi */ @ApiModel(value = "SysDept", description = "部门表 sys_dept") @@ -66,7 +66,7 @@ public class SysDept extends BaseEntity /** 父部门名称 */ @ApiModelProperty("父部门名称") private String parentName; - + /** 子部门 */ @ApiModelProperty("子部门") private List children = new ArrayList(); diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictData.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictData.java index 8f3d1f54..3ffc6efb 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictData.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictData.java @@ -1,8 +1,7 @@ package com.fastbee.common.core.domain.entity; -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; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -14,7 +13,7 @@ import com.fastbee.common.core.domain.BaseEntity; /** * 字典数据表 sys_dict_data - * + * * @author ruoyi */ @ApiModel(value = "SysDictData", description = "字典数据表 sys_dict_data") @@ -166,7 +165,7 @@ public class SysDictData extends BaseEntity { this.status = status; } - + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictType.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictType.java index eee07a37..0ad23b64 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictType.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictType.java @@ -1,8 +1,9 @@ package com.fastbee.common.core.domain.entity; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; + +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -14,7 +15,7 @@ import com.fastbee.common.core.domain.BaseEntity; /** * 字典类型表 sys_dict_type - * + * * @author ruoyi */ @ApiModel(value = "SysDictType", description = "字典类型表 sys_dict_type") @@ -86,7 +87,7 @@ public class SysDictType extends BaseEntity { this.status = status; } - + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysMenu.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysMenu.java index 92a73065..12c319ab 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysMenu.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysMenu.java @@ -2,9 +2,9 @@ package com.fastbee.common.core.domain.entity; import java.util.ArrayList; import java.util.List; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysRole.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysRole.java index 1e4d23bf..25c776bc 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysRole.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysRole.java @@ -1,12 +1,13 @@ package com.fastbee.common.core.domain.entity; import java.util.Set; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; + import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fastbee.common.annotation.Excel; @@ -15,7 +16,7 @@ import com.fastbee.common.core.domain.BaseEntity; /** * 角色表 sys_role - * + * * @author ruoyi */ @ApiModel(value = "SysRole", description = "角色表 sys_role") diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysUser.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysUser.java index bff8749a..dcacc202 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysUser.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysUser.java @@ -2,7 +2,9 @@ package com.fastbee.common.core.domain.entity; import java.util.Date; import java.util.List; -import javax.validation.constraints.*; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/mq/InvokeReqDto.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/mq/InvokeReqDto.java index dfb23108..22a42ce4 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/mq/InvokeReqDto.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/mq/InvokeReqDto.java @@ -5,7 +5,7 @@ import com.fastbee.common.utils.DateUtils; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import java.util.Date; import java.util.Map; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/mq/ota/OtaUpgradeBo.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/mq/ota/OtaUpgradeBo.java index 41f98343..4c88995d 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/mq/ota/OtaUpgradeBo.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/mq/ota/OtaUpgradeBo.java @@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Builder; import lombok.Data; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * OTA远程升级 diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/redis/RedisCache.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/redis/RedisCache.java index aa2f01fb..932f2eed 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/redis/RedisCache.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/redis/RedisCache.java @@ -627,7 +627,7 @@ public class RedisCache { public List scan(String query) { Set keys = (Set) redisTemplate.execute((RedisCallback>) connection -> { Set keysTmp = new HashSet<>(); - Cursor cursor = connection.scan(new ScanOptions.ScanOptionsBuilder().match(query).count(1000).build()); + Cursor cursor = connection.scan(ScanOptions.scanOptions().match(query).count(1000).build()); while (cursor.hasNext()) { keysTmp.add(new String(cursor.next())); } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/text/Convert.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/text/Convert.java index 0da5f274..dfb98c72 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/text/Convert.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/text/Convert.java @@ -1,7 +1,5 @@ package com.fastbee.common.core.text; -import com.fastbee.common.utils.StringUtils; - import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; @@ -9,6 +7,7 @@ import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.text.NumberFormat; import java.util.Set; +import com.fastbee.common.utils.StringUtils; /** * 类型转换器 diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/DesensitizedType.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/DesensitizedType.java index 4d0551c9..af597869 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/DesensitizedType.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/DesensitizedType.java @@ -1,8 +1,7 @@ package com.fastbee.common.enums; -import com.fastbee.common.utils.DesensitizedUtil; - import java.util.function.Function; +import com.fastbee.common.utils.DesensitizedUtil; /** * 脱敏类型 diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/RepeatableFilter.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/RepeatableFilter.java index ed8bdda6..3ddce5d9 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/RepeatableFilter.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/RepeatableFilter.java @@ -1,19 +1,19 @@ package com.fastbee.common.filter; import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.http.MediaType; import com.fastbee.common.utils.StringUtils; /** * Repeatable 过滤器 - * + * * @author ruoyi */ public class RepeatableFilter implements Filter diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/RepeatedlyRequestWrapper.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/RepeatedlyRequestWrapper.java index 53429f37..567d1c13 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/RepeatedlyRequestWrapper.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/RepeatedlyRequestWrapper.java @@ -4,17 +4,17 @@ import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStreamReader; -import javax.servlet.ReadListener; -import javax.servlet.ServletInputStream; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; +import jakarta.servlet.ReadListener; +import jakarta.servlet.ServletInputStream; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; import com.fastbee.common.utils.http.HttpHelper; import com.fastbee.common.constant.Constants; /** * 构建可重复读取inputStream的request - * + * * @author ruoyi */ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/XssFilter.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/XssFilter.java index c8484ba9..edc40665 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/XssFilter.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/XssFilter.java @@ -3,14 +3,14 @@ package com.fastbee.common.filter; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.enums.HttpMethod; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/XssHttpServletRequestWrapper.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/XssHttpServletRequestWrapper.java index a514cf91..72467e7b 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/XssHttpServletRequestWrapper.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/filter/XssHttpServletRequestWrapper.java @@ -2,10 +2,10 @@ package com.fastbee.common.filter; import java.io.ByteArrayInputStream; import java.io.IOException; -import javax.servlet.ReadListener; -import javax.servlet.ServletInputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; +import jakarta.servlet.ReadListener; +import jakarta.servlet.ServletInputStream; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; import org.apache.commons.io.IOUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -14,7 +14,7 @@ import com.fastbee.common.utils.html.EscapeUtil; /** * XSS过滤处理 - * + * * @author ruoyi */ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper @@ -100,7 +100,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper /** * 是否是Json请求 - * + * * @param request */ public boolean isJsonRequest() @@ -108,4 +108,4 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper String header = super.getHeader(HttpHeaders.CONTENT_TYPE); return StringUtils.startsWithIgnoreCase(header, MediaType.APPLICATION_JSON_VALUE); } -} \ No newline at end of file +} diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DictUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DictUtils.java index c81adad0..d456202f 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DictUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DictUtils.java @@ -1,14 +1,13 @@ package com.fastbee.common.utils; +import java.util.Collection; +import java.util.List; import com.alibaba.fastjson2.JSONArray; import com.fastbee.common.constant.CacheConstants; import com.fastbee.common.core.domain.entity.SysDictData; import com.fastbee.common.core.redis.RedisCache; import com.fastbee.common.utils.spring.SpringUtils; -import java.util.Collection; -import java.util.List; - /** * 字典工具类 * diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ExceptionUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ExceptionUtils.java index 7c355cb1..868a3cbe 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ExceptionUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ExceptionUtils.java @@ -2,7 +2,7 @@ package com.fastbee.common.utils; import lombok.NoArgsConstructor; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ServletUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ServletUtils.java index 0eef316b..a7c3bcd7 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ServletUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ServletUtils.java @@ -7,12 +7,10 @@ import java.net.URLEncoder; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import javax.servlet.ServletRequest; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import cn.hutool.extra.servlet.ServletUtil; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @@ -217,12 +215,4 @@ public class ServletUtils return StringUtils.EMPTY; } } - - public static String getClientIP() { - HttpServletRequest request = getRequest(); - if (request == null) { - return null; - } - return ServletUtil.getClientIP(request); - } } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ValidationUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ValidationUtils.java index 34cfd92a..905c37a3 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ValidationUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ValidationUtils.java @@ -4,10 +4,10 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; import org.springframework.util.StringUtils; -import javax.validation.ConstraintViolation; -import javax.validation.ConstraintViolationException; -import javax.validation.Validation; -import javax.validation.Validator; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.Validation; +import jakarta.validation.Validator; import java.util.Set; import java.util.regex.Pattern; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/bean/BeanValidators.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/bean/BeanValidators.java index 050a5ab4..c7f7e72a 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/bean/BeanValidators.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/bean/BeanValidators.java @@ -1,13 +1,13 @@ package com.fastbee.common.utils.bean; import java.util.Set; -import javax.validation.ConstraintViolation; -import javax.validation.ConstraintViolationException; -import javax.validation.Validator; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.Validator; /** * bean对象属性验证 - * + * * @author ruoyi */ public class BeanValidators diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/file/FileUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/file/FileUtils.java index 3fdcb711..bdadf98f 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/file/FileUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/file/FileUtils.java @@ -9,8 +9,8 @@ import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.IdUtil; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/http/HttpHelper.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/http/HttpHelper.java index 719a60b2..9df42411 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/http/HttpHelper.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/http/HttpHelper.java @@ -5,14 +5,14 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; -import javax.servlet.ServletRequest; +import jakarta.servlet.ServletRequest; import org.apache.commons.lang3.exception.ExceptionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * 通用http工具封装 - * + * * @author ruoyi */ public class HttpHelper diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ip/IpUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ip/IpUtils.java index d1456b04..a36a311d 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ip/IpUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/ip/IpUtils.java @@ -1,11 +1,10 @@ package com.fastbee.common.utils.ip; -import com.fastbee.common.utils.ServletUtils; -import com.fastbee.common.utils.StringUtils; - -import javax.servlet.http.HttpServletRequest; import java.net.InetAddress; import java.net.UnknownHostException; +import jakarta.servlet.http.HttpServletRequest; +import com.fastbee.common.utils.ServletUtils; +import com.fastbee.common.utils.StringUtils; /** * 获取IP方法 diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/poi/ExcelUtil.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/poi/ExcelUtil.java index b61bc00e..d72a6c3a 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/poi/ExcelUtil.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/poi/ExcelUtil.java @@ -30,7 +30,7 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.*; import java.lang.reflect.Field; import java.lang.reflect.Method; diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/xss/Xss.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/xss/Xss.java index 5f79e8a0..d2e0e133 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/xss/Xss.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/xss/Xss.java @@ -1,7 +1,7 @@ package com.fastbee.common.xss; -import javax.validation.Constraint; -import javax.validation.Payload; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -9,7 +9,7 @@ import java.lang.annotation.Target; /** * 自定义xss校验注解 - * + * * @author ruoyi */ @Retention(RetentionPolicy.RUNTIME) diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/xss/XssValidator.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/xss/XssValidator.java index 8cf72a75..1de3f116 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/xss/XssValidator.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/xss/XssValidator.java @@ -1,8 +1,8 @@ package com.fastbee.common.xss; import com.fastbee.common.utils.StringUtils; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/springboot/fastbee-framework/pom.xml b/springboot/fastbee-framework/pom.xml index 6a9ecba0..e2c1d0bd 100644 --- a/springboot/fastbee-framework/pom.xml +++ b/springboot/fastbee-framework/pom.xml @@ -42,7 +42,7 @@ com.alibaba - druid-spring-boot-starter + druid-spring-boot-3-starter @@ -66,10 +66,15 @@ com.baomidou - dynamic-datasource-spring-boot-starter + dynamic-datasource-spring-boot3-starter ${dynamic-datasource.version} + + com.baomidou + mybatis-plus-jsqlparser + + diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/aspectj/LogAspect.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/aspectj/LogAspect.java index 6611f04f..e07b4884 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/aspectj/LogAspect.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/aspectj/LogAspect.java @@ -29,8 +29,8 @@ import org.springframework.stereotype.Component; import org.springframework.validation.BindingResult; import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.Collection; import java.util.Map; diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/DruidConfig.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/DruidConfig.java index 367e693f..e219b97c 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/DruidConfig.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/DruidConfig.java @@ -1,13 +1,16 @@ package com.fastbee.framework.config; -import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; +import com.alibaba.druid.spring.boot3.autoconfigure.properties.DruidStatProperties; import com.alibaba.druid.util.Utils; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; - -import javax.servlet.*; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; import java.io.IOException; @Configuration @@ -30,7 +33,7 @@ public class DruidConfig { Filter filter = new Filter() { @Override - public void init(javax.servlet.FilterConfig filterConfig) throws ServletException + public void init(jakarta.servlet.FilterConfig filterConfig) throws ServletException { } @Override diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/FilterConfig.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/FilterConfig.java index 37c890a4..493de117 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/FilterConfig.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/FilterConfig.java @@ -1,17 +1,16 @@ package com.fastbee.framework.config; -import com.fastbee.common.filter.RepeatableFilter; -import com.fastbee.common.filter.XssFilter; -import com.fastbee.common.utils.StringUtils; +import java.util.HashMap; +import java.util.Map; +import jakarta.servlet.DispatcherType; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; - -import javax.servlet.DispatcherType; -import java.util.HashMap; -import java.util.Map; +import com.fastbee.common.filter.RepeatableFilter; +import com.fastbee.common.filter.XssFilter; +import com.fastbee.common.utils.StringUtils; /** * Filter配置 diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SecurityConfig.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SecurityConfig.java index 74f4a9a0..cd3d4988 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SecurityConfig.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SecurityConfig.java @@ -111,17 +111,17 @@ public class SecurityConfig .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) // 注解标记允许匿名访问的url .authorizeHttpRequests((requests) -> { - permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll()); + permitAllUrl.getUrls().forEach(url -> requests.requestMatchers(url).permitAll()); // 对于登录login 注册register 验证码captchaImage 允许匿名访问 // 静态资源,可匿名访问 - requests.antMatchers("/login", "/register", "/captchaImage","/iot/tool/register","/iot/tool/ntp","/iot/tool/download", + requests.requestMatchers("/login", "/register", "/captchaImage","/iot/tool/register","/iot/tool/ntp","/iot/tool/download", "/iot/tool/mqtt/auth","/iot/tool/mqtt/authv5","/iot/tool/mqtt/webhook","/iot/tool/mqtt/webhookv5","/auth/**/**", "/wechat/mobileLogin", "/wechat/miniLogin", "/wechat/wxBind/callback").permitAll() - .antMatchers("/zlmhook/**").permitAll() - .antMatchers("/goview/sys/login","/goview/project/getData").permitAll() + .requestMatchers("/zlmhook/**").permitAll() + .requestMatchers("/goview/sys/login","/goview/project/getData").permitAll() // 静态资源,可匿名访问 - .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() - .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() + .requestMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() + .requestMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated(); }) diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/ServerConfig.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/ServerConfig.java index 993af48a..11299bd7 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/ServerConfig.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/ServerConfig.java @@ -3,7 +3,7 @@ package com.fastbee.framework.config; import com.fastbee.common.utils.ServletUtils; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * 服务相关配置 diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SqlFilterArgumentResolver.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SqlFilterArgumentResolver.java index f1acaa53..31b5d6fb 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SqlFilterArgumentResolver.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SqlFilterArgumentResolver.java @@ -10,7 +10,7 @@ import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.ModelAndViewContainer; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/RepeatSubmitInterceptor.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/RepeatSubmitInterceptor.java index 778021a9..e666fcee 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/RepeatSubmitInterceptor.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/RepeatSubmitInterceptor.java @@ -1,8 +1,8 @@ package com.fastbee.framework.interceptor; import java.lang.reflect.Method; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.stereotype.Component; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.HandlerInterceptor; diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/impl/SameUrlDataInterceptor.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/impl/SameUrlDataInterceptor.java index fabf4f9e..f862c7b8 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/impl/SameUrlDataInterceptor.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/impl/SameUrlDataInterceptor.java @@ -3,7 +3,7 @@ package com.fastbee.framework.interceptor.impl; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -19,7 +19,7 @@ import com.fastbee.framework.interceptor.RepeatSubmitInterceptor; /** * 判断请求url和数据是否和上一次相同, * 如果和上次相同,则是重复提交表单。 有效时间为10秒内。 - * + * * @author ruoyi */ @Component diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/manager/ShutdownManager.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/manager/ShutdownManager.java index a4e6efdd..114b81fb 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/manager/ShutdownManager.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/manager/ShutdownManager.java @@ -3,7 +3,7 @@ package com.fastbee.framework.manager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -import javax.annotation.PreDestroy; +import jakarta.annotation.PreDestroy; /** * 确保应用退出时能关闭后台线程 diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/mybatis/config/AutoPaginationInnerInterceptor.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/mybatis/config/AutoPaginationInnerInterceptor.java index f98e656b..bf91f0f7 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/mybatis/config/AutoPaginationInnerInterceptor.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/mybatis/config/AutoPaginationInnerInterceptor.java @@ -1,6 +1,5 @@ package com.fastbee.framework.mybatis.config; - import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import com.baomidou.mybatisplus.extension.plugins.pagination.DialectFactory; import com.baomidou.mybatisplus.extension.plugins.pagination.dialects.IDialect; diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/mybatis/config/MybatisPlusConfig.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/mybatis/config/MybatisPlusConfig.java index 22a08a8e..044c76e2 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/mybatis/config/MybatisPlusConfig.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/mybatis/config/MybatisPlusConfig.java @@ -4,11 +4,13 @@ import cn.hutool.core.net.NetUtil; import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator; import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import com.fastbee.framework.config.SqlFilterArgumentResolver; import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; + +import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -17,8 +19,8 @@ import java.util.List; /** * @author admin */ -@Configuration(proxyBeanMethods = false) -@MapperScan("com.fastbee.**.mapper") +@EnableTransactionManagement(proxyTargetClass = true) +@MapperScan("${mybatis-plus.mapperPackage}") public class MybatisPlusConfig implements WebMvcConfigurer { /** @@ -30,13 +32,6 @@ public class MybatisPlusConfig implements WebMvcConfigurer { argumentResolvers.add(new SqlFilterArgumentResolver()); } - @Bean - public MybatisPlusInterceptor mybatisPlusInterceptor() { - MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); - interceptor.addInnerInterceptor(paginationInnerInterceptor()); - return interceptor; - } - /** * 分页插件,自动识别数据库类型 */ @@ -64,4 +59,26 @@ public class MybatisPlusConfig implements WebMvcConfigurer { return new MybatisPlusMetaObjectHandler(); } + + /** + * 乐观锁插件 + */ + public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor() { + return new OptimisticLockerInnerInterceptor(); + } + + @Bean + public MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + // 数据权限处理 + // interceptor.addInnerInterceptor(dataPermissionInterceptor()); + // 分页插件 + interceptor.addInnerInterceptor(paginationInnerInterceptor()); + // 乐观锁插件 + interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor()); + return interceptor; + } + + + } diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/filter/JwtAuthenticationTokenFilter.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/filter/JwtAuthenticationTokenFilter.java index 6d190782..2f79f0e4 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/filter/JwtAuthenticationTokenFilter.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/filter/JwtAuthenticationTokenFilter.java @@ -1,10 +1,10 @@ package com.fastbee.framework.security.filter; import java.io.IOException; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.context.SecurityContextHolder; @@ -18,7 +18,7 @@ import com.fastbee.framework.web.service.TokenService; /** * token过滤器 验证token有效性 - * + * * @author ruoyi */ @Component diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/handle/AuthenticationEntryPointImpl.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/handle/AuthenticationEntryPointImpl.java index de193326..066fa3a9 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/handle/AuthenticationEntryPointImpl.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/handle/AuthenticationEntryPointImpl.java @@ -2,8 +2,8 @@ package com.fastbee.framework.security.handle; import java.io.IOException; import java.io.Serializable; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.AuthenticationEntryPoint; import org.springframework.stereotype.Component; @@ -15,7 +15,7 @@ import com.fastbee.common.utils.StringUtils; /** * 认证失败处理类 返回未授权 - * + * * @author ruoyi */ @Component diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/handle/LogoutSuccessHandlerImpl.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/handle/LogoutSuccessHandlerImpl.java index 32530ba6..527ff512 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/handle/LogoutSuccessHandlerImpl.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/security/handle/LogoutSuccessHandlerImpl.java @@ -1,11 +1,9 @@ package com.fastbee.framework.security.handle; import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.fastbee.common.utils.MessageUtils; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.security.core.Authentication; @@ -14,6 +12,7 @@ import com.alibaba.fastjson2.JSON; import com.fastbee.common.constant.Constants; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.domain.model.LoginUser; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.ServletUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.framework.manager.AsyncManager; diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/Server.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/Server.java index 28ba3af1..0226538d 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/Server.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/Server.java @@ -1,8 +1,16 @@ package com.fastbee.framework.web.domain; +import java.net.UnknownHostException; +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; import com.fastbee.common.utils.Arith; import com.fastbee.common.utils.ip.IpUtils; -import com.fastbee.framework.web.domain.server.*; +import com.fastbee.framework.web.domain.server.Cpu; +import com.fastbee.framework.web.domain.server.Jvm; +import com.fastbee.framework.web.domain.server.Mem; +import com.fastbee.framework.web.domain.server.Sys; +import com.fastbee.framework.web.domain.server.SysFile; import oshi.SystemInfo; import oshi.hardware.CentralProcessor; import oshi.hardware.CentralProcessor.TickType; @@ -13,11 +21,6 @@ import oshi.software.os.OSFileStore; import oshi.software.os.OperatingSystem; import oshi.util.Util; -import java.net.UnknownHostException; -import java.util.LinkedList; -import java.util.List; -import java.util.Properties; - /** * 服务器相关信息 * diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/server/Jvm.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/server/Jvm.java index 8ea3296a..9a2bfce3 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/server/Jvm.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/server/Jvm.java @@ -1,11 +1,9 @@ package com.fastbee.framework.web.domain.server; - +import java.lang.management.ManagementFactory; import com.fastbee.common.utils.Arith; import com.fastbee.common.utils.DateUtils; -import java.lang.management.ManagementFactory; - /** * JVM相关信息 * diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/server/Mem.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/server/Mem.java index ccded294..7313e32a 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/server/Mem.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/domain/server/Mem.java @@ -1,6 +1,5 @@ package com.fastbee.framework.web.domain.server; - import com.fastbee.common.utils.Arith; /** diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/exception/GlobalExceptionHandler.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/exception/GlobalExceptionHandler.java index bc6bc84c..1530bf64 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/exception/GlobalExceptionHandler.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/exception/GlobalExceptionHandler.java @@ -1,6 +1,6 @@ package com.fastbee.framework.web.exception; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.access.AccessDeniedException; diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/SysLoginService.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/SysLoginService.java index 4a9a3405..bf0898a0 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/SysLoginService.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/SysLoginService.java @@ -26,7 +26,7 @@ import org.springframework.security.core.Authentication; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; /** * 登录校验方法 diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/TokenService.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/TokenService.java index 121e71bb..41b54d9a 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/TokenService.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/TokenService.java @@ -1,8 +1,21 @@ package com.fastbee.framework.web.service; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +import com.fastbee.common.core.domain.entity.SysUser; +import com.fastbee.system.domain.SysClient; +import com.fastbee.system.service.ISysClientService; +import jakarta.servlet.http.HttpServletRequest; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.stereotype.Component; import com.fastbee.common.constant.CacheConstants; import com.fastbee.common.constant.Constants; -import com.fastbee.common.core.domain.entity.SysUser; import com.fastbee.common.core.domain.model.LoginUser; import com.fastbee.common.core.redis.RedisCache; import com.fastbee.common.utils.ServletUtils; @@ -10,24 +23,10 @@ import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.ip.AddressUtils; import com.fastbee.common.utils.ip.IpUtils; import com.fastbee.common.utils.uuid.IdUtils; -import com.fastbee.system.domain.SysClient; -import com.fastbee.system.service.ISysClientService; import eu.bitwalker.useragentutils.UserAgent; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.stereotype.Component; - -import javax.servlet.http.HttpServletRequest; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.TimeUnit; - /** * token验证处理 diff --git a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/redischannel/consumer/DeviceOtherMsgConsumer.java b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/redischannel/consumer/DeviceOtherMsgConsumer.java index be32c0ad..1d8376be 100644 --- a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/redischannel/consumer/DeviceOtherMsgConsumer.java +++ b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/redischannel/consumer/DeviceOtherMsgConsumer.java @@ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; /** * @author gsb diff --git a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/redischannel/listen/DeviceOtherListen.java b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/redischannel/listen/DeviceOtherListen.java index 706c5c94..9de59e7c 100644 --- a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/redischannel/listen/DeviceOtherListen.java +++ b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/redischannel/listen/DeviceOtherListen.java @@ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; /** * @author gsb diff --git a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/service/impl/DeviceOtherMsgHandler.java b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/service/impl/DeviceOtherMsgHandler.java index b8091d3e..24adb211 100644 --- a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/service/impl/DeviceOtherMsgHandler.java +++ b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/service/impl/DeviceOtherMsgHandler.java @@ -6,10 +6,9 @@ import com.fastbee.mq.model.ReportDataBo; import com.fastbee.mq.service.IDataHandler; import com.fastbee.mq.service.IMqttMessagePublish; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; /** * @author gsb diff --git a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/service/impl/FunctionInvokeImpl.java b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/service/impl/FunctionInvokeImpl.java index 970a9cdf..f8d5f1e7 100644 --- a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/service/impl/FunctionInvokeImpl.java +++ b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/service/impl/FunctionInvokeImpl.java @@ -1,25 +1,16 @@ package com.fastbee.mq.service.impl; -import com.fastbee.common.core.mq.DeviceReplyBo; import com.fastbee.common.core.mq.InvokeReqDto; import com.fastbee.common.core.mq.MQSendMessageBo; -import com.fastbee.common.core.mq.MessageReplyBo; -import com.fastbee.common.core.protocol.modbus.ModbusCode; -import com.fastbee.common.core.redis.RedisCache; -import com.fastbee.common.core.redis.RedisKeyBuilder; import com.fastbee.common.enums.ThingsModelType; import com.fastbee.common.utils.bean.BeanUtils; import com.fastbee.iot.util.SnowflakeIdWorker; -import com.fastbee.mq.redischannel.producer.MessageProducer; import com.fastbee.mq.service.IFunctionInvoke; import com.fastbee.mq.service.IMqttMessagePublish; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; +import jakarta.annotation.Resource; /** * @author gsb diff --git a/springboot/fastbee-gateway/gateway-boot/src/main/java/com/fastbee/gateway/boot/start/StartBoot.java b/springboot/fastbee-gateway/gateway-boot/src/main/java/com/fastbee/gateway/boot/start/StartBoot.java index 2990f581..46e57d05 100644 --- a/springboot/fastbee-gateway/gateway-boot/src/main/java/com/fastbee/gateway/boot/start/StartBoot.java +++ b/springboot/fastbee-gateway/gateway-boot/src/main/java/com/fastbee/gateway/boot/start/StartBoot.java @@ -10,7 +10,7 @@ import org.springframework.boot.ApplicationRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; /** * 启动类 diff --git a/springboot/fastbee-gateway/gateway-boot/src/main/java/com/fastbee/gateway/boot/start/subscribeCallback.java b/springboot/fastbee-gateway/gateway-boot/src/main/java/com/fastbee/gateway/boot/start/subscribeCallback.java index c8b81602..9770df45 100644 --- a/springboot/fastbee-gateway/gateway-boot/src/main/java/com/fastbee/gateway/boot/start/subscribeCallback.java +++ b/springboot/fastbee-gateway/gateway-boot/src/main/java/com/fastbee/gateway/boot/start/subscribeCallback.java @@ -13,7 +13,7 @@ import org.eclipse.paho.client.mqttv3.IMqttMessageListener; import org.eclipse.paho.client.mqttv3.MqttMessage; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Objects; diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/CategoryController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/CategoryController.java index e0415769..b7f8577a 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/CategoryController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/CategoryController.java @@ -1,13 +1,9 @@ package com.fastbee.data.controller; -import java.util.ArrayList; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; -import com.fastbee.common.core.domain.entity.SysRole; -import com.fastbee.common.core.domain.entity.SysUser; import com.fastbee.common.core.page.TableDataInfo; -import com.fastbee.iot.model.IdAndName; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -30,7 +26,7 @@ import com.fastbee.common.utils.poi.ExcelUtil; /** * 产品分类Controller - * + * * @author kerwincui * @date 2021-12-16 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java index 838b877d..3ac7f4d0 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java @@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; /** diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceJobController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceJobController.java index b1360538..ab0819d8 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceJobController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceJobController.java @@ -17,12 +17,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; /** * 调度任务信息操作处理 - * + * * @author kerwincui */ @Api(tags = "调度任务信息操作处理模块") diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceLogController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceLogController.java index 90851090..782e5e4c 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceLogController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceLogController.java @@ -1,13 +1,8 @@ package com.fastbee.data.controller; -import com.fastbee.common.annotation.Log; import com.fastbee.common.core.controller.BaseController; -import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.page.TableDataInfo; -import com.fastbee.common.enums.BusinessType; -import com.fastbee.common.utils.poi.ExcelUtil; import com.fastbee.iot.domain.DeviceLog; -import com.fastbee.iot.model.HistoryModel; import com.fastbee.iot.model.MonitorModel; import com.fastbee.iot.service.IDeviceLogService; import io.swagger.annotations.Api; @@ -16,9 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import java.util.List; -import java.util.Map; /** * 设备日志Controller diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/EventLogController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/EventLogController.java index b539097e..0cebc913 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/EventLogController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/EventLogController.java @@ -1,7 +1,7 @@ package com.fastbee.data.controller; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import com.fastbee.iot.domain.EventLog; import io.swagger.annotations.Api; @@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo; /** * 事件日志Controller - * + * * @author kerwincui * @date 2023-03-28 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/FunctionLogController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/FunctionLogController.java index f6d8e682..e1a83dba 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/FunctionLogController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/FunctionLogController.java @@ -1,7 +1,7 @@ package com.fastbee.data.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; @@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo; /** * 设备服务下发日志Controller - * + * * @author kerwincui * @date 2022-10-22 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/GroupController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/GroupController.java index 68c314a9..d75d048c 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/GroupController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/GroupController.java @@ -1,10 +1,8 @@ package com.fastbee.data.controller; -import java.util.ArrayList; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; -import com.fastbee.iot.domain.DeviceGroup; import com.fastbee.iot.model.DeviceGroupInput; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -29,7 +27,7 @@ import com.fastbee.common.core.page.TableDataInfo; /** * 设备分组Controller - * + * * @author kerwincui * @date 2021-12-16 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/NewsCategoryController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/NewsCategoryController.java index f06a148f..1435bd8b 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/NewsCategoryController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/NewsCategoryController.java @@ -1,7 +1,7 @@ package com.fastbee.data.controller; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import com.fastbee.iot.model.IdAndName; import io.swagger.annotations.Api; @@ -27,7 +27,7 @@ import com.fastbee.common.core.page.TableDataInfo; /** * 新闻分类Controller - * + * * @author kerwincui * @date 2022-04-09 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/NewsController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/NewsController.java index 5009d09c..35423630 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/NewsController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/NewsController.java @@ -1,7 +1,7 @@ package com.fastbee.data.controller; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import com.fastbee.iot.model.CategoryNews; import io.swagger.annotations.Api; @@ -27,7 +27,7 @@ import com.fastbee.common.core.page.TableDataInfo; /** * 新闻资讯Controller - * + * * @author kerwincui * @date 2022-04-09 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/OauthClientDetailsController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/OauthClientDetailsController.java index fa31282e..1c6b5156 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/OauthClientDetailsController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/OauthClientDetailsController.java @@ -1,7 +1,7 @@ package com.fastbee.data.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; @@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo; /** * 云云对接Controller - * + * * @author kerwincui * @date 2022-02-07 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ProductAuthorizeController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ProductAuthorizeController.java index 8cb063e6..f1c871f1 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ProductAuthorizeController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ProductAuthorizeController.java @@ -1,12 +1,11 @@ package com.fastbee.data.controller; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import com.fastbee.iot.model.ProductAuthorizeVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.apache.poi.ss.formula.functions.T; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -21,7 +20,7 @@ import com.fastbee.common.core.page.TableDataInfo; /** * 产品授权码Controller - * + * * @author kami * @date 2022-04-11 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ProductController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ProductController.java index 08f82d55..21b7e01d 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ProductController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ProductController.java @@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; /** diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SceneController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SceneController.java index ea26b1fd..482c9baa 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SceneController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SceneController.java @@ -15,7 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; /** diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ScriptController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ScriptController.java index 29eb6002..83cb5432 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ScriptController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ScriptController.java @@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; /** diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialLoginController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialLoginController.java index f54f2f95..642b15c6 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialLoginController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialLoginController.java @@ -11,8 +11,8 @@ import me.zhyd.oauth.model.AuthCallback; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; /** diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialPlatformController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialPlatformController.java index 873935ad..0945ef4e 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialPlatformController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialPlatformController.java @@ -1,7 +1,7 @@ package com.fastbee.data.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; diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelController.java index 7f2b6eaa..91575781 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelController.java @@ -5,7 +5,6 @@ import com.fastbee.common.core.controller.BaseController; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.page.TableDataInfo; import com.fastbee.common.enums.BusinessType; -import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.poi.ExcelUtil; import com.fastbee.iot.domain.ThingsModel; import com.fastbee.iot.model.ImportThingsModelInput; @@ -19,13 +18,12 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletResponse; -import java.util.Arrays; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; /** * 物模型Controller - * + * * @author kerwincui * @date 2021-12-16 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelTemplateController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelTemplateController.java index 74cf2c9e..f63080fe 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelTemplateController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelTemplateController.java @@ -1,12 +1,8 @@ package com.fastbee.data.controller; -import java.util.ArrayList; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; -import com.fastbee.common.core.domain.entity.SysRole; -import com.fastbee.common.core.domain.entity.SysUser; -import com.fastbee.iot.domain.ThingsModel; import com.fastbee.iot.domain.VarTemp; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ToolController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ToolController.java index 52a79329..d8e240ed 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ToolController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ToolController.java @@ -44,9 +44,9 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/dashBoard/DashBoardController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/dashBoard/DashBoardController.java index 9ff74d14..5efd745a 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/dashBoard/DashBoardController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/dashBoard/DashBoardController.java @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; /** * 首页面板和大屏数据 diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/MediaServerController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/MediaServerController.java index ca32d247..32dec3f7 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/MediaServerController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/MediaServerController.java @@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.List; diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/SipDeviceChannelController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/SipDeviceChannelController.java index 4f5e314b..1e435743 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/SipDeviceChannelController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/SipDeviceChannelController.java @@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; /** diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/SipDeviceController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/SipDeviceController.java index 34d67187..49794d0d 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/SipDeviceController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/media/SipDeviceController.java @@ -17,7 +17,7 @@ import org.springframework.http.MediaType; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.io.InputStream; diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/netty/NettyManagerController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/netty/NettyManagerController.java index 529fb8c3..021c2af6 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/netty/NettyManagerController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/netty/NettyManagerController.java @@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/protocol/ProtocolController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/protocol/ProtocolController.java index a1011fe1..78894848 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/protocol/ProtocolController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/protocol/ProtocolController.java @@ -1,7 +1,7 @@ package com.fastbee.data.controller.protocol; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo; /** * 协议Controller - * + * * @author kerwincui * @date 2022-12-07 */ diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/runtime/DeviceRuntimeController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/runtime/DeviceRuntimeController.java index 9b0b07eb..8d5a46a1 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/runtime/DeviceRuntimeController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/runtime/DeviceRuntimeController.java @@ -5,7 +5,6 @@ import com.fastbee.common.core.controller.BaseController; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.mq.InvokeReqDto; import com.fastbee.common.core.page.TableDataInfo; -import com.fastbee.common.core.redis.RedisCache; import com.fastbee.common.enums.ThingsModelType; import com.fastbee.common.exception.ServiceException; import com.fastbee.common.utils.StringUtils; @@ -19,10 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import javax.validation.Valid; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; import java.util.List; -import java.util.Map; /** * 设备运行时数据controller diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/wechat/WeChatController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/wechat/WeChatController.java index 01d68fa0..75b597c8 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/wechat/WeChatController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/wechat/WeChatController.java @@ -16,9 +16,9 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; /** diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/service/impl/DeviceJob.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/service/impl/DeviceJob.java index 7497f5ef..6fa15e81 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/service/impl/DeviceJob.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/service/impl/DeviceJob.java @@ -19,7 +19,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.Objects; diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/service/impl/DeviceJobServiceImpl.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/service/impl/DeviceJobServiceImpl.java index d055cc5f..b76b3089 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/service/impl/DeviceJobServiceImpl.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/service/impl/DeviceJobServiceImpl.java @@ -5,8 +5,6 @@ import com.fastbee.common.exception.job.TaskException; import com.fastbee.iot.domain.DeviceJob; import com.fastbee.iot.mapper.DeviceJobMapper; import com.fastbee.iot.service.IDeviceJobService; -import com.fastbee.iot.service.IDeviceService; -import com.fastbee.iot.service.cache.IDeviceCache; import com.fastbee.data.quartz.CronUtils; import com.fastbee.data.quartz.ScheduleUtils; import com.fastbee.quartz.domain.SysJob; @@ -17,17 +15,16 @@ import org.quartz.JobKey; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.PostConstruct; -import javax.annotation.Resource; +import jakarta.annotation.PostConstruct; + import java.util.List; /** * 定时任务调度信息 服务层 - * + * * @author kerwincui */ @Service @@ -68,7 +65,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 获取quartz调度器的计划任务列表 - * + * * @param job 调度信息 * @return */ @@ -80,7 +77,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 通过调度任务ID查询调度信息 - * + * * @param jobId 调度任务ID * @return 调度任务对象信息 */ @@ -92,7 +89,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 暂停任务 - * + * * @param job 调度信息 */ @Override @@ -112,7 +109,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 恢复任务 - * + * * @param job 调度信息 */ @Override @@ -132,7 +129,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 删除任务后,所对应的trigger也将被删除 - * + * * @param job 调度信息 */ @Override @@ -151,7 +148,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 批量删除调度信息 - * + * * @param jobIds 需要删除的任务ID * @return 结果 */ @@ -228,7 +225,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 任务调度状态修改 - * + * * @param job 调度信息 */ @Override @@ -250,7 +247,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 立即运行任务 - * + * * @param job 调度信息 */ @Override @@ -268,7 +265,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 新增任务 - * + * * @param deviceJob 调度信息 调度信息 */ @Override @@ -285,7 +282,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 更新任务的时间表达式 - * + * * @param deviceJob 调度信息 */ @Override @@ -303,7 +300,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 更新任务 - * + * * @param deviceJob 任务对象 * @param jobGroup 任务组名 */ @@ -322,7 +319,7 @@ public class DeviceJobServiceImpl implements IDeviceJobService /** * 校验cron表达式是否有效 - * + * * @param cronExpression 表达式 * @return 结果 */ diff --git a/springboot/fastbee-plugs/fastbee-generator/pom.xml b/springboot/fastbee-plugs/fastbee-generator/pom.xml index cb694427..6a7a77b0 100644 --- a/springboot/fastbee-plugs/fastbee-generator/pom.xml +++ b/springboot/fastbee-plugs/fastbee-generator/pom.xml @@ -33,6 +33,7 @@ com.fastbee fastbee-common + com.fastbee fastbee-framework diff --git a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/controller/GenController.java b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/controller/GenController.java index 950cf81f..f642f2d6 100644 --- a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/controller/GenController.java +++ b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/controller/GenController.java @@ -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()); } -} \ No newline at end of file +} diff --git a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/domain/GenTable.java b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/domain/GenTable.java index 50189af0..1dcae43e 100644 --- a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/domain/GenTable.java +++ b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/domain/GenTable.java @@ -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; } -} \ No newline at end of file +} diff --git a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/domain/GenTableColumn.java b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/domain/GenTableColumn.java index 654bd2eb..780693d1 100644 --- a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/domain/GenTableColumn.java +++ b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/domain/GenTableColumn.java @@ -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") diff --git a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/service/GenTableServiceImpl.java b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/service/GenTableServiceImpl.java index 8f8f735c..4c55d219 100644 --- a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/service/GenTableServiceImpl.java +++ b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/service/GenTableServiceImpl.java @@ -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); } -} \ No newline at end of file +} diff --git a/springboot/fastbee-plugs/fastbee-generator/src/main/resources/vm/java/controller.java.vm b/springboot/fastbee-plugs/fastbee-generator/src/main/resources/vm/java/controller.java.vm index a5a9891f..37d176b0 100644 --- a/springboot/fastbee-plugs/fastbee-generator/src/main/resources/vm/java/controller.java.vm +++ b/springboot/fastbee-plugs/fastbee-generator/src/main/resources/vm/java/controller.java.vm @@ -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} */ diff --git a/springboot/fastbee-plugs/fastbee-http/pom.xml b/springboot/fastbee-plugs/fastbee-http/pom.xml index 4c9e5016..ccc98be9 100644 --- a/springboot/fastbee-plugs/fastbee-http/pom.xml +++ b/springboot/fastbee-plugs/fastbee-http/pom.xml @@ -21,7 +21,7 @@ com.dtflys.forest - forest-spring-boot-starter + forest-spring-boot3-starter ${forest.version} diff --git a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/ForestExampleController.java b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/ForestExampleController.java index 147ae3c9..01b9a5d7 100644 --- a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/ForestExampleController.java +++ b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/ForestExampleController.java @@ -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; diff --git a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/InterceptorController.java b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/InterceptorController.java index 6693c745..9a9d6622 100644 --- a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/InterceptorController.java +++ b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/InterceptorController.java @@ -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; diff --git a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/TestDownloadController.java b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/TestDownloadController.java index edede4ba..82532166 100644 --- a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/TestDownloadController.java +++ b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/TestDownloadController.java @@ -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; diff --git a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/TestUploadController.java b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/TestUploadController.java index 21a1e153..b48e8980 100644 --- a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/TestUploadController.java +++ b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/controller/TestUploadController.java @@ -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; diff --git a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/ruleEngine/HttpclientNode.java b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/ruleEngine/HttpclientNode.java index 266550cb..60337cf0 100644 --- a/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/ruleEngine/HttpclientNode.java +++ b/springboot/fastbee-plugs/fastbee-http/src/main/java/com/fastbee/http/ruleEngine/HttpclientNode.java @@ -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 diff --git a/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttCallBack.java b/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttCallBack.java index 0d9146be..32fec6d0 100644 --- a/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttCallBack.java +++ b/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttCallBack.java @@ -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; /** diff --git a/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttClient.java b/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttClient.java index 54b99816..68f97ebf 100644 --- a/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttClient.java +++ b/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttClient.java @@ -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客户端 diff --git a/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/controller/SysJobController.java b/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/controller/SysJobController.java index f826c2a8..42c67964 100644 --- a/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/controller/SysJobController.java +++ b/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/controller/SysJobController.java @@ -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 = "调度任务信息操作处理") diff --git a/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/controller/SysJobLogController.java b/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/controller/SysJobLogController.java index 996de06f..b470eee4 100644 --- a/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/controller/SysJobLogController.java +++ b/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/controller/SysJobLogController.java @@ -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 util = new ExcelUtil(SysJobLog.class); util.exportExcel(response, list, "调度日志"); } - + /** * 根据调度编号获取详细信息 */ diff --git a/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/domain/SysJob.java b/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/domain/SysJob.java index a0b3563e..3e69da4f 100644 --- a/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/domain/SysJob.java +++ b/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/domain/SysJob.java @@ -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") diff --git a/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/service/impl/SysJobServiceImpl.java b/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/service/impl/SysJobServiceImpl.java index 6514931c..4a33474b 100644 --- a/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/service/impl/SysJobServiceImpl.java +++ b/springboot/fastbee-plugs/fastbee-quartz/src/main/java/com/fastbee/quartz/service/impl/SysJobServiceImpl.java @@ -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 结果 */ diff --git a/springboot/fastbee-plugs/fastbee-ruleEngine/src/main/java/com/fastbee/ruleEngine/core/FlowLogExecutor.java b/springboot/fastbee-plugs/fastbee-ruleEngine/src/main/java/com/fastbee/ruleEngine/core/FlowLogExecutor.java index 636b3498..18b3c4d1 100644 --- a/springboot/fastbee-plugs/fastbee-ruleEngine/src/main/java/com/fastbee/ruleEngine/core/FlowLogExecutor.java +++ b/springboot/fastbee-plugs/fastbee-ruleEngine/src/main/java/com/fastbee/ruleEngine/core/FlowLogExecutor.java @@ -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; diff --git a/springboot/fastbee-server/base-server/src/main/java/com/fastbee/base/core/hanler/BaseHandler.java b/springboot/fastbee-server/base-server/src/main/java/com/fastbee/base/core/hanler/BaseHandler.java index 7b4d93a2..90db45cb 100644 --- a/springboot/fastbee-server/base-server/src/main/java/com/fastbee/base/core/hanler/BaseHandler.java +++ b/springboot/fastbee-server/base-server/src/main/java/com/fastbee/base/core/hanler/BaseHandler.java @@ -2,11 +2,10 @@ package com.fastbee.base.core.hanler; import com.fastbee.common.core.protocol.Message; import com.fastbee.base.session.Session; - -import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl; - import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; +import java.util.Collection; /** * 基础处理类 @@ -34,8 +33,9 @@ public abstract class BaseHandler { this.targetMethod = targetMethod; this.returnVoid = targetMethod.getReturnType().isAssignableFrom(Void.TYPE); this.async = async; - if (desc == null || desc.isEmpty()) + if (desc == null || desc.isEmpty()) { desc = targetMethod.getName(); + } this.desc = desc; Type[] types = targetMethod.getGenericParameterTypes(); @@ -44,8 +44,21 @@ public abstract class BaseHandler { for (int i = 0; i < types.length; i++) { Type type = types[i]; Class clazz; - if (type instanceof ParameterizedTypeImpl) { - clazz = (Class) ((ParameterizedTypeImpl) type).getActualTypeArguments()[0]; + if (type instanceof ParameterizedType) { + ParameterizedType pt = (ParameterizedType) type; + // 检查是否为List/Collection等容器类型 + if (pt.getRawType() instanceof Class && + ((Class) pt.getRawType()).isArray() || + Collection.class.isAssignableFrom((Class) pt.getRawType())) { + Type[] actualTypes = pt.getActualTypeArguments(); + if (actualTypes.length > 0) { + clazz = (Class) actualTypes[0]; + } else { + clazz = Object.class; // 默认类型 + } + } else { + clazz = (Class) pt.getRawType(); // 处理非容器类型的参数化类型 + } } else { clazz = (Class) type; } diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/auth/AuthService.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/auth/AuthService.java index d370a29c..295a8e5a 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/auth/AuthService.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/auth/AuthService.java @@ -15,7 +15,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; /** * 客户端认证 @@ -49,7 +49,9 @@ public class AuthService { */ public boolean auth(String clientId, String username, String password) { //不需要账号密码校验,直接返回true - if (!mustPass) return true; + if (!mustPass) { + return true; + } if (StringUtils.isEmpty(clientId) || StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { log.error("=>客户端参数缺少,clientId:{},username:{},password:{}", clientId, username, password); return false; diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttConnect.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttConnect.java index 4d61bdab..2565b7d3 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttConnect.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttConnect.java @@ -1,6 +1,5 @@ package com.fastbee.mqtt.handler; -import com.fastbee.common.constant.FastBeeConstant; import com.fastbee.common.core.redis.RedisCache; import com.fastbee.common.enums.ServerType; import com.fastbee.common.utils.DateUtils; @@ -21,7 +20,7 @@ import io.netty.util.CharsetUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.net.InetSocketAddress; diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttPublish.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttPublish.java index 359a6e6c..10b4172b 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttPublish.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttPublish.java @@ -27,7 +27,7 @@ import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; import java.util.Objects; diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttSubscribe.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttSubscribe.java index eaac09e8..0e704195 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttSubscribe.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/handler/MqttSubscribe.java @@ -19,7 +19,7 @@ import io.netty.handler.codec.mqtt.*; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.List; import java.util.stream.Collectors; diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/manager/MqttRemoteManager.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/manager/MqttRemoteManager.java index 4d91e65d..95c200ca 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/manager/MqttRemoteManager.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/manager/MqttRemoteManager.java @@ -12,7 +12,7 @@ import io.netty.handler.codec.mqtt.*; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.nio.charset.StandardCharsets; diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DataHandlerImpl.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DataHandlerImpl.java index 51282bd7..d046540f 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DataHandlerImpl.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DataHandlerImpl.java @@ -20,7 +20,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; @@ -117,6 +117,7 @@ public class DataHandlerImpl implements IDataHandler { /** * 上报设备信息 */ + @Override public void reportDevice(ReportDataBo bo) { try { // 设备实体 diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DeviceReportMessageServiceImpl.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DeviceReportMessageServiceImpl.java index 1d7fe0bc..ece74fce 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DeviceReportMessageServiceImpl.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DeviceReportMessageServiceImpl.java @@ -19,7 +19,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Optional; /** diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/MqttMessagePublishImpl.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/MqttMessagePublishImpl.java index 21af383e..e89c650c 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/MqttMessagePublishImpl.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/MqttMessagePublishImpl.java @@ -45,7 +45,7 @@ import com.fastbee.ruleEngine.context.MsgContext; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Objects; diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/utils/MqttMessageUtils.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/utils/MqttMessageUtils.java index 89224a9b..b3b34c67 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/utils/MqttMessageUtils.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/utils/MqttMessageUtils.java @@ -9,7 +9,6 @@ import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.mqtt.*; -import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.List; import java.util.Set; diff --git a/springboot/fastbee-server/sip-server/pom.xml b/springboot/fastbee-server/sip-server/pom.xml index 3a65bf3a..29df5c61 100644 --- a/springboot/fastbee-server/sip-server/pom.xml +++ b/springboot/fastbee-server/sip-server/pom.xml @@ -22,6 +22,7 @@ org.apache.httpcomponents httpclient + 4.5.13 diff --git a/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/model/BaseTree.java b/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/model/BaseTree.java index 4a711950..1d26d03f 100644 --- a/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/model/BaseTree.java +++ b/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/model/BaseTree.java @@ -2,7 +2,7 @@ package com.fastbee.sip.model; import lombok.Data; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import java.text.Collator; import java.util.Comparator; @Data diff --git a/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/service/impl/VideoMqttService.java b/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/service/impl/VideoMqttService.java index 42c8f7e7..fe1260f0 100644 --- a/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/service/impl/VideoMqttService.java +++ b/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/service/impl/VideoMqttService.java @@ -19,7 +19,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -155,6 +155,7 @@ public class VideoMqttService implements IMqttService { } } + @Override public void publishChannelsProperty(String DeviceSipId, List channels) { SipConfig sipConfig = sipConfigService.selectSipConfigBydeviceSipId(DeviceSipId); if (null != sipConfig) { @@ -180,6 +181,7 @@ public class VideoMqttService implements IMqttService { } } + @Override public void publishProperty(Long productId, String deviceNum, List thingsList, int delay) { String pre = ""; if (delay > 0) { diff --git a/springboot/fastbee-service/fastbee-iot-service/pom.xml b/springboot/fastbee-service/fastbee-iot-service/pom.xml index fa358edf..1b3561c3 100644 --- a/springboot/fastbee-service/fastbee-iot-service/pom.xml +++ b/springboot/fastbee-service/fastbee-iot-service/pom.xml @@ -80,7 +80,7 @@ com.dtflys.forest - forest-spring-boot-starter + forest-spring-boot3-starter ${forest.version} diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/domain/DeviceJob.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/domain/DeviceJob.java index 3f346947..31542d0e 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/domain/DeviceJob.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/domain/DeviceJob.java @@ -12,13 +12,13 @@ import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; import java.util.Date; /** * 设备定时任务 - * + * * @author kerwincui */ @ApiModel(value = "DeviceJob", description = "设备定时任务 iot_device_job") diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/DeviceLogMapper.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/DeviceLogMapper.java index a5f71e06..d93c3df6 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/DeviceLogMapper.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/mapper/DeviceLogMapper.java @@ -3,13 +3,10 @@ package com.fastbee.iot.mapper; import com.fastbee.iot.domain.Device; import com.fastbee.iot.domain.DeviceLog; import com.fastbee.iot.model.DeviceStatistic; -import com.fastbee.iot.model.HistoryModel; import com.fastbee.iot.model.MonitorModel; -import com.fastbee.iot.tdengine.service.model.TdLogDto; -import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; -import java.util.Date; + import java.util.List; /** @@ -48,7 +45,7 @@ public interface DeviceLogMapper /** * 批量保存图片 */ - public int saveBatch(@Param("list") List list); + public int saveBatch(List list); /** * 修改设备日志 diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/ruleEngine/RuleProcess.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/ruleEngine/RuleProcess.java index 0b1a4b6e..386134f8 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/ruleEngine/RuleProcess.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/ruleEngine/RuleProcess.java @@ -14,7 +14,7 @@ import com.yomahub.liteflow.flow.LiteflowResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Objects; /** diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/ISocialLoginService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/ISocialLoginService.java index 737b0321..a3077aeb 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/ISocialLoginService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/ISocialLoginService.java @@ -7,7 +7,7 @@ import com.fastbee.iot.domain.SocialUser; import me.zhyd.oauth.model.AuthCallback; import me.zhyd.oauth.model.AuthUser; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * 第三方登录Service接口 diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceRuntimeServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceRuntimeServiceImpl.java index 4e399022..ad748a54 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceRuntimeServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceRuntimeServiceImpl.java @@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java index f62adeb5..dba0cb2c 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java @@ -48,7 +48,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ScriptServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ScriptServiceImpl.java index 55b24cda..fd7ca8d9 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ScriptServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ScriptServiceImpl.java @@ -19,7 +19,7 @@ import org.slf4j.LoggerFactory; import lombok.extern.slf4j.Slf4j; import ch.qos.logback.classic.LoggerContext; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.io.File; import java.io.IOException; import java.util.ArrayList; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/SocialLoginServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/SocialLoginServiceImpl.java index 3d65743f..ead2e78b 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/SocialLoginServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/SocialLoginServiceImpl.java @@ -41,8 +41,8 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; import java.util.List; import java.util.concurrent.TimeUnit; @@ -371,7 +371,7 @@ public class SocialLoginServiceImpl implements ISocialLoginService { socialUser.setUsername(authUser.getUsername()); socialUser.setNickname(authUser.getNickname()); } - + @Override public String genBindId(AuthUser authUser) { String bindId = Md5Utils.hash(authUser.getUuid() + authUser.getSource()); String key = BIND_REDIS_KEY + bindId; @@ -391,14 +391,14 @@ public class SocialLoginServiceImpl implements ISocialLoginService { redisCache.setCacheObject(key, loginIdValue, LOGIN_SOCIAL_EXPIRE_TIME, TimeUnit.SECONDS); return loginId; } - + @Override public String genErrorId(String msg) { String errorId = Md5Utils.hash(msg + RandomUtil.randomString(32)); String key = LOGIN_ERROR_MSG_REDIS_KEY + errorId; redisCache.setCacheObject(key, msg, LOGIN_SOCIAL_EXPIRE_TIME, TimeUnit.SECONDS); return errorId; } - + @Override public String genWxBindId(Long userId) { String wxBindId = Md5Utils.hash(userId + RandomUtil.randomString(32)); String key = WX_BIND_REDIS_KEY + wxBindId; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelServiceImpl.java index 00d14821..914cc1c2 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelServiceImpl.java @@ -29,7 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.*; import java.util.stream.Collectors; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/util/AESUtils.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/util/AESUtils.java index e819ec5e..a32111fc 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/util/AESUtils.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/util/AESUtils.java @@ -3,10 +3,6 @@ package com.fastbee.iot.util; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; - -import sun.misc.BASE64Decoder; -import sun.misc.BASE64Encoder; - import java.security.MessageDigest; import java.util.Base64; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/WeChatService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/WeChatService.java index ec3716f2..0ab9c23c 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/WeChatService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/WeChatService.java @@ -6,8 +6,8 @@ import com.fastbee.common.wechat.WeChatLoginResult; import com.fastbee.iot.wechat.vo.WxBindReqVO; import com.fastbee.iot.wechat.vo.WxCancelBindReqVO; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * 微信相关服务类 diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/impl/WeChatServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/impl/WeChatServiceImpl.java index 3c33e17e..6c96d626 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/impl/WeChatServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/impl/WeChatServiceImpl.java @@ -39,9 +39,9 @@ import me.zhyd.oauth.model.AuthUser; import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.Date; import java.util.HashMap; import java.util.List; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/vm/java/controller.java.vm b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/vm/java/controller.java.vm index 07fb5879..64910e72 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/vm/java/controller.java.vm +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/vm/java/controller.java.vm @@ -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} */ diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysConfig.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysConfig.java index 086d749e..9e2152fc 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysConfig.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysConfig.java @@ -1,7 +1,7 @@ package com.fastbee.system.domain; -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; @@ -13,7 +13,7 @@ import com.fastbee.common.core.domain.BaseEntity; /** * 参数配置表 sys_config - * + * * @author ruoyi */ @ApiModel(value = "SysConfig", description = "参数配置表 sys_config") @@ -101,7 +101,7 @@ public class SysConfig extends BaseEntity { this.configType = configType; } - + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysNotice.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysNotice.java index 2724d32c..2cb385ba 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysNotice.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysNotice.java @@ -1,7 +1,7 @@ package com.fastbee.system.domain; -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; @@ -12,7 +12,7 @@ import com.fastbee.common.xss.Xss; /** * 通知公告表 sys_notice - * + * * @author ruoyi */ @ApiModel(value = "SysNotice", description = "通知公告表 sys_notice") diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysPost.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysPost.java index d86d8f67..f7f90998 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysPost.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysPost.java @@ -1,8 +1,8 @@ package com.fastbee.system.domain; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -14,7 +14,7 @@ import com.fastbee.common.core.domain.BaseEntity; /** * 岗位表 sys_post - * + * * @author ruoyi */ @ApiModel(value = "SysPost", description = "岗位表 sys_post") @@ -114,7 +114,7 @@ public class SysPost extends BaseEntity { this.flag = flag; } - + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysClientServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysClientServiceImpl.java index fd1c28e1..5197c105 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysClientServiceImpl.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysClientServiceImpl.java @@ -13,7 +13,7 @@ import com.fastbee.system.mapper.SysClientMapper; import com.fastbee.system.service.ISysClientService; import org.springframework.stereotype.Service; -import javax.annotation.Resource; +import jakarta.annotation.Resource; import java.util.Arrays; import java.util.List; import java.util.Map; diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysConfigServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysConfigServiceImpl.java index d994ab09..c2c6f28a 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysConfigServiceImpl.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysConfigServiceImpl.java @@ -14,7 +14,7 @@ import com.fastbee.system.service.ISysConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import java.util.Collection; import java.util.List; diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictTypeServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictTypeServiceImpl.java index 20340852..8ee3ea63 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictTypeServiceImpl.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictTypeServiceImpl.java @@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.PostConstruct; +import jakarta.annotation.PostConstruct; import java.util.Comparator; import java.util.List; import java.util.Map; diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysUserServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysUserServiceImpl.java index 42d7a353..54fec2e8 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysUserServiceImpl.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysUserServiceImpl.java @@ -24,7 +24,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import javax.validation.Validator; +import jakarta.validation.Validator; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; diff --git a/springboot/pom.xml b/springboot/pom.xml index 930599ea..d236a359 100644 --- a/springboot/pom.xml +++ b/springboot/pom.xml @@ -17,15 +17,16 @@ 2.1.0 UTF-8 UTF-8 - 1.8 - 2.5.15 - + 17 3.1.1 + 3.5.16 + 3.5.10 + 3.5.10 + 3.3.5 1.21 3.0.0 1.6.2 2.3.3 - 2.2.0 6.6.5 5.13.0 1.4 @@ -34,13 +35,11 @@ 2.3 0.9.1 1.16.5 - 1.5.36 + 1.6.4 1.18.22 2.2.1 5.8.20 1.5.5.Final - 3.5.3.1 - 3.5.3.1 4.3.1 2.0.38 32.0.1-jre @@ -49,42 +48,21 @@ 2.12.2 1.10.0 1.2.5 - 1.2.23 - 1.4.7 2.0.53 6.6.5 2.13.0 - - 9.0.102 - 1.2.13 - 5.7.12 - 5.3.39 8.7.2-20241022 + 2.1.0 + 8.2.0 + 2.3.1 + 6.0.0 + 2.6.0 - - - - org.springframework - spring-framework-bom - ${spring-framework.version} - pom - import - - - - - org.springframework.security - spring-security-bom - ${spring-security.version} - pom - import - - org.springframework.boot @@ -94,42 +72,10 @@ import - - - ch.qos.logback - logback-core - ${logback.version} - - - - ch.qos.logback - logback-classic - ${logback.version} - - - - - org.apache.tomcat.embed - tomcat-embed-core - ${tomcat.version} - - - - org.apache.tomcat.embed - tomcat-embed-el - ${tomcat.version} - - - - org.apache.tomcat.embed - tomcat-embed-websocket - ${tomcat.version} - - com.alibaba - druid-spring-boot-starter + druid-spring-boot-3-starter ${druid.version} @@ -140,17 +86,16 @@ ${bitwalker.version} - - - - - - - + + org.mybatis + mybatis + ${mybatis.version} + + com.baomidou - mybatis-plus-boot-starter + mybatis-plus-spring-boot3-starter ${mybatis-plus.version} @@ -160,10 +105,16 @@ ${mybatis-plus-generator.version} + + com.baomidou + mybatis-plus-jsqlparser + ${mybatis-plus.version} + + com.baomidou - dynamic-datasource-spring-boot-starter + dynamic-datasource-spring-boot3-starter ${dynamic-datasource.version} @@ -301,6 +252,24 @@ ${hutool.version} + + com.mysql + mysql-connector-j + ${mysql.version} + + + + javax.xml.bind + jaxb-api + ${jaxb-api.version} + + + + jakarta.servlet + jakarta.servlet-api + ${jakarta.version} + + com.fastbee @@ -457,24 +426,6 @@ ${guava.version} - - - - - - - - - - - - - - - - - - com.alibaba easyexcel-core @@ -503,13 +454,19 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + 3.13.0 + true ${java.version} ${java.version} ${project.build.sourceEncoding} + + org.springframework.boot + spring-boot-maven-plugin + 3.3.0 +