diff --git a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/handler/GlobalExceptionHandler.java b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/handler/GlobalExceptionHandler.java
index cc945eb0..7fbfce75 100644
--- a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/handler/GlobalExceptionHandler.java
+++ b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/handler/GlobalExceptionHandler.java
@@ -37,11 +37,12 @@ import org.springframework.web.multipart.MaxUploadSizeExceededException;
import cn.dev33.satoken.exception.NotLoginException;
import cn.dev33.satoken.exception.NotPermissionException;
import cn.dev33.satoken.exception.NotRoleException;
+import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
-import top.charles7c.continew.admin.common.util.StreamUtils;
import top.charles7c.continew.admin.common.util.holder.LogContextHolder;
+import top.charles7c.continew.starter.core.constant.StringConstants;
import top.charles7c.continew.starter.core.util.ExceptionUtils;
import top.charles7c.continew.starter.extension.crud.exception.BadRequestException;
import top.charles7c.continew.starter.extension.crud.exception.BusinessException;
@@ -74,7 +75,8 @@ public class GlobalExceptionHandler {
@ExceptionHandler(ConstraintViolationException.class)
public R constraintViolationException(ConstraintViolationException e, HttpServletRequest request) {
log.warn("请求地址 [{}],参数验证失败。", request.getRequestURI(), e);
- String errorMsg = StreamUtils.join(e.getConstraintViolations(), ConstraintViolation::getMessage, ",");
+ String errorMsg =
+ CollUtil.join(e.getConstraintViolations(), StringConstants.CHINESE_COMMA, ConstraintViolation::getMessage);
LogContextHolder.setErrorMsg(errorMsg);
return R.fail(HttpStatus.BAD_REQUEST.value(), errorMsg);
}
@@ -85,7 +87,8 @@ public class GlobalExceptionHandler {
@ExceptionHandler(BindException.class)
public R handleBindException(BindException e, HttpServletRequest request) {
log.warn("请求地址 [{}],参数验证失败。", request.getRequestURI(), e);
- String errorMsg = StreamUtils.join(e.getAllErrors(), DefaultMessageSourceResolvable::getDefaultMessage, ",");
+ String errorMsg = CollUtil.join(e.getAllErrors(), StringConstants.CHINESE_COMMA,
+ DefaultMessageSourceResolvable::getDefaultMessage);
LogContextHolder.setErrorMsg(errorMsg);
return R.fail(HttpStatus.BAD_REQUEST.value(), errorMsg);
}
diff --git a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/FileUtils.java b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/FileUtils.java
deleted file mode 100644
index a59e67c6..00000000
--- a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/FileUtils.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package top.charles7c.continew.admin.common.util;
-
-import java.io.File;
-import java.time.LocalDateTime;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-
-import org.springframework.web.multipart.MultipartFile;
-
-import cn.hutool.core.date.DatePattern;
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.io.file.FileNameUtil;
-import cn.hutool.core.util.IdUtil;
-
-/**
- * 文件工具类
- *
- * @author Zheng Jie(ELADMIN)
- * @author Charles7c
- * @since 2023/1/2 21:34
- */
-@Slf4j
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class FileUtils {
-
- /**
- * 上传文件
- *
- * @param multipartFile
- * 源文件对象
- * @param filePath
- * 文件路径
- * @param isKeepOriginalFilename
- * 是否保留原文件名
- * @return 目标文件对象
- */
- public static File upload(MultipartFile multipartFile, String filePath, boolean isKeepOriginalFilename) {
- String originalFilename = multipartFile.getOriginalFilename();
- String extensionName = FileNameUtil.extName(originalFilename);
-
- String fileName;
- if (isKeepOriginalFilename) {
- fileName = String.format("%s-%s.%s", FileNameUtil.getPrefix(originalFilename),
- DateUtil.format(LocalDateTime.now(), DatePattern.PURE_DATETIME_MS_PATTERN), extensionName);
- } else {
- fileName = String.format("%s.%s", IdUtil.fastSimpleUUID(), extensionName);
- }
-
- try {
- String pathname = filePath + fileName;
- File dest = new File(pathname).getCanonicalFile();
- // 如果父路径不存在,自动创建
- if (!dest.getParentFile().exists()) {
- if (!dest.getParentFile().mkdirs()) {
- log.error("Create upload file parent path failed.");
- }
- }
- // 文件写入
- multipartFile.transferTo(dest);
- return dest;
- } catch (Exception e) {
- log.error("Upload file occurred an error: {}. fileName: {}.", e.getMessage(), fileName, e);
- }
- return null;
- }
-}
diff --git a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/ServletUtils.java b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/ServletUtils.java
deleted file mode 100644
index cd05afd4..00000000
--- a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/ServletUtils.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package top.charles7c.continew.admin.common.util;
-
-import java.util.*;
-
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-
-import org.springframework.web.context.request.RequestContextHolder;
-import org.springframework.web.context.request.ServletRequestAttributes;
-
-import cn.hutool.http.useragent.UserAgent;
-import cn.hutool.http.useragent.UserAgentUtil;
-
-/**
- * Servlet 工具类
- *
- * @author Charles7c
- * @since 2022/12/23 20:00
- */
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class ServletUtils {
-
- /**
- * 获取请求对象
- *
- * @return /
- */
- public static HttpServletRequest getRequest() {
- return getServletRequestAttributes().getRequest();
- }
-
- /**
- * 获取响应对象
- *
- * @return /
- */
- public static HttpServletResponse getResponse() {
- return getServletRequestAttributes().getResponse();
- }
-
- /**
- * 获取浏览器及其版本信息
- *
- * @param request
- * 请求对象
- * @return 浏览器及其版本信息
- */
- public static String getBrowser(HttpServletRequest request) {
- if (null == request) {
- return null;
- }
- UserAgent userAgent = UserAgentUtil.parse(request.getHeader("User-Agent"));
- return userAgent.getBrowser().getName() + " " + userAgent.getVersion();
- }
-
- private static ServletRequestAttributes getServletRequestAttributes() {
- return (ServletRequestAttributes)Objects.requireNonNull(RequestContextHolder.getRequestAttributes());
- }
-}
diff --git a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/StreamUtils.java b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/StreamUtils.java
deleted file mode 100644
index 5f2b2959..00000000
--- a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/StreamUtils.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package top.charles7c.continew.admin.common.util;
-
-import java.util.Collection;
-import java.util.Objects;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-
-import cn.hutool.core.collection.CollUtil;
-
-import top.charles7c.continew.starter.core.constant.StringConstants;
-
-/**
- * Stream 工具类
- *
- * @author Lion Li(RuoYi-Vue-Plus)
- * @author Charles7c
- * @since 2022/12/22 19:51
- */
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class StreamUtils {
-
- /**
- * 将集合中的指定字段使用分隔符拼接成字符串
- *
- * @param collection
- * 集合
- * @param function
- * 字段方法
- * @param delimiter
- * 分隔符
- * @param
- * /
- * @return 拼接结果
- */
- public static String join(Collection collection, Function function, CharSequence delimiter) {
- if (CollUtil.isEmpty(collection)) {
- return StringConstants.EMPTY;
- }
- return collection.stream().map(function).filter(Objects::nonNull).collect(Collectors.joining(delimiter));
- }
-}
diff --git a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/TemplateUtils.java b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/TemplateUtils.java
deleted file mode 100644
index 3c1acafc..00000000
--- a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/TemplateUtils.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package top.charles7c.continew.admin.common.util;
-
-import java.util.Map;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-
-import cn.hutool.extra.template.Template;
-import cn.hutool.extra.template.TemplateConfig;
-import cn.hutool.extra.template.TemplateEngine;
-import cn.hutool.extra.template.TemplateUtil;
-
-/**
- * 模板工具类
- *
- * @author Charles7c
- * @since 2023/1/13 20:37
- */
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class TemplateUtils {
-
- private static final String TEMPLATE_PARENT_PATH = "templates";
-
- /**
- * 将模板与绑定参数融合后返回为字符串
- *
- * @param bindingMap
- * 绑定的参数,此Map中的参数会替换模板中的变量
- * @return 融合后的内容
- */
- public static String render(String templatePath, Map, ?> bindingMap) {
- TemplateEngine engine =
- TemplateUtil.createEngine(new TemplateConfig(TEMPLATE_PARENT_PATH, TemplateConfig.ResourceMode.CLASSPATH));
- Template template = engine.getTemplate(templatePath);
- return template.render(bindingMap);
- }
-}
diff --git a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/URLUtils.java b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/URLUtils.java
deleted file mode 100644
index e319f958..00000000
--- a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/URLUtils.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package top.charles7c.continew.admin.common.util;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-
-import cn.hutool.http.HttpUtil;
-
-/**
- * URL(Uniform Resource Locator)统一资源定位符相关工具类
- *
- * @author Charles7c
- * @since 2023/3/20 21:27
- */
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class URLUtils {
-
- /**
- * 提供的 URL 是否为 HTTP URL(协议包括:"http","https")
- *
- * @param url
- * URL
- * @return 是否为 HTTP URL
- */
- public static boolean isHttpUrl(String url) {
- return HttpUtil.isHttp(url) || HttpUtil.isHttps(url);
- }
-}
diff --git a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/helper/LoginHelper.java b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/helper/LoginHelper.java
index 484dab9a..73662554 100644
--- a/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/helper/LoginHelper.java
+++ b/continew-admin-common/src/main/java/top/charles7c/continew/admin/common/util/helper/LoginHelper.java
@@ -32,10 +32,10 @@ import cn.hutool.extra.spring.SpringUtil;
import top.charles7c.continew.admin.common.constant.CacheConstants;
import top.charles7c.continew.admin.common.model.dto.LogContext;
import top.charles7c.continew.admin.common.model.dto.LoginUser;
-import top.charles7c.continew.admin.common.util.ServletUtils;
import top.charles7c.continew.admin.common.util.holder.LogContextHolder;
import top.charles7c.continew.starter.core.util.ExceptionUtils;
import top.charles7c.continew.starter.core.util.IpUtils;
+import top.charles7c.continew.starter.core.util.ServletUtils;
import top.charles7c.continew.starter.extension.crud.base.CommonUserService;
/**
diff --git a/continew-admin-monitor/src/main/java/top/charles7c/continew/admin/monitor/interceptor/LogInterceptor.java b/continew-admin-monitor/src/main/java/top/charles7c/continew/admin/monitor/interceptor/LogInterceptor.java
index bf5fb1e0..6f2ca45f 100644
--- a/continew-admin-monitor/src/main/java/top/charles7c/continew/admin/monitor/interceptor/LogInterceptor.java
+++ b/continew-admin-monitor/src/main/java/top/charles7c/continew/admin/monitor/interceptor/LogInterceptor.java
@@ -53,7 +53,6 @@ import cn.hutool.json.JSONUtil;
import top.charles7c.continew.admin.auth.model.req.AccountLoginReq;
import top.charles7c.continew.admin.common.constant.SysConstants;
import top.charles7c.continew.admin.common.model.dto.LogContext;
-import top.charles7c.continew.admin.common.util.ServletUtils;
import top.charles7c.continew.admin.common.util.helper.LoginHelper;
import top.charles7c.continew.admin.common.util.holder.LogContextHolder;
import top.charles7c.continew.admin.monitor.annotation.Log;
@@ -64,6 +63,7 @@ import top.charles7c.continew.admin.system.service.UserService;
import top.charles7c.continew.starter.core.constant.StringConstants;
import top.charles7c.continew.starter.core.util.ExceptionUtils;
import top.charles7c.continew.starter.core.util.IpUtils;
+import top.charles7c.continew.starter.core.util.ServletUtils;
import top.charles7c.continew.starter.extension.crud.model.resp.R;
/**
diff --git a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/UserServiceImpl.java b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/UserServiceImpl.java
index c375adbb..c2cf4800 100644
--- a/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/UserServiceImpl.java
+++ b/continew-admin-system/src/main/java/top/charles7c/continew/admin/system/service/impl/UserServiceImpl.java
@@ -41,7 +41,6 @@ import top.charles7c.continew.admin.common.constant.CacheConstants;
import top.charles7c.continew.admin.common.constant.FileConstants;
import top.charles7c.continew.admin.common.constant.SysConstants;
import top.charles7c.continew.admin.common.enums.DisEnableStatusEnum;
-import top.charles7c.continew.admin.common.util.FileUtils;
import top.charles7c.continew.admin.common.util.SecureUtils;
import top.charles7c.continew.admin.common.util.helper.LoginHelper;
import top.charles7c.continew.admin.system.mapper.UserMapper;
@@ -58,6 +57,7 @@ import top.charles7c.continew.admin.system.service.UserRoleService;
import top.charles7c.continew.admin.system.service.UserService;
import top.charles7c.continew.starter.core.constant.StringConstants;
import top.charles7c.continew.starter.core.util.ExceptionUtils;
+import top.charles7c.continew.starter.core.util.FileUploadUtils;
import top.charles7c.continew.starter.extension.crud.base.BaseServiceImpl;
import top.charles7c.continew.starter.extension.crud.base.CommonUserService;
import top.charles7c.continew.starter.extension.crud.util.validate.CheckUtils;
@@ -172,7 +172,7 @@ public class UserServiceImpl extends BaseServiceImpl getTables(DataSource dataSource) throws SQLException {
- return getTables(dataSource, null);
- }
-
- /**
- * 获取所有表信息
- *
- * @param dataSource
- * 数据源
- * @param tableName
- * 表名称
- * @return 表信息列表
- */
- public static List getTables(DataSource dataSource, String tableName) throws SQLException {
- String querySql = "SHOW TABLE STATUS";
- List tableEntityList;
- Db db = Db.use(dataSource);
- if (StrUtil.isNotBlank(tableName)) {
- tableEntityList = db.query(String.format("%s WHERE NAME = ?", querySql), tableName);
- } else {
- tableEntityList = db.query(querySql);
- }
- List tableList = new ArrayList<>(tableEntityList.size());
- for (Entity tableEntity : tableEntityList) {
- Table table = new Table(tableEntity.getStr("NAME"));
- table.setComment(tableEntity.getStr("COMMENT"));
- table.setEngine(tableEntity.getStr("ENGINE"));
- table.setCharset(tableEntity.getStr("COLLATION"));
- table.setCreateTime(DateUtil.toLocalDateTime(tableEntity.getDate("CREATE_TIME")));
- table.setUpdateTime(DateUtil.toLocalDateTime(tableEntity.getDate("UPDATE_TIME")));
- tableList.add(table);
- }
- return tableList;
- }
-
- /**
- * 获取所有列信息
- *
- * @param dataSource
- * 数据源
- * @param tableName
- * 表名称
- * @return 列信息列表
- */
- public static Collection getColumns(DataSource dataSource, String tableName) {
- cn.hutool.db.meta.Table table = MetaUtil.getTableMeta(dataSource, tableName);
- return table.getColumns();
- }
-}
diff --git a/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/util/Table.java b/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/util/Table.java
deleted file mode 100644
index e67fb36d..00000000
--- a/continew-admin-tool/src/main/java/top/charles7c/continew/admin/tool/util/Table.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package top.charles7c.continew.admin.tool.util;
-
-import java.io.Serial;
-import java.io.Serializable;
-import java.time.LocalDateTime;
-
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * 数据库表信息
- *
- * @author Charles7c
- * @since 2023/4/26 21:41
- */
-@Getter
-@Setter
-public class Table implements Serializable {
-
- @Serial
- private static final long serialVersionUID = 1L;
-
- /**
- * 表名称
- */
- private String tableName;
-
- /**
- * 注释
- */
- private String comment;
-
- /**
- * 存储引擎
- */
- private String engine;
-
- /**
- * 字符集
- */
- private String charset;
-
- /**
- * 创建时间
- */
- private LocalDateTime createTime;
-
- /**
- * 修改时间
- */
- private LocalDateTime updateTime;
-
- public Table(String tableName) {
- this.tableName = tableName;
- }
-}
diff --git a/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/common/CaptchaController.java b/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/common/CaptchaController.java
index a371e730..92ad1918 100644
--- a/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/common/CaptchaController.java
+++ b/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/common/CaptchaController.java
@@ -50,10 +50,10 @@ import top.charles7c.continew.admin.common.config.properties.CaptchaProperties;
import top.charles7c.continew.admin.common.constant.CacheConstants;
import top.charles7c.continew.admin.common.constant.RegexConstants;
import top.charles7c.continew.admin.common.model.resp.CaptchaResp;
-import top.charles7c.continew.admin.common.util.TemplateUtils;
import top.charles7c.continew.starter.cache.redisson.util.RedisUtils;
import top.charles7c.continew.starter.captcha.graphic.autoconfigure.GraphicCaptchaProperties;
import top.charles7c.continew.starter.core.autoconfigure.project.ProjectProperties;
+import top.charles7c.continew.starter.core.util.TemplateUtils;
import top.charles7c.continew.starter.extension.crud.model.resp.R;
import top.charles7c.continew.starter.extension.crud.util.validate.CheckUtils;
import top.charles7c.continew.starter.messaging.mail.util.MailUtils;
diff --git a/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/common/CommonController.java b/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/common/CommonController.java
index e6f9af10..9a394b11 100644
--- a/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/common/CommonController.java
+++ b/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/common/CommonController.java
@@ -45,7 +45,6 @@ import cn.hutool.core.util.StrUtil;
import top.charles7c.continew.admin.common.config.properties.LocalStorageProperties;
import top.charles7c.continew.admin.common.constant.CacheConstants;
import top.charles7c.continew.admin.common.model.resp.LabelValueResp;
-import top.charles7c.continew.admin.common.util.FileUtils;
import top.charles7c.continew.admin.monitor.annotation.Log;
import top.charles7c.continew.admin.system.model.query.DeptQuery;
import top.charles7c.continew.admin.system.model.query.MenuQuery;
@@ -54,6 +53,7 @@ import top.charles7c.continew.admin.system.model.query.RoleQuery;
import top.charles7c.continew.admin.system.model.resp.RoleResp;
import top.charles7c.continew.admin.system.service.*;
import top.charles7c.continew.starter.core.autoconfigure.project.ProjectProperties;
+import top.charles7c.continew.starter.core.util.FileUploadUtils;
import top.charles7c.continew.starter.extension.crud.base.IBaseEnum;
import top.charles7c.continew.starter.extension.crud.model.query.SortQuery;
import top.charles7c.continew.starter.extension.crud.model.resp.R;
@@ -89,7 +89,7 @@ public class CommonController {
Long maxSizeInMb = localStorageProperties.getMaxSizeInMb();
CheckUtils.throwIf(file.getSize() > maxSizeInMb * 1024 * 1024, "请上传小于 {}MB 的文件", maxSizeInMb);
String filePath = localStorageProperties.getPath().getFile();
- File newFile = FileUtils.upload(file, filePath, false);
+ File newFile = FileUploadUtils.upload(file, filePath, false);
CheckUtils.throwIfNull(newFile, "上传文件失败");
assert null != newFile;
return R.ok("上传成功", newFile.getName());
diff --git a/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/system/MenuController.java b/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/system/MenuController.java
index b64c2e48..212a863f 100644
--- a/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/system/MenuController.java
+++ b/continew-admin-webapi/src/main/java/top/charles7c/continew/admin/webapi/system/MenuController.java
@@ -26,11 +26,11 @@ import org.springframework.web.bind.annotation.RestController;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.ObjectUtil;
-import top.charles7c.continew.admin.common.util.URLUtils;
import top.charles7c.continew.admin.system.model.query.MenuQuery;
import top.charles7c.continew.admin.system.model.req.MenuReq;
import top.charles7c.continew.admin.system.model.resp.MenuResp;
import top.charles7c.continew.admin.system.service.MenuService;
+import top.charles7c.continew.starter.core.util.URLUtils;
import top.charles7c.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.charles7c.continew.starter.extension.crud.base.BaseController;
import top.charles7c.continew.starter.extension.crud.base.ValidateGroup;