本文共 688 字,大约阅读时间需要 2 分钟。
/** * Load a {@link ClassPathResource} qualified by the simple name of clazz, * and relative to the package for clazz. *Example: given a clazz 'com.foo.BarTests' and a resourceSuffix of 'context.xml', * this method will return a ClassPathResource representing com/foo/BarTests-context.xml *
Intended for use loading context configuration XML files within JUnit tests. */public static ClassPathResource qualifiedResource(Class
clazz, String resourceSuffix) { return new ClassPathResource(String.format("%s-%s", clazz.getSimpleName(), resourceSuffix), clazz);}
private final SetsingletonsCurrentlyInCreation = Collections.newSetFromMap(new ConcurrentHashMap<>(16));
转载地址:http://zgivi.baihongyu.com/