2022年2月24日

摘要: git config --global user.name "wdy" 配置用户名 git config --global user.email "1373822758@qq.com" 配置邮箱 ssh-keygen -t rsa -C "1373822758@qq.com" 生成公钥和私钥 按3次 阅读全文
posted @ 2022-02-24 15:30 搬砖小将 阅读(937) 评论(0) 推荐(0) 编辑
 
摘要: 来查看可用版本 sudo docker search mysql 拉取mysql镜像 docker pull mysql:5.7 mkdir -p /data/docker/mysql/conf && mkdir -p /data/docker/mysql/data service docker r 阅读全文
posted @ 2022-02-24 15:17 搬砖小将 阅读(27) 评论(0) 推荐(0) 编辑
 
摘要: docker 安装redis 1、获取 redis 镜像 docker pull redis 2、查看本地镜像 docker images 3、从官网获取 redis.conf 配置文件 cd /usr/local/docker //进入目录 wget http://download.redis.i 阅读全文
posted @ 2022-02-24 15:16 搬砖小将 阅读(1101) 评论(0) 推荐(0) 编辑
 
摘要: docker常用命令 查看docker版本 docker version 显示docker系统的信息 docker info 检索image docker search image_name 下载image docker pull image_name 列出镜像列表 docker images 删除 阅读全文
posted @ 2022-02-24 14:35 搬砖小将 阅读(25) 评论(0) 推荐(0) 编辑

2022年2月23日

摘要: MYSQL中replace into的用法 做项目是遇到这样一个问题,把查询出的数据插入到一个新表里面,第一次可以直接插入,但是第二次第三次的时候如果直接更新,但是会有些新的数据需要添加,但是如果先删除再插入的话效率不高,如果对比两端的数据,相同的更新,没有的插入,这杨效率也不高,就是有些数据是更新 阅读全文
posted @ 2022-02-23 18:29 搬砖小将 阅读(124) 评论(0) 推荐(0) 编辑

2022年2月22日

摘要: https://upload-images.jianshu.io/upload_images/2062729-9a78f7ea7671a031.png 1.实例数据:存放类的属性数据信息,包括父类的属性信息; 2.对齐填充:由于虚拟机要求 对象起始地址必须是8字节的整数倍。填充数据不是必须存在的,仅 阅读全文
posted @ 2022-02-22 17:55 搬砖小将 阅读(27) 评论(0) 推荐(0) 编辑
 
摘要: Synchronized总共有三种用法: 当synchronized作用在实例方法时,监视器锁(monitor)便是对象实例(this); 当synchronized作用在静态方法时,监视器锁(monitor)便是对象的Class实例,因为Class数据存在于永久代,因此静态方法锁相当于该类的一个全 阅读全文
posted @ 2022-02-22 17:42 搬砖小将 阅读(131) 评论(0) 推荐(0) 编辑
 
摘要: 1.尽量踩聚簇索引,减少回表的可能。 2.在where和order by 列上加索引 3.减少where 字段值null判断 SELECT * FROM m_user where type = null 改为: SELECT * FROM m_user where type = 0 4.应尽量避免在 阅读全文
posted @ 2022-02-22 16:50 搬砖小将 阅读(105) 评论(0) 推荐(0) 编辑
 
摘要: 1.减少锁的持有时间(具体到方法) 2.减小锁的粒度 将大对象,拆成小对象,大大增加并行度,降低锁竞争. 如此一来偏向锁,轻量级锁成功率提高. 使用ReadWriteLock就可以做到读写分离,比如ConcurrentHashMap中使用的锁分离 3. 锁粗化:多个同步块合并,减少对锁的请求和释放 阅读全文
posted @ 2022-02-22 15:33 搬砖小将 阅读(69) 评论(0) 推荐(0) 编辑
 
摘要: 一、概念: 多个进程在运行过程中因争夺资源而造成的一种僵局,当进程处于这种僵持状态时,若无外力作用,它们都将无法再向前推进 https://img-blog.csdn.net/20180922173936964?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV 阅读全文
posted @ 2022-02-22 13:45 搬砖小将 阅读(52) 评论(0) 推荐(0) 编辑