上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页

2020年6月10日

class path resource [api.pdf] cannot be opened because it does not exist

摘要: 1、代码 public void downloadApiDoc(HttpServletResponse response) { ClassPathResource classPathResource = new ClassPathResource("api.pdf"); try (InputStre 阅读全文

posted @ 2020-06-10 10:33 滚动的蛋 阅读(810) 评论(0) 推荐(0) 编辑

2020年6月9日

阿里云申请免费的ssl证书

摘要: 1、输入ssl搜索,点击购买,按照如下选择 2、通过后下载,配置 3、Nginx 配置https server { listen 443 ssl; # 1.1版本后这样写 server_name www.domain.com; #填写绑定证书的域名 ssl_certificate xxx.pem; 阅读全文

posted @ 2020-06-09 17:12 滚动的蛋 阅读(3173) 评论(0) 推荐(0) 编辑

2020年6月8日

Mysql 设置更新时间自动触发

摘要: 1、使用工具navicat,勾选即可 2、语句 ON UPDATE CURRENT_TIMESTAMP(0) SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- -- Table structure for user -- DROP TABLE IF 阅读全文

posted @ 2020-06-08 11:03 滚动的蛋 阅读(1000) 评论(0) 推荐(0) 编辑

ApplicationListener spring 监听器

摘要: /* * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this fi 阅读全文

posted @ 2020-06-08 10:54 滚动的蛋 阅读(265) 评论(0) 推荐(0) 编辑

2020年6月5日

@RequestParam VS @RequestBody [GET/POST/PUT]

摘要: @RequestParam用来处理Content-Type: 为 application/x-www-form-urlencoded编码的内容。(Http协议中,如果不指定Content-Type,则默认传递的参数就是application/x-www-form-urlencoded类型) Requ 阅读全文

posted @ 2020-06-05 15:35 滚动的蛋 阅读(842) 评论(0) 推荐(0) 编辑

使用BigDecimal进行加减乘除计算

摘要: # java在浮点型运算时是非精确计算,如下 System.out.println(0.05 + 0.01);// 0.060000000000000005 System.out.println(1.0 - 0.42);// 0.5800000000000001 System.out.println 阅读全文

posted @ 2020-06-05 12:20 滚动的蛋 阅读(298) 评论(0) 推荐(0) 编辑

2020年6月4日

MYSQL case when 条件判断

摘要: 1、多个字段的判断,case 后不指定字段,使用when来判断多个字段 SELECT A.id,NAME,description, CASE WHEN ISNULL(apply_status) THEN 4 WHEN (A.enabled=0) THEN 3 ELSE apply_status EN 阅读全文

posted @ 2020-06-04 21:28 滚动的蛋 阅读(19215) 评论(0) 推荐(0) 编辑

Java 时间戳加减

摘要: public static void main(String[] args){ long curSysTime = System.currentTimeMillis(); System.out.println(curSysTime); System.out.println(new Date(curS 阅读全文

posted @ 2020-06-04 17:11 滚动的蛋 阅读(6018) 评论(0) 推荐(0) 编辑

2020年6月1日

使用spring validation完成数据后端校验

摘要: move to https://spring.io/guides/gs/validating-form-input/ 阅读全文

posted @ 2020-06-01 11:28 滚动的蛋 阅读(189) 评论(0) 推荐(0) 编辑

2020年5月28日

Mybaist plus 枚举类型转化

摘要: MP提供了两种方式处理枚举映射 1、继承 implements IBaseEnum<T> package com.common.auth.constants; import com.baomidou.mybatisplus.annotation.EnumValue; import com.faste 阅读全文

posted @ 2020-05-28 18:02 滚动的蛋 阅读(1714) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页

导航