2023年8月17日
摘要: 死锁 public class DeadLockDemo { private static Object resource1 = new Object();//资源 1 private static Object resource2 = new Object();//资源 2 public stat 阅读全文
posted @ 2023-08-17 16:28 bofeng 阅读(8) 评论(0) 推荐(0) 编辑
  2021年3月24日
摘要: 一、常用命令 ● 获取当前命名空间下的容器 kubectl get po ● 查看某命名空间下的容器 kubectl get pods --namespace=development ● 获取所有容器列表 kubectl get all ● 创建容器 kubectl create -f kubern 阅读全文
posted @ 2021-03-24 15:19 bofeng 阅读(191) 评论(0) 推荐(0) 编辑
  2021年3月11日
摘要: 一、单机版快速入门(Master和Node在同一台机器) 1.安装etcd和kubernetes软件 yum install -y etcd kubernetes 2.启动服务 systemctl start etcd systemctl start docker systemctl start k 阅读全文
posted @ 2021-03-11 10:29 bofeng 阅读(375) 评论(0) 推荐(0) 编辑
  2021年3月9日
摘要: 准备: <dependency> <groupId>us.codecraft</groupId> <artifactId>webmagic-core</artifactId> <version>0.7.3</version> </dependency> <dependency> <groupId>u 阅读全文
posted @ 2021-03-09 14:44 bofeng 阅读(224) 评论(0) 推荐(0) 编辑
  2021年3月5日
摘要: 准备:引入netty依赖 <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.8.Final</version> </dependency> 入门案例: 1.服务端业务处理类 阅读全文
posted @ 2021-03-05 17:59 bofeng 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 一、NIO 同步非阻塞IO 案例1:实现服务器端和客户端之间的数据通信(非阻塞) 1.nio网络服务端程序,能不断接受客户端连接并读取客户端发来的数据 package com.tenpower.nio.socket; import java.net.InetSocketAddress; import 阅读全文
posted @ 2021-03-05 14:56 bofeng 阅读(141) 评论(0) 推荐(0) 编辑
  2020年9月28日
摘要: 一、慢日志相关命令 1.查看数据库版本 select @@version 2.查看全局变量 show variables like 'slow_query_log' 3.1开启慢日志查询 set global slow_query_log=ON 3.2未使用索引的查询也记录到慢查询日志 set gl 阅读全文
posted @ 2020-09-28 14:28 bofeng 阅读(107) 评论(0) 推荐(0) 编辑
  2020年9月25日
摘要: 一、配置tomcat用户 1.修改tomcat配置文件 vim conf/tomcat-user.xml 2.写入如下内容 <role rolename="manager"/> <role rolename="manager-gui"/> <role rolename="admin"/> <role 阅读全文
posted @ 2020-09-25 10:39 bofeng 阅读(176) 评论(0) 推荐(0) 编辑
  2020年9月18日
摘要: 1.设置堆内存的初始大小512m,设置堆内存最大大小2048m java -Xms512m -Xmx2048m TestJVM 2.-XX参数 1)禁用手动GC操作 java -XX:+DisableExplicitGC TestJVM 2)设置老年代和新生代的比值 java -XX:NewRati 阅读全文
posted @ 2020-09-18 10:49 bofeng 阅读(140) 评论(0) 推荐(0) 编辑
  2020年4月27日
摘要: 一、以war包部署springboot项目 1.修改pom.xml打包方式为war 2.启动类继承SpringBootServletInitializer 二、springboot整合log4j2 1.common/pom.xml <dependency> <groupId>org.slf4j</g 阅读全文
posted @ 2020-04-27 14:12 bofeng 阅读(200) 评论(0) 推荐(0) 编辑