feilong-core 1.9.2 发布了,feilong-core 是一个让开发更简便的Java 开发工具包。 简介:目标:Reduce development, Release ideas 可以帮助你的代码更简短精炼,使它易写、易读、易于维护。 提高工作效率,让你从大量重复的底层代码中脱身。
使用feilong-core的理由:一图概述:
Maven使用配置feilong-core jar你可以直接在 仓库 浏览 如果你使用 maven, 您可以通过以下方式来配置 pom.xml: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | < project >
....
< properties >
< version.feilong-platform >1.9.2</ version.feilong-platform >
....
</ properties >
....
< repositories >
< repository >
< id >feilong-repository</ id >
< url >https://raw.github.com/venusdrogon/feilong-platform/repository</ url >
</ repository >
</ repositories >
....
< dependencies >
....
< dependency >
< groupId >com.feilong.platform</ groupId >
< artifactId >feilong-core</ artifactId >
< version >${version.feilong-platform}</ version >
</ dependency >
....
</ dependencies >
....
</ project >
|
detail see in 1.9.2 milestone 特性ConvertUtil add Map<I, J> toMap(Map<K, V> inputMap,final Transformer<K,I> keyTransformer, final Transformer<V, J> valueTransformer) fix #497 ConvertUtil add Map<I, J> toMap(Map<K, V> inputMap,final Class<I> keyTargetType,final Class<J> valueTargetType) fix #497 add SimpleClassTransformer
示例: if you have a map that is Map<String, String>,want to change to Map<Integer, Integer> you can use: 1 2 3 4 5 6 7 | Map<String, String> map = toMap( "1" , "2" );
Map<Integer, Integer> returnMap = toMap(map, Integer. class , Integer. class );
for (Map.Entry<Integer, Integer> entry : returnMap.entrySet()){
Integer key = entry.getKey();
Integer value = entry.getValue();
LOGGER.debug( "key:[{}],value:[{}]" , key, value);
}
|
output : key:[1],value:[2] 更新FieldUtil T getFieldValue(Object obj,String fieldName) update to private, fix #493,fix #494 ClassLoaderUtil update ClassLoaderUtil.getResourceInAllClassLoader(String, Class<?>) log level, fix #476
移除ConstructorUtil remove T newInstance(String className,Object...parameterValues) fix #486 ClassLoaderUtil remove getRootClassPath(ClassLoader classLoader) method fix #477
Bug 修复List<Field> getAllFieldList(final Class<?> klass,String...excludeFieldNames) if klass is null, expect NPE,but IllegalArgumentException fix #495 update JsonUtil Map<String, T> toMap(String json,Class<T> rootClass) error javadoc fix #466 JsonUtil.toMap(String, Class<T>, Map<String, Class<?>>) return type change LinkedHashMapinstead of HashMap, fix #464
下载 |