![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java笔记
景向后山
越努力越幸运!
展开
-
Java String比较问题
字符串比较问题,可以转换成堆地址和常量池地址去比较。原创 2023-01-14 18:04:23 · 209 阅读 · 0 评论 -
SpringMVC字段验证返回400错误码
错误信息HTTP Status 400 – Bad RequestType Status ReportDescription The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax,原创 2017-09-05 16:14:02 · 5714 阅读 · 1 评论 -
AspectJ+自定义注解实现接口缓存
在数据库查询前我想查询是否存在缓存,不存在则查询,这样的重复性操作写在代码里很难看,通过AspectJ的AOP编程,可以很优雅地实现这个缓存过程。 但是在使用过程中,发现Spring自带的@Cacheable注解序列化对象时是使用JDK的序列化工具往Redis里存数据,这样很占Redis的内存,为何不用FastJSON之类的序列化工具序列化对象后往Redis里存JSON字符串呢,更加轻量快捷。...原创 2017-09-20 16:59:50 · 3104 阅读 · 3 评论 -
Linux下找到真正的JDK路径
输入:[root@cheng java]# ls -lrt /usr/bin/javalrwxrwxrwx 1 root root 22 Feb 9 18:22 /usr/bin/java -> /etc/alternatives/java[root@cheng java]# cd /etc/alternatives/java 发现:lrwxrwxrwx 1 root root 39 Feb原创 2017-02-09 20:35:18 · 16000 阅读 · 1 评论