- 博客(7)
- 收藏
- 关注
原创 设计模式之建造者模式
public class BuilderPattern { public static void main(String[] args) { XmlBuilder builder = new XmlBuilder("a.xml"); Config config = builder.parse(); System.out.println(config); }}class Config { private int select; private int delete; publi.
2022-04-07 23:24:44 66
原创 设计模式之抽象工厂模式
package edu.design.pattern;/**** @author xxw* @date 2022-04-07 22:43:36* @Description **/public class AbstractFactoryPattern { public static void main(String[] args) { AppShop appShop = new XiaomiAppShop(); Earphone earphone = appShop.sellEar.
2022-04-07 23:21:15 69
原创 设计模式之工厂方法模式
public class AbstractFactoryPattern { public static void main(String[] args) { AppShop appShop = new XiaomiAppShop(); Earphone earphone = appShop.sellEarphone(); Pad pad = appShop.sellPad(); earphone.showType(); pad.showType(); }}interface A.
2022-04-07 23:19:35 87
原创 设计模式之原型模式
public class PrototypePattern { public static void main(String[] args) throws CloneNotSupportedException { Prototype prototype = new Prototype(); Prototype clone = (Prototype) prototype.clone(); System.out.println(prototype == clone); clone.num[0.
2022-04-07 23:17:50 198
原创 设计模式之单例模式
饿汉式public class SingletonPattern_Hungry { public static void main(String[] args) { for (int i = 0; i < 10; i++) { new Thread(()->{ SingletonHungry instance = SingletonHungry.getInstance(); System.out.println(instance); }).start();
2022-04-07 23:15:41 61
原创 Centos7安装ActiveMQ5.16.4
目录一、安装二、安装后的问题一、安装安装前保证JDK已经安装好!1、下载解压tar -zxvf apache-activemq-5.16.4-bin.tar.gz2、移动mv /apache-activemq-5.16.4 /opt/3、查看防火墙状态systemctl status firewalld4、关闭防火墙systemctl stop firewalld5、设置开机禁用防火墙systemctl disable firewalld.service
2022-03-15 23:30:14 1226
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人