摘要: maven工程配置日志:配置application.xml logging: level: com: p2p: mapper: debug file: path: ./logs config: classpath:logback-boot.xml 日志配置文件:logback-boot.xml <c 阅读全文
posted @ 2019-07-18 15:11 An-Optimistic-Person 阅读(1658) 评论(0) 推荐(0) 编辑
摘要: /** * 根据文件地址返回 File * @param url 地址 * @return */ public static File doGetDownload(String url) { String separator=File.separator; String dir="ExistingE 阅读全文
posted @ 2019-07-18 14:58 An-Optimistic-Person 阅读(2061) 评论(0) 推荐(0) 编辑
摘要: //图片转换 public static File getFileByUrl(String fileUrl) { ByteArrayOutputStream outStream =new ByteArrayOutputStream(); BufferedOutputStream stream =nu 阅读全文
posted @ 2019-07-18 14:56 An-Optimistic-Person 阅读(1944) 评论(0) 推荐(0) 编辑
摘要: private static void pdfToWord() { File file = new File("F:/使用Acrobat制作PDF模板说明.pdf"); PDDocument doc = null; try { doc = PDDocument.load(file); } catch (IOException e) { ... 阅读全文
posted @ 2019-07-18 14:53 An-Optimistic-Person 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 了解更多 阅读全文
posted @ 2019-07-18 14:47 An-Optimistic-Person 阅读(153) 评论(0) 推荐(0) 编辑
摘要: /** * 获取请求者的IP * 获取用户真实IP地址,不使用request.getRemoteAddr()的原因是有可能用户使用了代理软件方式避免真实IP地址, * 可是,如果通过了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP值 * @return ip */ public static String getRealIp(HttpServletR... 阅读全文
posted @ 2019-07-18 14:40 An-Optimistic-Person 阅读(4200) 评论(0) 推荐(0) 编辑
摘要: 写法一: 写法二: 阅读全文
posted @ 2019-07-18 14:34 An-Optimistic-Person 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1.生成12位的授权码 2.获取下个月的今天是几月几号 3.获取明天是几月几号 4.获取昨天是几月几号 5.计算某个日期几秒之后的时间 6.某个日期的几天后的时间的时间 7.某个日期几个月后的时间 8.日期和字符串互转 9.与当前时间相差几分钟 10. 获得上个月月份年份 11.获取当前时间 12. 阅读全文
posted @ 2019-07-18 11:19 An-Optimistic-Person 阅读(670) 评论(0) 推荐(0) 编辑