随笔分类 -  JAVA

摘要:Git撤销commit 已经commit但未push 回退本地提交代码 格式 git reset --soft|--mixed|--hard <commit_id> 说明 --mixed(默认) 不删除工作空间的改动代码,撤销commit,撤销git add file. --soft(常用) 不删除 阅读全文
posted @ 2022-04-11 21:43 DiligentCoder 阅读(2416) 评论(0) 推荐(1)
摘要:有面试官会问:你重写过 hashcode和equals 么,为什么重写equals时必须重写hashCode方法? equals和hashCode都是Object对象中的非final方法,它们设计的目的就是被用来覆盖(override)的,所以在程序设计中还是经常需要处理这两个方法.下面我们一起来看 阅读全文
posted @ 2022-04-11 21:42 DiligentCoder 阅读(226) 评论(0) 推荐(0)
摘要:此处记录一下,项目使用中遇到过这个问题,百度长篇大论没一句有用的。 问题阐述 通过实现【WebMvcConfigurer】类后,addInterceptors方法就不执行,导致拦截器不生效。 原因 原因其实很简单,因为代码中有【WebMvcConfigurationSupport】的继承类,Spri 阅读全文
posted @ 2022-03-10 18:29 DiligentCoder 阅读(2512) 评论(0) 推荐(0)
摘要:https://zhuanlan.zhihu.com/p/149287061 阅读全文
posted @ 2021-09-13 23:24 DiligentCoder 阅读(75) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/weixin_30733003/article/details/98574063 阅读全文
posted @ 2021-07-31 15:51 DiligentCoder 阅读(61) 评论(0) 推荐(0)
摘要:暂且这样记吧... java 对象数组以及非静态成员变量存在于堆中 java 类中的方法以及静态成员变量存在于方法区中 java 引用以及局部变量表在栈中 https://www.cnblogs.com/zhuxiaopijingjing/p/12272137.html 阅读全文
posted @ 2021-07-18 21:50 DiligentCoder 阅读(107) 评论(0) 推荐(0)
摘要:![](https://img2020.cnblogs.com/blog/1504668/202107/1504668-20210717204410519-2040730187.png) 阅读全文
posted @ 2021-07-17 20:45 DiligentCoder 阅读(74) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/coding-one/p/12401630.html 阅读全文
posted @ 2021-07-16 23:53 DiligentCoder 阅读(134) 评论(0) 推荐(0)
摘要:@SpringBootApplication包含的三个注解及其含义 第一个:@SpringBootConfiguration(在这个类的源码中又有一个Configuration的注解) @Configuration这个注解的作用就是声明当前类是一个配置类,然后Spring会自动扫描到添加了@Conf 阅读全文
posted @ 2021-07-16 22:14 DiligentCoder 阅读(968) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/weixin_42759988/article/details/99665964 put方法的思路: 1.对 key 的 hashCode()做 hash,然后再计算 index; 2.如果没碰撞直接放到 bucket 里; 3.如果碰撞了,以链表的形式存 阅读全文
posted @ 2021-07-16 01:05 DiligentCoder 阅读(74) 评论(0) 推荐(0)
摘要:"用脑思考"和"用心感知" 阅读全文
posted @ 2021-05-19 17:48 DiligentCoder 阅读(59) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/weixin_46419373/article/details/107823779 阅读全文
posted @ 2021-05-13 10:47 DiligentCoder 阅读(65) 评论(0) 推荐(0)
摘要:SELECT TIMESTAMPDIFF(YEAR,'1997-03-05', CURDATE()) 阅读全文
posted @ 2021-05-11 10:56 DiligentCoder 阅读(236) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/qlqwjy/p/9763754.html 阅读全文
posted @ 2021-04-29 11:25 DiligentCoder 阅读(194) 评论(0) 推荐(0)
摘要:流程分析: https://blog.csdn.net/bluuusea/article/details/80284458 会生成新的access_token: https://blog.csdn.net/Hyaloidz/article/details/109146229 https://www. 阅读全文
posted @ 2021-03-17 10:48 DiligentCoder 阅读(387) 评论(0) 推荐(0)
摘要:https://www.pianshen.com/article/6728344640/ 阅读全文
posted @ 2021-03-13 13:58 DiligentCoder 阅读(690) 评论(0) 推荐(0)
摘要:首先维护一张两点之间的表 tmp: | a | b | | | | | 1 | 2 | insert into tmp select * from tmp t where not exists ( select 1 from tmp where t.b=# and t.a=# ) and not e 阅读全文
posted @ 2021-03-02 11:36 DiligentCoder 阅读(480) 评论(0) 推荐(0)
摘要:Spring boot中的注解@ConditionalOnProperty,可以通过配置文件中的属性值来判定configuration是否被注入. 配置类: @Configuration @ConditionalOnProperty(prefix = "x.y", name = "test", ha 阅读全文
posted @ 2021-02-22 18:04 DiligentCoder 阅读(3084) 评论(0) 推荐(1)
摘要:import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.anno 阅读全文
posted @ 2021-02-22 17:36 DiligentCoder 阅读(907) 评论(0) 推荐(0)
摘要:@Autowired DataSourceTransactionManager dataSourceTransactionManager; @Autowired TransactionDefinition transactionDefinition; TransactionStatus transa 阅读全文
posted @ 2021-01-22 11:11 DiligentCoder 阅读(155) 评论(0) 推荐(0)