会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
BUG工厂
物必先腐,而后虫生
博客园
首页
联系
订阅
管理
2025年1月1日
JAVA生成验证码
摘要: 1、生成方式(验证码字符串、图片验证码、base64验证码图片) /** * @description: 使用方式1: 直接获取验证码字符串,前端进行自定义渲染 * @date: 2024/12/16 11:37 * @param * @return java.lang.String */ @Get
阅读全文
posted @ 2025-01-01 14:01 bug毁灭者
阅读(313)
评论(0)
推荐(0)
2024年11月30日
JAVA文件下载
摘要: 1、控制器代码 @PostMapping('/clientDownload') public void clientDownload(HttpServletResponse response){ try { return FileUtils.downloadFile(filePath,downloa
阅读全文
posted @ 2024-11-30 17:24 bug毁灭者
阅读(72)
评论(0)
推荐(0)
2024年11月23日
Springboot集成Mongodb
摘要: 1、安装Mongodb 参考链接:https://www.cnblogs.com/lveyHang/p/16866309.html 2、进行配置 找到mongodb的安装位置、找到如下文件进行配置 Mongodb\bin\mongod.cfg # 配置数据存储目录,没有则创建. storage: d
阅读全文
posted @ 2024-11-23 19:48 bug毁灭者
阅读(651)
评论(0)
推荐(0)
2024年3月17日
JAVA实现大文件分片上传断点续传
摘要: 直接上代码 import org.springframework.web.multipart.MultipartFile; import java.util.concurrent.CompletableFuture; import org.apache.commons.lang3.StringUti
阅读全文
posted @ 2024-03-17 09:02 bug毁灭者
阅读(258)
评论(0)
推荐(0)
2024年3月9日
JAVA使用DFA算法过滤敏感词
摘要: 代码示例如下: import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ReUtil; import cn.hutool.core.util.StrUtil; import com.google.common.col
阅读全文
posted @ 2024-03-09 18:53 bug毁灭者
阅读(857)
评论(0)
推荐(0)
2024年1月19日
JAVA实现RSA加密、解密、加签、验签
摘要: 1、工具类RSAUtils.java import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.X509EncodedKeySpec; import java.io.ByteArrayOutputStream;
阅读全文
posted @ 2024-01-19 19:12 bug毁灭者
阅读(5394)
评论(0)
推荐(1)
2023年12月15日
SpringBoot使用Async注解实现异步线程
摘要: 1、启动类增加@EnableAsync注解 2、yml增加配置 spring: task: execution: pool: max-size: 8 core-size: 8 keep-alive: 60 queue-capacity: 1000 thread-name-prefix: Asnyc-
阅读全文
posted @ 2023-12-15 19:25 bug毁灭者
阅读(148)
评论(0)
推荐(0)
2023年12月6日
SpringBoot集成Jasypt实现数据加密
摘要: 1、环境说明 JDK1.8 + SpringBoot2.7 2、添加pom依赖 <dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <
阅读全文
posted @ 2023-12-06 20:39 bug毁灭者
阅读(597)
评论(0)
推荐(0)
JAVA操作Redis工具类
摘要: import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTempl
阅读全文
posted @ 2023-12-06 20:03 bug毁灭者
阅读(726)
评论(0)
推荐(0)
2023年7月2日
JAVA解压tar、zip、rar、gz、7z文件
摘要: 1、添加pom依赖 <!-- tar解压依赖 --> <dependency > <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>1.20</version> </dep
阅读全文
posted @ 2023-07-02 16:38 bug毁灭者
阅读(2093)
评论(0)
推荐(1)
下一页
公告