03 2020 档案
摘要:replace方法第一种: @Test public void test6(){ String a=null;//为空 String user=null; a.replace("",user); } 报错信息: java.lang.NullPointerException at com.mufeng
阅读全文
摘要:测试代码 @Service public class TestServiceImpl implements ITestService { @Resource private IStudentMapper studentMapper; @Autowired private IAsyncService
阅读全文
摘要:Default Settings>Editor>Code Style>Java>Imports 将Class count to use import with "*"改为99(导入同一个包的类超过这个数值自动变为 * ) 将Names count to use static import with
阅读全文
摘要:spring aop默认使用JDK还是Cglib动态代理? 一般情况:实现接口类,接口类为JDK ,实现类为Cglib动态代理 springboot2.x默认使用的代理是cglib代理 实现原理: spring.aop.proxy-target-class属性值为true 调用cglib 自动配置,
阅读全文
摘要:1.aop全称Aspect Oriented Programming 面向切面编程 2.aop应用场景 场景一: 记录日志 场景二: 监控方法运行时间 (监控性能) 场景三: 权限控制 场景四: 缓存优化 (第一次调用查询数据库,将查询结果放入内存对象, 第二次调用, 直接从内存对象返回,不需要查询
阅读全文

浙公网安备 33010602011771号