import org.apache.commons.codec.binary.Base64; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; /** * Created with IntelliJ IDEA. * ...
分类:
其他好文 时间:
2020-07-23 01:40:14
阅读次数:
101
ssm调用接口时大致分为三步, 1,Java后台使用 MultipartFile 接收文件后将类型转为 file , 2,将file进行base64加密 3,调用接口进行传输 ssm调用webservice代码: import org.apache.commons.fileupload.disk.D ...
分类:
Web程序 时间:
2020-07-22 20:17:48
阅读次数:
73
mybatis的基础安装使用 1.jar包 :相关jar包的导入,包含mysql-connector-java-3.1.12-bin.jar mybatis-3.2.3.jar commons-logging-1.1.1.jar 等。 2.po类 :此处以学生类为例 public class Stu ...
分类:
其他好文 时间:
2020-07-21 21:47:46
阅读次数:
51
简介 对于httpclient,相信很多人或多或少接触过,对于httpclient的使用姿势,相信很多人会有疑问?下面这边会通过代码说明 package xxx; import org.apache.commons.codec.Charsets; import org.apache.http.Hea ...
分类:
Web程序 时间:
2020-07-21 14:13:32
阅读次数:
120
问题:由于项目需要,今天弄了很久,SLF4J和Logback 一、SLF4J和Logback和Commons Logging和Log4j的区别以及在普通的java项目中使用: SLF4J和Commons Logging类似,充当日志API,Logback和Log4j类似,充当其实现类, 为什么有了C ...
分类:
其他好文 时间:
2020-07-21 09:37:35
阅读次数:
69
import org.apache.commons.lang3.time.DateUtils; import java.time.LocalDate; import java.util.Calendar; import java.util.Date; public class b2获得任意一个时间的 ...
分类:
编程语言 时间:
2020-07-18 11:23:55
阅读次数:
90
import org.apache.commons.lang3.StringUtils;import org.springframework.util.ObjectUtils; public static boolean writeData2File(String exportPath,String ...
分类:
编程语言 时间:
2020-07-18 11:22:03
阅读次数:
85
1.页面写法 $("#zdytp").attr("src",ApiUrl+"/abc/getpic?orgid=8020");2.后台写法(引入提示jar包即可) IOUtils 引入依赖 <dependency> <groupId>commons-io</groupId> <artifactId> ...
分类:
数据库 时间:
2020-07-17 11:29:01
阅读次数:
128
Java-FTP上传下载 1 import lombok.extern.slf4j.Slf4j; 2 import org.apache.commons.net.ftp.FTPClient; 3 import org.apache.commons.net.ftp.FTPFile; 4 import ...
分类:
编程语言 时间:
2020-07-16 18:12:52
阅读次数:
65
本章节是java实现对文本数据的中间部分进行插入,文本数据集合插入,直接上代码把: import org.apache.commons.io.IOUtils; import java.io.*; import java.nio.file.Files; import java.nio.file.Pat ...
分类:
编程语言 时间:
2020-07-11 16:48:47
阅读次数:
74