例子来源于Java并发编程实战,5.6 构建高效且可伸缩的结果缓存。
1 | public class Memoizer<A, V> implements Computable<A, V> { |
例子来源于Java并发编程实战,5.6 构建高效且可伸缩的结果缓存。
1 | public class Memoizer<A, V> implements Computable<A, V> { |
1 | public class PrintTest { |
1 |
|
源码:httpcomponents-core-4.4.13,org.apache.http.pool.AbstractConnPool
1 | public abstract class AbstractConnPool<T, C, E extends PoolEntry<T, C>> |
The core of Maven 3 uses Aether for dependency resolution. Aether employs a different approach to calculate the transitive dependencies and is meant to fix some of the trickier (conflict) resolution issues within Maven 2.x.
In practice, this change can result in different class paths especially for projects with big/complex dependency graphs. For instance, projects that erroneously have conflicting dependencies on their classpath might encounter build issues depending on the classpath order. See JETTY-1257 for a concrete example of this issue.
当进行模块重构和重组时,需要查看当前模块间的依赖关系。以下说明了两个常用的方式。
https://www.jetbrains.com/help/idea/project-module-dependencies-diagram.html
https://stackoverflow.com/a/54514457
mvn clean install
[INFO] Total time: 01:05 h
1)通过DefaultModelBuilder#build
生成当前pom的Model,也就是effective pom
。
2)递归解析(深度遍历)effective pom
的child dependency,生成effective pom
。
maven使用Plexus容器(一种IOC容器)进行MOJO等管理,apache-maven/src/bin/m2.conf里声明了其主类org.apache.maven.cli.MavenCli:
1 | main is org.apache.maven.cli.MavenCli from plexus.core |
https://maven.apache.org/ref/3.8.4/index.html
箭头表示模块的依赖关系,箭尾模块依赖箭头模块。
1)POM的直接依赖,后声明的依赖有效
1 |
|
前段时间webmethod应用所在物理机磁盘满了,于是清理其日志。但是有个通过Log4j2记录的日志文件在执行cat /dev/null | tee *.log
后大小又瞬间恢复到原来尺寸。当时感觉应该应该是使用Appender导致的,但时苦于没有找到log4j2.xml配置也就搁置了。
今日在测试环境帮研发定位问题时,查看日志,发现异常信息丢失,如下:
1 | 2021-12-16 14:05:27[ http-nio-8082-exec-10:519172801 ] - [WARN ] com.xxx.xxx.XxxFilter-doFilter:107 - 解析Tenant出错, 错误信息:Request processing failed; nested exception is java.lang.NullPointerException |