摘要: public static void main(String[] args) throws NoSuchMethodException { //入参 CmsModuleDTO queryReq = new CmsModuleDTO(); queryReq.setModuleScenario("新手" 阅读全文
posted @ 2023-10-09 15:02 Ash灬 阅读(19) 评论(0) 推荐(0)
摘要: 代码 在需要上传的接口controller中调用 @PostMapping("/upload") public xxx upload(MultipartFile file) { // 校验文件大小、名字、后缀 CommentMethod.uploadVerify(file); 你的业务代码 } pa 阅读全文
posted @ 2023-10-09 14:57 Ash灬 阅读(1209) 评论(0) 推荐(0)
摘要: 测试 原本10次的循环优化成了4次 源代码public static void main(String[] args) { int target = 9; int[] nums = new int[]{-1, 0, 3, 5, 9, 12, 20, 21, 22, 23,25}; int searc 阅读全文
posted @ 2023-02-22 09:52 Ash灬 阅读(19) 评论(0) 推荐(0)
摘要: 不处理异常的话,线程异常结果会在获取时才会暴露 不处理: 获取线程结果异常: 阅读全文
posted @ 2023-02-21 14:04 Ash灬 阅读(554) 评论(0) 推荐(0)
摘要: 下载驱动地址 https://www.elastic.co/cn/downloads/past-releases/#jdbc-client 1.添加Driver 2.Driver界面 点+号,出现一个新的user Driver驱动 在Driver Files点+号 选择 custom JARs... 阅读全文
posted @ 2021-12-30 14:17 Ash灬 阅读(1627) 评论(0) 推荐(0)
摘要: jpa @Query中使用in,需要注意参数一定要是List<>,不然无法查询出数据。 @Query(value = "select count(*) from financial_style_productitem_detailed fspd where fspd.id in(:ids)", na 阅读全文
posted @ 2021-12-27 16:07 Ash灬 阅读(1377) 评论(0) 推荐(0)
摘要: 字符串转日期函数: STR_TO_DATE('2021-7-21','%Y-%m-%d') 日期转字符串函数: DATE_FORMAT(date,'%Y-%m-%d') 日期加一天或者一月或一年: 因为在数据库查询时候,如果查询日期date: date >= '2021-07-01' and dat 阅读全文
posted @ 2021-12-09 17:45 Ash灬 阅读(1410) 评论(0) 推荐(0)
摘要: Map<String, String> map = new HashMap<>(); // Convert all Map keys to a List List result = new ArrayList(map.keySet()); // Convert all Map values to a 阅读全文
posted @ 2021-12-09 13:30 Ash灬 阅读(1626) 评论(0) 推荐(0)
摘要: 2021-11-30 15:57:25.501 [ERROR] [http-nio-8080-exec-7] [c.g.s.c.GlobalExceptionHandler:doException:38] 系统异常: 2021/11/30 下午3:57:25 feign.FeignException 阅读全文
posted @ 2021-11-30 16:11 Ash灬 阅读(921) 评论(2) 推荐(0)
摘要: knife4j 目前主要支持以 Java 开发为主 Spring Boot 基础实战: Spring Boot 2.5.0 Knife4j 2.0.9 Maven 3.6.3 JDK 1.8 注意: 使用 Knife4j 2.0.6+ 版本,Spring Boot 的版本要求 2.2.x+ 1、Kn 阅读全文
posted @ 2021-11-23 17:42 Ash灬 阅读(938) 评论(0) 推荐(0)