摘要: private static final char[] hexCode = "0123456789ABCDEF".toCharArray(); // 文件类取MD5 public static String calcMD5(File file){ try (InputStream stream = 阅读全文
posted @ 2020-07-06 09:29 天天代码码天天 阅读(25) 评论(0) 推荐(0) 编辑
摘要: MySQL Oracle SqlServer 阅读全文
posted @ 2020-07-03 22:21 天天代码码天天 阅读(8) 评论(0) 推荐(0) 编辑
摘要: scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令, scp传输是加密的,可能会稍微影响一下速度。另外,scp还非常不占资源,不会提高多少系统负荷,在这一点上,rsync就远远不及它了。虽然 rsync比scp会快一点,但当小文件众多的情况下,rsync会导致硬盘I/O非 阅读全文
posted @ 2020-07-01 15:50 天天代码码天天 阅读(20) 评论(0) 推荐(0) 编辑
摘要: @Test public void testUpload() throws Exception { String url = "http://127.0.0.1/file/upload"; String filePath = "C:\\temp\\1.png"; RestTemplate rest 阅读全文
posted @ 2020-07-01 11:20 天天代码码天天 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 使用split进行字符串分割时需要注意2点 1、特殊字符作为分隔符时需要使用\\进行转义(如\\ -> \\\\; | -> \\| ) 特殊字符 .$|()[{^?*+\\ 例如对"|"分隔 未转义 String str = "01|02|03"; String[] strArr = str.sp 阅读全文
posted @ 2020-06-29 16:05 天天代码码天天 阅读(10) 评论(0) 推荐(0) 编辑
摘要: @Component public class Config { @Value("${config1}") private static String config1; } 使用上面这种方式,config1会返回null 正确写法 @Component public class Config { p 阅读全文
posted @ 2020-06-29 09:46 天天代码码天天 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 模板 下载后的效果 项目结构 pom <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSche 阅读全文
posted @ 2020-06-25 10:20 天天代码码天天 阅读(17) 评论(0) 推荐(0) 编辑
摘要: mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.4 -Dpackaging=jar -Dfile=D:\ojdbc6-11.2.0.4.jar ojdbc6-11.2.0.4.jar 阅读全文
posted @ 2020-06-19 11:24 天天代码码天天 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 代码如下,很简单 namespace Delegate { class Program { delegate void SayHi(); void SayHi_1() { Console.WriteLine("SayHi_1"); } static void Main(string[] args) 阅读全文
posted @ 2020-06-16 13:37 天天代码码天天 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 前台界面 上传 下载 前台代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns= 阅读全文
posted @ 2020-06-16 09:35 天天代码码天天 阅读(13) 评论(0) 推荐(0) 编辑