null
,或者转换失败,返回默认值null
null
,或者转换失败,返回默认值null
null
,或者转换失败,返回默认值null
,或者转换失败,返回默认值null
null
,或者转换失败,返回默认值null
,或者转换失败,返回默认值null
null
null
,或者转换失败,返回默认值null
null
,或者转换失败,返回默认值null
null
null
null
null
null
* 例如: ruoyi.txt, 返回: txt
- *
+ *
* @param file 文件名
* @return 后缀(不含".")
*/
@@ -37,7 +38,7 @@ public class FileTypeUtils
*/
public static String getFileType(String fileName)
{
- int separatorIndex = fileName.lastIndexOf('.');
+ int separatorIndex = fileName.lastIndexOf(".");
if (separatorIndex < 0)
{
return "";
@@ -47,7 +48,7 @@ public class FileTypeUtils
/**
* 获取文件类型
- *
+ *
* @param photoByte 文件字节码
* @return 后缀(不含".")
*/
diff --git a/aidex-common/src/main/java/com/aidex/common/utils/file/FileUploadUtils.java b/aidex-common/src/main/java/com/aidex/common/utils/file/FileUploadUtils.java
index 9c91bd79a4a4f2a6ca78bd82c21c64f81b0cdb0c..e887382416b920884fcfb692cd025a1e14544d19 100644
--- a/aidex-common/src/main/java/com/aidex/common/utils/file/FileUploadUtils.java
+++ b/aidex-common/src/main/java/com/aidex/common/utils/file/FileUploadUtils.java
@@ -1,9 +1,5 @@
package com.aidex.common.utils.file;
-import java.io.File;
-import java.io.IOException;
-import org.apache.commons.io.FilenameUtils;
-import org.springframework.web.multipart.MultipartFile;
import com.aidex.common.config.AiDexConfig;
import com.aidex.common.constant.Constants;
import com.aidex.common.exception.file.FileNameLengthLimitExceededException;
@@ -12,6 +8,11 @@ import com.aidex.common.exception.file.InvalidExtensionException;
import com.aidex.common.utils.DateUtils;
import com.aidex.common.utils.StringUtils;
import com.aidex.common.utils.uuid.IdUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.IOException;
/**
* 文件上传工具类
@@ -123,32 +124,29 @@ public class FileUploadUtils
{
String fileName = file.getOriginalFilename();
String extension = getExtension(file);
-// fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
- fileName = DateUtils.datePath() + File.separator + IdUtils.fastUUID() + "." + extension;
+ fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
return fileName;
}
- private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException
+ public static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException
{
File desc = new File(uploadDir + File.separator + fileName);
- if (!desc.getParentFile().exists())
- {
- desc.getParentFile().mkdirs();
- }
if (!desc.exists())
{
- desc.createNewFile();
+ if (!desc.getParentFile().exists())
+ {
+ desc.getParentFile().mkdirs();
+ }
}
return desc;
}
- private static final String getPathFileName(String uploadDir, String fileName) throws IOException
+ public static final String getPathFileName(String uploadDir, String fileName) throws IOException
{
int dirLastIndex = AiDexConfig.getProfile().length() + 1;
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
-// String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
- String pathFileName = Constants.RESOURCE_PREFIX + File.separator + currentDir + File.separator + fileName;
+ String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
return pathFileName;
}
@@ -188,6 +186,11 @@ public class FileUploadUtils
throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension,
fileName);
}
+ else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION)
+ {
+ throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension,
+ fileName);
+ }
else
{
throw new InvalidExtensionException(allowedExtension, extension, fileName);
diff --git a/aidex-common/src/main/java/com/aidex/common/utils/file/FileUtils.java b/aidex-common/src/main/java/com/aidex/common/utils/file/FileUtils.java
index e0addc223a8fc3afc18679f12cdea0a6ba8e4346..f6124c57308afa659afe815db82f404657c28e36 100644
--- a/aidex-common/src/main/java/com/aidex/common/utils/file/FileUtils.java
+++ b/aidex-common/src/main/java/com/aidex/common/utils/file/FileUtils.java
@@ -1,27 +1,31 @@
package com.aidex.common.utils.file;
+
+import com.aidex.common.config.AiDexConfig;
+import com.aidex.common.utils.DateUtils;
+import com.aidex.common.utils.StringUtils;
+import com.aidex.common.utils.uuid.IdUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.ArrayUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import ch.qos.logback.core.util.FileUtil;
-import org.apache.commons.lang3.ArrayUtils;
-import com.aidex.common.utils.StringUtils;
/**
* 文件处理工具类
- *
+ *
* @author ruoyi
*/
-public class FileUtils extends org.apache.commons.io.FileUtils
+public class FileUtils
{
- public static final String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+";
+ public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+";
/**
* 输出指定文件的byte数组
- *
+ *
* @param filePath 文件路径
* @param os 输出流
* @return
@@ -50,34 +54,52 @@ public class FileUtils extends org.apache.commons.io.FileUtils
}
finally
{
- if (os != null)
- {
- try
- {
- os.close();
- }
- catch (IOException e1)
- {
- e1.printStackTrace();
- }
- }
- if (fis != null)
- {
- try
- {
- fis.close();
- }
- catch (IOException e1)
- {
- e1.printStackTrace();
- }
- }
+ IOUtils.close(os);
+ IOUtils.close(fis);
+ }
+ }
+ /**
+ * 写数据到文件中
+ *
+ * @param data 数据
+ * @return 目标文件
+ * @throws IOException IO异常
+ */
+ public static String writeImportBytes(byte[] data) throws IOException
+ {
+ return writeBytes(data, AiDexConfig.getImportPath());
+ }
+
+ /**
+ * 写数据到文件中
+ *
+ * @param data 数据
+ * @param uploadDir 目标文件
+ * @return 目标文件
+ * @throws IOException IO异常
+ */
+ public static String writeBytes(byte[] data, String uploadDir) throws IOException
+ {
+ FileOutputStream fos = null;
+ String pathName = "";
+ try
+ {
+ String extension = getFileExtendName(data);
+ pathName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
+ File file = FileUploadUtils.getAbsoluteFile(uploadDir, pathName);
+ fos = new FileOutputStream(file);
+ fos.write(data);
}
+ finally
+ {
+ IOUtils.close(fos);
+ }
+ return FileUploadUtils.getPathFileName(uploadDir, pathName);
}
/**
* 删除文件
- *
+ *
* @param filePath 文件
* @return
*/
@@ -96,7 +118,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils
/**
* 文件名称验证
- *
+ *
* @param filename 文件名称
* @return true 正常 false 非法
*/
@@ -107,7 +129,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils
/**
* 检查文件是否可下载
- *
+ *
* @param resource 需要下载的文件
* @return true 正常 false 非法
*/
@@ -131,7 +153,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils
/**
* 下载文件名重新编码
- *
+ *
* @param request 请求对象
* @param fileName 文件名
* @return 编码后的文件名
@@ -184,6 +206,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils
.append(percentEncodedFileName);
response.setHeader("Content-disposition", contentDispositionValue.toString());
+ response.setHeader("download-filename", percentEncodedFileName);
}
/**
@@ -198,237 +221,32 @@ public class FileUtils extends org.apache.commons.io.FileUtils
return encode.replaceAll("\\+", "%20");
}
-
-
- /**
- * 获取指定(fileName)的扩展名称
- * @return
- */
- public static String getFileExtensionName(String filename){
- if ((filename != null) && (filename.length() > 0)) {
- int dot = filename.lastIndexOf('.');
- if ((dot > -1) && (dot < (filename.length() - 1))) {
- return filename.substring(dot + 1);
- }
- }
- return filename;
- }
- /**
- * 获取不带扩展名的文件名称
- * @param filename
- * @return
- */
- public static String getFileNameNoEx(String filename) {
- if ((filename != null) && (filename.length() > 0)) {
- int dot = filename.lastIndexOf('.');
- if ((dot >-1) && (dot < (filename.length()))) {
- return filename.substring(0, dot);
- }
- }
- return filename;
- }
- /**
- * 根据文件名称,获取文件icon
- * @param filename
- * @return
- */
- public static String getFileIcon(String filename){
- String icon = "";
- String exName = getFileExtensionName(filename);
- if("avi".equals(exName)){// avi
- icon = "avi.jpg";
- } else if("zip".equals(exName)){//zip
- return "zip.jpg";
- } else if("rar".equals(exName)){//rar
- return "rar.jpg";
- } else if("exe".equals(exName)){//exe
- return "exe.jpg";
- } else if("xls".equals(exName) || "xlsx".equals(exName)){//xls
- return "excel.jpg";
- } else if("doc".equals(exName) || "docx".equals(exName)){//doc
- return "word.jpg";
- } else if("ppt".equals(exName) || "pptx".equals(exName) ){//ppt
- return "ppt.jpg";
- } else if("txt".equals(exName)){//txt
- return "txt.jpg";
- } else if("chm".equals(exName)){//chm
- return "chm.jpg";
- } else if("pdf".equals(exName)){//pdf
- return "pdf.jpg";
- } else if("jpg".equals(exName)){//jpg
- return "jpg.jpg";
- } else if("png".equals(exName)){//png
- return "jpg.jpg";
- }else if("bmp".equals(exName)){//bmp
- return "bmp.jpg";
- } else if("gif".equals(exName)){//gif
- return "pic.jpg";
- } else if("html".equals(exName) || "htm".equals(exName) || "xhtml".equals(exName)){//html
- return "html.jpg";
- } else{
- return "normal.jpg";
- }
- return icon;
- }
- public static String getFileIconCss(String filename){
- String iconCss = "";
- String exName = getFileExtensionName(filename);
- if("zip".equals(exName)){//zip
- return "nui-ico-file nui-ico-file-rar";
- } else if("rar".equals(exName)){//rar
- return "nui-ico-file nui-ico-file-rar";
- }else if("xls".equals(exName) || "xlsx".equals(exName)){//xls
- return "nui-ico-file nui-ico-file-xls";
- } else if("doc".equals(exName) || "docx".equals(exName)){//doc
- return "nui-ico-file nui-ico-file-doc";
- } else if("ppt".equals(exName) || "pptx".equals(exName) ){//ppt
- return "nui-ico-file nui-ico-file-ppt";
- } else if("txt".equals(exName)){//txt
- return "nui-ico-file nui-ico-file-txt";
- } else if("chm".equals(exName)){//chm
- return "nui-ico-file nui-ico-file-html";
- } else if("html".equals(exName) || "htm".equals(exName) || "xhtml".equals(exName)){//html
- return "nui-ico-file nui-ico-file-html";
- } else{
- return "nui-ico-file nui-ico-file-default";
- }
- }
/**
- * 获取操作系统文件路径分隔符
- */
- public static String getSep(){
- return System.getProperties().getProperty("file.separator");
- }
- /**
- * 检查文件路径是否有效
- * @param path
- * @return
- */
- public static void checkPath(String path) throws IOException{
- File filePath = new File(path);
- if(!filePath.exists()){
- throw new IOException("无效的文件路径【" + path + "】;");
- }
- }
- /**
- * 创建目录
- * @param group
- * @param file
- * @return
+ * 获取图像后缀
+ *
+ * @param photoByte 图像数据
+ * @return 后缀名
*/
- public static File getDoccenterDir(String doccenterPath, String group,String file) throws IOException{
- File folder = new File(doccenterPath);
- FileUtils.checkPath(folder.getAbsolutePath());
- if(!folder.exists()){
- folder.mkdir();
- }
- folder = new File(folder.getAbsoluteFile() + FileUtils.getSep() +"group" + group);
- if(!folder.exists()){
- folder.mkdir();
- }
- folder = new File(folder.getAbsoluteFile() + FileUtils.getSep() +"file" + file);
- if(!folder.exists()){
- folder.mkdir();
- }
- return folder.getAbsoluteFile();
- }
-
- public static File getDoccenterDir(String doccenterPath, String tmpId) throws IOException{
- File folder = new File(doccenterPath);
- FileUtils.checkPath(folder.getAbsolutePath());
- if(!folder.exists()){
- folder.mkdir();
- }
- folder = new File(folder.getAbsoluteFile() + FileUtils.getSep() +"tmp" + tmpId);
- if(!folder.exists()){
- folder.mkdir();
+ public static String getFileExtendName(byte[] photoByte)
+ {
+ String strFileExtendName = "jpg";
+ if ((photoByte[0] == 71) && (photoByte[1] == 73) && (photoByte[2] == 70) && (photoByte[3] == 56)
+ && ((photoByte[4] == 55) || (photoByte[4] == 57)) && (photoByte[5] == 97))
+ {
+ strFileExtendName = "gif";
}
- return folder.getAbsoluteFile();
- }
- /**
- * 单位形式,显示文件大小
- * @param fileSize
- * @return
- */
- public static String getFilePrettySize(Long fileSize){
- long K = 1024;
- long M = K * K;
- long G = M * K;
- long T = G * K;
- long[] dividers = { T, G, M, K, 1 };
- String[] units = { "TB", "GB", "MB", "KB", "B" };
- if (fileSize == 0) {
- return "0B";
- } else if (fileSize < 0) {
- return "Invalid size";
+ else if ((photoByte[6] == 74) && (photoByte[7] == 70) && (photoByte[8] == 73) && (photoByte[9] == 70))
+ {
+ strFileExtendName = "jpg";
}
-
- String result = "";
- long temp = 0;
- for ( int i = 0; i < dividers.length; i++) {
- long divider = dividers[i];
- if (fileSize >= divider) {
- temp = fileSize / divider;
- if (temp < 1.05) {
- result = _format(fileSize,units[((i + 1) < units.length) ? (i + 1) : i]);
- } else {
- result = _format(temp, units[i]);
- }
- break;
- }
+ else if ((photoByte[0] == 66) && (photoByte[1] == 77))
+ {
+ strFileExtendName = "bmp";
}
- return result;
- }
- private static String _format(Long fileSize, String unit) {
- return (fileSize + " " + unit).replace(".0", "");
- }
-
- /*public static String getFileName(String fileName, String agent) {
- String codedfilename = fileName;
- try {
- if (agent != null && agent.indexOf("Mozilla") != -1 && agent.indexOf("Android") != -1) {// Mozilla..
- try {
- codedfilename = URLEncoder.encode(fileName, "UTF-8");
- } catch (Exception e) {
- codedfilename = fileName;
- }
- } else if (agent.toLowerCase().indexOf("safari") != -1) {// Safari浏览器,只能采用ISO编码的中文输出
- codedfilename = new String(codedfilename.getBytes("UTF-8"), "ISO8859-1");
- } else if (agent.toLowerCase().indexOf("chrome") != -1) {// Chrome浏览器,只能采用MimeUtility编码或ISO编码的中文输出
- codedfilename = MimeUtility.encodeText(codedfilename, "UTF8", "B");
- }
- // FireFox浏览器,可以使用MimeUtility或filename*或ISO编码的中文输出
- else if (agent != null && agent.toLowerCase().indexOf("mozilla") != -1 && agent.toLowerCase().indexOf("firefox") != -1) {// ff,mozilla..
- codedfilename = MimeUtility.encodeText(fileName, "GBK", "B");
- } else {// ie,opera..
- if (Charset.defaultCharset().name().indexOf("GBK") != -1) {
- codedfilename = new String(fileName.getBytes(), "ISO8859_1");
- } else {
- try {
- codedfilename = URLEncoder.encode(fileName, "utf-8");
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- }
-
- } catch (Exception e) {
-
- }
- return codedfilename;
- }*/
-
-
- public static byte[] InputStreamToByte(InputStream is) throws IOException {
-
- ByteArrayOutputStream bytestream = new ByteArrayOutputStream();
- int ch;
- while ((ch = is.read()) != -1) {
- bytestream.write(ch);
+ else if ((photoByte[1] == 80) && (photoByte[2] == 78) && (photoByte[3] == 71))
+ {
+ strFileExtendName = "png";
}
- byte imgdata[] = bytestream.toByteArray();
- bytestream.close();
-
- return imgdata;
+ return strFileExtendName;
}
}
diff --git a/aidex-common/src/main/java/com/aidex/common/utils/file/ImageUtils.java b/aidex-common/src/main/java/com/aidex/common/utils/file/ImageUtils.java
index 1277fa0ca4d1d7098709c9de05a7a8f0a5c8cedd..438c923dab7d9da7fa54f4ac21d1a5bd642e3045 100644
--- a/aidex-common/src/main/java/com/aidex/common/utils/file/ImageUtils.java
+++ b/aidex-common/src/main/java/com/aidex/common/utils/file/ImageUtils.java
@@ -1,5 +1,12 @@
package com.aidex.common.utils.file;
+import com.aidex.common.config.AiDexConfig;
+import com.aidex.common.constant.Constants;
+import com.aidex.common.utils.StringUtils;
+import org.apache.poi.util.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
@@ -7,12 +14,6 @@ import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.Arrays;
-import org.apache.poi.util.IOUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import com.aidex.common.config.AiDexConfig;
-import com.aidex.common.constant.Constants;
-import com.aidex.common.utils.StringUtils;
/**
* 图片处理工具类
@@ -58,8 +59,8 @@ public class ImageUtils
/**
* 读取文件为字节数据
- *
- * @param key 地址
+ *
+ * @param url 地址
* @return 字节数据
*/
public static byte[] readFile(String url)
@@ -94,6 +95,7 @@ public class ImageUtils
}
finally
{
+ IOUtils.closeQuietly(in);
IOUtils.closeQuietly(baos);
}
}
diff --git a/aidex-common/src/main/java/com/aidex/common/utils/file/MimeTypeUtils.java b/aidex-common/src/main/java/com/aidex/common/utils/file/MimeTypeUtils.java
index 486205d098c5fa447c19fa47c111707c29439b7e..a3e11c998db68a7bb37c60089286f33bc481644b 100644
--- a/aidex-common/src/main/java/com/aidex/common/utils/file/MimeTypeUtils.java
+++ b/aidex-common/src/main/java/com/aidex/common/utils/file/MimeTypeUtils.java
@@ -2,7 +2,7 @@ package com.aidex.common.utils.file;
/**
* 媒体类型工具类
- *
+ *
* @author ruoyi
*/
public class MimeTypeUtils
@@ -16,7 +16,7 @@ public class MimeTypeUtils
public static final String IMAGE_BMP = "image/bmp";
public static final String IMAGE_GIF = "image/gif";
-
+
public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" };
public static final String[] FLASH_EXTENSION = { "swf", "flv" };
@@ -24,6 +24,8 @@ public class MimeTypeUtils
public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
"asf", "rm", "rmvb" };
+ public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" };
+
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
// 图片
"bmp", "gif", "jpg", "jpeg", "png",
@@ -31,6 +33,8 @@ public class MimeTypeUtils
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
// 压缩文件
"rar", "zip", "gz", "bz2",
+ // 视频格式
+ "mp4", "avi", "rmvb",
// pdf
"pdf" };
diff --git a/aidex-common/src/main/java/com/aidex/common/utils/html/EscapeUtil.java b/aidex-common/src/main/java/com/aidex/common/utils/html/EscapeUtil.java
index 047363a6c9a03125fd70050b680897f2e32020a9..001c08c96310c1081e7b5eaae3ca3f703f521354 100644
--- a/aidex-common/src/main/java/com/aidex/common/utils/html/EscapeUtil.java
+++ b/aidex-common/src/main/java/com/aidex/common/utils/html/EscapeUtil.java
@@ -4,7 +4,7 @@ import com.aidex.common.utils.StringUtils;
/**
* 转义和反转义工具类
- *
+ *
* @author ruoyi
*/
public class EscapeUtil
@@ -22,7 +22,7 @@ public class EscapeUtil
// special HTML characters
TEXT['\''] = "'".toCharArray(); // 单引号
- TEXT['"'] = """.toCharArray(); // 单引号
+ TEXT['"'] = """.toCharArray(); // 双引号
TEXT['&'] = "&".toCharArray(); // &符
TEXT['<'] = "<".toCharArray(); // 小于号
TEXT['>'] = ">".toCharArray(); // 大于号
@@ -30,7 +30,7 @@ public class EscapeUtil
/**
* 转义文本中的HTML字符为安全的字符
- *
+ *
* @param text 被转义的文本
* @return 转义后的文本
*/
@@ -41,7 +41,7 @@ public class EscapeUtil
/**
* 还原被转义的HTML特殊字符
- *
+ *
* @param content 包含转义符的HTML内容
* @return 转换后的字符串
*/
@@ -52,7 +52,7 @@ public class EscapeUtil
/**
* 清除所有HTML标签,但是不删除标签内的内容
- *
+ *
* @param content 文本
* @return 清除标签后的文本
*/
@@ -63,7 +63,7 @@ public class EscapeUtil
/**
* Escape编码
- *
+ *
* @param text 被编码的文本
* @return 编码后的字符
*/
@@ -93,7 +93,7 @@ public class EscapeUtil
/**
* Escape解码
- *
+ *
* @param content 被转义的内容
* @return 解码后的字符串
*/
diff --git a/aidex-common/src/main/java/com/aidex/common/utils/uuid/IdUtils.java b/aidex-common/src/main/java/com/aidex/common/utils/uuid/IdUtils.java
index bb17f82db29037568379632812355432157c1d4f..5d01c245d1999442c5158d2ebb6fd83ac48624b6 100644
--- a/aidex-common/src/main/java/com/aidex/common/utils/uuid/IdUtils.java
+++ b/aidex-common/src/main/java/com/aidex/common/utils/uuid/IdUtils.java
@@ -4,24 +4,24 @@ import com.aidex.common.utils.uuid.UUID;
/**
* ID生成器工具类
- *
+ *
* @author ruoyi
*/
public class IdUtils
{
/**
* 获取随机UUID
- *
+ *
* @return 随机UUID
*/
public static String randomUUID()
{
- return UUID.randomUUID().toString().replaceAll("-", "");
+ return UUID.randomUUID().toString();
}
/**
* 简化的UUID,去掉了横线
- *
+ *
* @return 简化的UUID,去掉了横线
*/
public static String simpleUUID()
@@ -31,7 +31,7 @@ public class IdUtils
/**
* 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID
- *
+ *
* @return 随机UUID
*/
public static String fastUUID()
@@ -41,7 +41,7 @@ public class IdUtils
/**
* 简化的UUID,去掉了横线,使用性能更好的ThreadLocalRandom生成UUID
- *
+ *
* @return 简化的UUID,去掉了横线
*/
public static String fastSimpleUUID()
diff --git a/aidex-controller/pom.xml b/aidex-controller/pom.xml
index 1274e623e28dcfbf6b523cf221580b5bbdbb03f2..a865216ba82f9e000fe7b70ad907056838b974bb 100644
--- a/aidex-controller/pom.xml
+++ b/aidex-controller/pom.xml
@@ -19,30 +19,19 @@