- 博客(10)
- 收藏
- 关注
原创 Spring boot 解决跨域问题配置类
Spring boot 解决跨域问题配置类@Configurationpublic class CorsConfig { //解决跨域问题 @Bean public CorsWebFilter corsWebFilter(){ CorsConfiguration config = new CorsConfiguration(); config.addAllowedMethod("*"); config.addAllowedOri
2020-12-22 16:46:56
214
原创 随机验证码工具类
随机验证码工具类/** * 随机生成验证码工具类 */public class ValidateCodeUtils { /** * 随机生成验证码 * * @param length 长度为4位或者6位 * @return */ public static Integer generateValidateCode(int length) { Integer code = null; if (length
2020-12-21 16:43:28
161
原创 阿里云短信工具类
阿里云短信工具类public class SMSUtils { public static final String VALIDATE_CODE = "";//发送短信验证码 /** * 发送短信 * * @param phoneNumbers * @param param */ public static void sendShortMessage(String templateCode, String phoneNumbers
2020-12-21 16:40:23
419
原创 MD5加密工具类
MD5加密工具类public final class MD5 { public static String encrypt(String strSrc) { try { char hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; byte[] byte
2020-12-21 16:34:45
134
原创 Caused by: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor
org.springframework.security.authentication.InternalAuthenticationServiceException: nested exception is org.apache.ibatis.executor.ExecutorException: No constructor found in com.ittext.springsecurity.entity.Users matching [java.lang.Long, java.lang.String,
2020-12-20 14:10:16
2668
原创 高德地图获取经纬度工具类
高德地图获取经纬度工具类MapUtilspublic class MapUtils { public static String getHttpResponse(String serverUrl) { BufferedReader bf = null; StringBuffer result = null; try { //构造一个URI URI uri = new URI(serverUrl);
2020-12-18 20:25:43
575
1
原创 图片上传工具类
图片上传工具类FileUtilspublic class FileUtils { public static boolean upload(MultipartFile file, String path, String fileName){ //使用原文件名 String realPath = path + "/" + fileName; File dest = new File(realPath); //判断文件父目录是否存在
2020-12-16 16:06:06
207
原创 递归算法应用并使用分页
递归算法应用并使用分页直接上代码,注释很全 自己看public List<Goods> findSubordinateEnterprise(Integer currentPage, Integer pageSize, String queryString) { //查询所有信息 List<Goods> allGoods = findService.findAllGoods(); //根据queryString查找玩具厂信息
2020-12-16 15:44:53
1143
3
翻译 token工具类
token工具类内置解析token方法public class JwtUtils { //签名密钥 private static String key = "userlogin"; //签名失效时间// private static Long failureTime = Long.valueOf(604800000); /** * 设置认证token * * @Author: * @Date: 10:10 2020/12
2020-12-16 15:21:09
497
原创 Java生成二维码并上传至OSS对象存储
Java生成二维码并上传至OSSOSS工具类@Component public class OSSClientUtil { protected static final Logger log = LoggerFactory.getLogger(OSSClientUtil.class); **//此处填充你的阿里云相关信息** @Value("${Oos.endpoint}") private String endpoint; @Value
2020-12-16 15:14:52
900
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人