摘要: 技术博客 思否:https://segmentfault.com/ 掘金:https://juejin.cn/ 51CTO:https://blog.51cto.com/ 博客园:https://www.cnblogs.com/ infoQ:https://www.infoq.cn/ 简书:http 阅读全文
posted @ 2022-05-14 16:57 明天,你好啊 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 1:背景 工作中遇到计算二个地点之间的距离,根据百度经纬度进行计算。 2:maven 依赖 <dependency> <groupId>org.gavaghan</groupId> <artifactId>geodesy</artifactId> <version>1.1.3</version> < 阅读全文
posted @ 2023-12-12 16:00 明天,你好啊 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 1.AES 程序加密 1 package com.demo.util; 2 3 import com.demo.exception.BusinessException; 4 import com.demo.model.enums.ErrorEnum; 5 import lombok.extern.s 阅读全文
posted @ 2023-12-06 11:57 明天,你好啊 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 1.背景 数据库加密与java程序加密算法保持一致,统一采用AES加密算法。 2. java 代码加密 1 package com.pacific.permission.test; 2 3 import javax.crypto.Cipher; 4 import javax.crypto.spec. 阅读全文
posted @ 2023-12-05 10:32 明天,你好啊 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1.背景 RSA加密对加密的内容是有长度限制的,如果超出了长度限制,就会报错。所以需要采用分段加密,案例如下。 2.代码 1 package com.demo.util; 2 3 import org.apache.commons.codec.binary.Base64; 4 import org. 阅读全文
posted @ 2023-12-05 10:22 明天,你好啊 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 版本 Spring Cloud :Hoxton.SR12 Spring Cloud Gateway : 3.1.0 问题描述 在 SpringCloud 项目中,前后端分离目前很常见,在调试时,会遇到两种情况的跨域: 前端页面通过不同域名或IP访问微服务的后台 例如前端人员会在本地起HttpServ 阅读全文
posted @ 2022-10-19 19:55 明天,你好啊 阅读(582) 评论(0) 推荐(0) 编辑
摘要: String.format()字符串常规类型格式化的两种重载方式 format(String format, Object… args) 新字符串使用本地语言环境,制定字符串格式和参数生成格式化的新字符串。format(Locale locale, String format, Object… ar 阅读全文
posted @ 2022-10-18 09:28 明天,你好啊 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 无法读取到application.properties 编译或install后,检查target里面没有application.properties,初步判定为maven编译时将该文件过滤了。 解决方法: <build> <resources> <resource> <directory>src/m 阅读全文
posted @ 2022-09-27 14:43 明天,你好啊 阅读(1131) 评论(0) 推荐(0) 编辑
摘要: 原因 SpringBoot项目,只会识别application.* 配置文件,并不会自动识别bootstrap.yml。 bootstrap.yml配置是SpringCloud项目才会用到的,如果你想在springboot项目中用bootstrap.yml,那么你需要添加bootstrap启动器。 阅读全文
posted @ 2022-09-27 14:22 明天,你好啊 阅读(1883) 评论(0) 推荐(0) 编辑
摘要: base64格式 base64图片或文件由以下格式组成:第一部分: data:第二部分: image/jpeg; (类型)第三部分: base64, 第四部分:base64内容 说明 base64图片上传到OOS需要先将读到的base64文件转化成字节,然后在进行上传。base64文件上传之前需要进 阅读全文
posted @ 2022-09-08 17:02 明天,你好啊 阅读(1562) 评论(0) 推荐(0) 编辑
摘要: 方法一: Mybatis 配置: mybatis: configuration: ### 开启打印sql配置 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl ### 开启驼峰配置 map-underscore-to-camel-case:t 阅读全文
posted @ 2022-07-21 14:56 明天,你好啊 阅读(15847) 评论(0) 推荐(0) 编辑