1 2 3 4 5 ··· 24 下一页
摘要: https://www.kancloud.cn/tracy5546/dynamic-datasource/2264611 阅读全文
posted @ 2025-11-28 17:54 黄进广寒 阅读(4) 评论(0) 推荐(0)
摘要: @GetMapping("/download1") public void downloadFile1(HttpServletResponse response) throws IOException { // 下载excel String fileName = "excel-template/te 阅读全文
posted @ 2025-11-25 16:08 黄进广寒 阅读(48) 评论(0) 推荐(0)
摘要: CompletableFuture 是 Java 8 引入的一个非常强大的工具,用于编写异步、非阻塞的代码。它代表了未来某个时刻会完成的计算结果,并提供了丰富的 API 来组合、转换和处理异步任务。 核心场景一:执行耗时任务(避免阻塞主线程) 这是最基础的用途。当你有一个耗时的操作(如IO、网络请求 阅读全文
posted @ 2025-11-10 15:46 黄进广寒 阅读(103) 评论(0) 推荐(0)
摘要: 写了一个示意的代码,主要是通过exceptionally来控制异常信息futureA 是测试类,futureB 和C是并行的线程,加一个CompletableFuture result = CompletableFuture.allOf(futureA,futureB,futureC)保证ABC都处 阅读全文
posted @ 2025-10-30 16:21 黄进广寒 阅读(25) 评论(0) 推荐(0)
摘要: 分类 注解 作用‌ 常用参数/示例‌ 核心类注解‌ @Getter/@Setter 自动生成字段的 getter/setter 方法 @Setter(AccessLevel.PROTECTED) 指定访问权限 @ToString 生成 toString() @ToString(exclude = " 阅读全文
posted @ 2025-10-28 10:38 黄进广寒 阅读(21) 评论(0) 推荐(0)
摘要: /** * 导出Excel * * @return */ @ApiOperation("导出Excel") @PostMapping("/test") public void test(HttpServletRequest request, HttpServletResponse response) 阅读全文
posted @ 2025-10-28 09:09 黄进广寒 阅读(101) 评论(0) 推荐(0)
摘要: 概述 在现代分布式系统中,生成全局唯一的ID是一个常见且重要的需求。在微服务架构中,各个服务可能需要生成唯一标识符,如用户ID、订单ID等。传统的自增ID已经无法满足在集群环境下保持唯一性的要求,而分布式ID解决方案能够确保即使在多个实例间也能生成全局唯一的标识符。本文将深入探讨如何利用Redis实 阅读全文
posted @ 2025-10-27 16:46 黄进广寒 阅读(25) 评论(0) 推荐(0)
摘要: 最近deepseek很火写一篇随文 1.deepseek官网:https://www.deepseek.com/ 2.spring-ai官网:https://docs.spring.io/spring-ai/reference/api/chat/deepseek-chat.html 3.截止到目前s 阅读全文
posted @ 2025-03-05 13:22 黄进广寒 阅读(161) 评论(0) 推荐(0)
摘要: 1.关键点:通过springboot打包插件,将项目依赖都打到一个jar包内。 以下是pom配置文件: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler- 阅读全文
posted @ 2024-04-17 19:20 黄进广寒 阅读(1402) 评论(0) 推荐(0)
摘要: https://gitcode.csdn.net/65acad9db8e5f01e1e4520d7.html 阅读全文
posted @ 2024-04-17 09:40 黄进广寒 阅读(24) 评论(0) 推荐(0)
1 2 3 4 5 ··· 24 下一页