11 2020 档案
摘要:1. maven配置 <!--H2数据库--> <!-- https://mvnrepository.com/artifact/com.h2database/h2 --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</a
阅读全文
摘要:synchronized原理剖析 1、使用方式1.1 修饰实例方法&方法块实例对象1.2 修饰静态方法&方法块实例对象1.3 修饰静态方法&方法块类 2、实现方式2.1 同步方法2.2 同步代码块 3、底层原理3.1 对象头3.2 Monitor Object设计模式3.3 管程机制 4、锁优化4.
阅读全文
摘要:package com.github.java.learning.spring; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; imp
阅读全文
摘要:ThreadLocal原理剖析 1、基础概念Stack & HeapThreadLocalThreadLocalMapEntry 2、源码核心方法解析get()源码setInitialValue()源码get()方法时序图set()源码remove()源码remove()方法时序图 3、核心算法哈希
阅读全文
摘要:1、JIT编译器相关VM参数 -server 服务端模式 -Xint 解释器执行 -Xcomp 编译器执行 -Xmixed 混合模式 -XX:+TieredCompilation 打开多级编译策略(JDK1.8是默认开启的,如果关闭则 -XX:-TieredCompilation) -XX:Comp
阅读全文