摘要: SpringBoot 2.1.1集成redis,在启动时报错信息如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' de 阅读全文
posted @ 2020-08-02 22:57 皈依之路 阅读(5485) 评论(0) 推荐(0) 编辑
摘要: "=="和equals方法究竟有什么区别? (单独把一个东西说清楚,然后再说清楚另一个,这样,它们的区别自然就出来了,混在一起说,则很难说清楚) ==操作符专门用来比较两个变量的值是否相等,也就是用于比较变量所对应的内存中所存储的数值是否相同,要比较两个基本类型的数据或两个引用变量是否相等,只能用= 阅读全文
posted @ 2017-09-11 12:03 皈依之路 阅读(234) 评论(0) 推荐(0) 编辑
摘要: PS: 图片显示较小,可右键在新标签页中查看图片 阅读全文
posted @ 2017-09-07 10:30 皈依之路 阅读(373) 评论(0) 推荐(1) 编辑
摘要: 测试环境 JDK1.8 1. catch中包含return 2. try中有return,finally里无return 3. try中有return,finally里也有return 2和3的解析 解析2 解析3 阅读全文
posted @ 2017-09-07 09:55 皈依之路 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 代码实现 /** * 源发器类 * @author bzhx * 2017年3月15日 */ public class Emp { private String ename; private int age; private double salary; //备忘操作,并返回备忘录对象 public 阅读全文
posted @ 2017-09-05 13:37 皈依之路 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 代码实现1 public interface Observer { void update(Subject subject); } public class ObserverA implements Observer{ private int myState; //myState需要跟目标对象的st 阅读全文
posted @ 2017-09-05 13:26 皈依之路 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 代码实现 public interface State { void handle(); } /** * 空闲状态 * @author bzhx * 2017年3月15日 */ public class FreeState implements State{ @Override public voi 阅读全文
posted @ 2017-09-05 13:11 皈依之路 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 代码实现 public abstract class BankTemplateMethod { //具体方法 public void takeNumber(){ System.out.println("取号排队"); } public abstract void transact(); //办理具体 阅读全文
posted @ 2017-09-05 13:06 皈依之路 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 代码实现 public interface Strategy { public double getPrice(double standardPrice); } public class NewCustomerFewStrategy implements Strategy{ @Override pu 阅读全文
posted @ 2017-09-05 13:01 皈依之路 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-09-05 12:54 皈依之路 阅读(95) 评论(0) 推荐(0) 编辑