摘要:
http响应码简介 1 返回401一般生产环境出现这个问题,是由于没有通过接口的登录认证。出现这种情况,一般用户在尝试访问受保护的资源前,需要通过某种形式的身份验证(如登录),但如果未能正确提供必要的认证信息,如Token、用户名和密码等。就会出现返回码是401的情况。 2 返回403如果生产环境请 阅读全文
posted @ 2024-11-20 19:02
oktokeep
阅读(148)
评论(0)
推荐(0)
摘要:
idea No usages found in All Places Press Ctrl+Alt+F7 again to search in 'Project Files' 出现 usages 无效的情况 No usages found in All Places 今天偶然间碰到了这个问题, 问题 阅读全文
posted @ 2024-11-20 19:01
oktokeep
阅读(869)
评论(0)
推荐(0)
摘要:
Java大事务处理 1.少用@Transactional注解,可以使用编程式事务2.将查询(select)方法放到事务外,事务失效原因:spring aop需要生成代理对象,直接方法调用使用的还是原始对象,所以事务不会生效。 1.新加一个Service方法 2.在该Service类中注入自己 3.在 阅读全文
posted @ 2024-11-20 18:58
oktokeep
阅读(191)
评论(0)
推荐(0)
摘要:
Java二分查找算法Collections.binarySearch package com.example.core.mydemo.javaDemo; import java.util.ArrayList; import java.util.Collections; /** * 二分查找算法是一种 阅读全文
posted @ 2024-11-20 18:51
oktokeep
阅读(57)
评论(0)
推荐(0)
摘要:
Java工具类 NumberUtils 对整型数字的引用 package com.example.core.mydemo.javaDemo; import org.apache.commons.lang3.math.NumberUtils; public class IntegerTest { pu 阅读全文
posted @ 2024-11-20 18:50
oktokeep
阅读(99)
评论(0)
推荐(0)
摘要:
Java获取时间戳,毫秒数和秒数 package com.example.core.mydemo.javaDemo; import java.time.LocalDateTime; import java.time.ZoneId; public class TimeTest { public sta 阅读全文
posted @ 2024-11-20 18:49
oktokeep
阅读(280)
评论(0)
推荐(0)
浙公网安备 33010602011771号