Przeglądaj źródła

fix修复JSON序列化jackson

Eric 1 rok temu
rodzic
commit
86392f4387

+ 0 - 16
cooleshow-common/src/main/java/com/yonge/cooleshow/common/config/EnumConverterFactory.java

@@ -53,20 +53,4 @@ public class EnumConverterFactory implements ConverterFactory<Object, BaseEnum<?
 		return null;
 	}
 
-	/**
-	 * 根据code获取枚举
-	 * @param targetType 枚举类型
-	 * @param source code
-	 * @return 枚举
-	 * @param <T> 枚举类型
-	 */
-	public static <T extends BaseEnum<?,?>> T getEnum(Class<T> targetType, String source) {
-		for (T constant : targetType.getEnumConstants()) {
-			if (source.equals(String.valueOf(constant.getCode()))) {
-				return constant;
-			}
-		}
-		return null;
-	}
-
 }