update code
parent
c8f3e1ef72
commit
d1268ae236
Binary file not shown.
|
@ -47,6 +47,8 @@
|
|||
<groupId>cc.casually</groupId>
|
||||
<artifactId>html-parse</artifactId>
|
||||
<version>2.1.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}\libs\html-parse-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.ruoyi.utils;
|
||||
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* 文件管理工具类
|
||||
|
@ -73,6 +74,6 @@ public class FileUtil {
|
|||
byte[] buffer = new byte[(int) file.length()];
|
||||
inputFile.read(buffer);
|
||||
inputFile.close();
|
||||
return new BASE64Encoder().encode(buffer);
|
||||
return Base64.getMimeEncoder().encodeToString(buffer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package com.ruoyi.utils;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import sun.misc.BASE64Decoder;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageReadParam;
|
||||
|
@ -16,6 +15,7 @@ import java.net.MalformedURLException;
|
|||
import java.net.URL;
|
||||
import java.util.Iterator;
|
||||
import java.util.UUID;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* mergeImage 合成图拼
|
||||
|
@ -269,7 +269,7 @@ public class ImageUtils {
|
|||
// 将图片转化为base64并返回
|
||||
byte[] data = outputStream.toByteArray();
|
||||
// 此处一定要使用org.apache.tomcat.util.codec.binary.Base64,防止再linux上出现换行等特殊符号
|
||||
base64Image = Base64.encodeBase64String(data);
|
||||
base64Image = Base64.getEncoder().encodeToString(data);
|
||||
} catch (Exception e) {
|
||||
// 抛出异常
|
||||
throw e;
|
||||
|
@ -299,7 +299,7 @@ public class ImageUtils {
|
|||
return base64Image;
|
||||
}
|
||||
|
||||
static BASE64Decoder decoder = new BASE64Decoder();
|
||||
|
||||
|
||||
/**
|
||||
* base64压缩图片至指定大小
|
||||
|
@ -319,7 +319,7 @@ public class ImageUtils {
|
|||
ByteArrayInputStream inputStream = null;
|
||||
try {
|
||||
|
||||
byte[] bytes1 = decoder.decodeBuffer(imageBase);
|
||||
byte[] bytes1 = Base64.getDecoder().decode(imageBase);
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(bytes1);
|
||||
BufferedImage image = ImageIO.read(bais);
|
||||
|
||||
|
@ -355,7 +355,7 @@ public class ImageUtils {
|
|||
// 将图片转化为base64并返回
|
||||
byte[] data = outputStream.toByteArray();
|
||||
// 此处一定要使用org.apache.tomcat.util.codec.binary.Base64,防止再linux上出现换行等特殊符号
|
||||
base64Image = Base64.encodeBase64String(data);
|
||||
base64Image = Base64.getEncoder().encodeToString(data);
|
||||
if(StringUtils.isEmpty(base64Image)) {
|
||||
base64Image = imageBase;
|
||||
}
|
||||
|
@ -402,8 +402,8 @@ public class ImageUtils {
|
|||
}
|
||||
}
|
||||
// 加密
|
||||
BASE64Encoder encoder = new BASE64Encoder();
|
||||
return encoder.encode(data);
|
||||
|
||||
return Base64.getEncoder().encodeToString(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -26,7 +26,9 @@
|
|||
<dependency>
|
||||
<groupId>cc.casually</groupId>
|
||||
<artifactId>html-parse</artifactId>
|
||||
<version>2.1.5</version>
|
||||
<version>2.1.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}\libs\html-parse-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -2,8 +2,7 @@ package com.ruoyi.helmet.comp.encrypt;
|
|||
|
||||
|
||||
import com.ruoyi.helmet.comp.conf.ThreeAPIInfo;
|
||||
import sun.misc.BASE64Decoder;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.Cipher;
|
||||
|
|
Binary file not shown.
|
@ -33,7 +33,9 @@
|
|||
<dependency>
|
||||
<groupId>cc.casually</groupId>
|
||||
<artifactId>html-parse</artifactId>
|
||||
<version>2.1.5</version>
|
||||
<version>2.1.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}\libs\html-parse-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
Binary file not shown.
|
@ -29,7 +29,9 @@
|
|||
<dependency>
|
||||
<groupId>cc.casually</groupId>
|
||||
<artifactId>html-parse</artifactId>
|
||||
<version>2.1.5</version>
|
||||
<version>2.1.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}\libs\html-parse-2.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.ruoyi.weixin.service.IEnvironmentService;
|
|||
import com.ruoyi.weixin.service.ISmzTeamLeaderNameService;
|
||||
import com.ruoyi.weixin.util.GetRequestJsonUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.omg.CORBA.OBJ_ADAPTER;
|
||||
//import org.omg.CORBA.OBJ_ADAPTER;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
|
@ -14,8 +14,8 @@ import com.ruoyi.weixin.mapper.EnvironmentMapper;
|
|||
import com.ruoyi.weixin.service.IEnvironmentService;
|
||||
import com.ruoyi.weixin.util.RequestUtils;
|
||||
import org.jasig.cas.client.util.CommonUtils;
|
||||
import org.omg.CORBA.MARSHAL;
|
||||
import org.omg.CORBA.Request;
|
||||
//import org.omg.CORBA.MARSHAL;
|
||||
//import org.omg.CORBA.Request;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
11
pom.xml
11
pom.xml
|
@ -298,6 +298,13 @@
|
|||
<artifactId>mkl-examine</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.32</version> <!-- 请检查是否有更新的版本 -->
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
@ -348,7 +355,7 @@
|
|||
<repository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
|
@ -359,7 +366,7 @@
|
|||
<pluginRepository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
|
|
Binary file not shown.
|
@ -160,8 +160,10 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>com.aspose</groupId>
|
||||
<artifactId>cells</artifactId>
|
||||
<artifactId>aspose-cells</artifactId>
|
||||
<version>8.5.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}\libs\aspose-cells-8.5.2.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
Loading…
Reference in New Issue