- 博客(11)
- 收藏
- 关注
原创 Spring源码解读之AbstractApplicationContext
【代码】Spring源码解读之AbstractApplicationContext
2024-03-28 16:16:32 262
原创 Spring源码解读之GenericApplicationContext
【代码】Spring源码解读之GenericApplicationContext
2024-03-28 14:03:10 342
原创 解决No spring.config.import property has been defined问题
原因 :SpringCloud 2020.* 版本把bootstrap禁用了,导致在读取文件的时候读取不到而报空指针,所以我们只要把spring-cloud-starter-bootstrap导入进来就会生效了。解决No spring.config.import property has been defined问题。
2024-03-11 19:34:01 443
原创 Spring源码解读之DefaultSingletonBeanRegistry
【代码】Spring源码解读之DefaultSingletonBeanRegistry。
2021-11-15 15:01:42 176
原创 Unsafe源码解析(未完待续)
/* * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Gen
2021-10-21 23:52:42 195
原创 HashMap源码解析
package java.util;import java.io.IOException;import java.io.InvalidObjectException;import java.io.Serializable;import java.lang.reflect.ParameterizedType;import java.lang.reflect.Type;import java.util.function.BiConsumer;import java.util.function.B
2021-10-10 21:03:06 193
原创 使用Stream流创建斐波那契数列
方法一:使用Stream.iterate()方法生成//斐波那契数列 Stream.iterate(new int[]{0, 1}, t -> new int[]{t[1], t[0] + t[1]}) .limit(20) .map(t -> t[0]) .forEach(System.out::println);*在java9中iterate(
2021-09-23 19:19:56 214
翻译 谈谈java.lang包
对JVM平台来说,java.lang包中的类至关重要,因为这个包中的很多类我们都经常用到,如:Object类(java.lang.Object);String类(java.lang.String);基本数据类型包装类(java.lang包中的Integer、Long、Short、Char、Float和Double);异常和错误(java.lang.Exception和java.lang.Error)。下图是这些类之间的层级关系:Object类java.lang包中的Object类是其他所
2021-08-04 20:08:59 1074
原创 Spring Boot使用@ConfigurationProperties踩过的坑
使用@ConfigurationProperties(prefix = " ")批量注入时提示spring boot configuration annotation processor not configured解决方案maven工程在pom.xml文件中引入坐标<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor --><
2021-08-02 00:17:40 273
原创 谈谈Java中遍历Map集合的几种方式
Java中遍历Map集合有很多种方法,从最开始的iterator,到Java5的For-Each,再到Java8中的Lambda。 下面,让我们一起使用具体的代码来实现以及对各自的优缺点进行分析:方法一:使用Iterator进行遍历 Map<String, Object> map = new HashMap<>(); //获取EntrySet() Set<Map.Entry<Stri...
2021-07-29 15:39:10 262
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人