mirror of
				https://github.com/continew-org/continew-starter.git
				synced 2025-10-31 22:57:19 +08:00 
			
		
		
		
	fix(json/jackson): 修复 BaseEnum 反序列化数据类型仅支持数值的问题
This commit is contained in:
		| @@ -18,7 +18,6 @@ package top.continew.starter.web.autoconfigure.mvc; | ||||
|  | ||||
| import org.springframework.core.convert.converter.Converter; | ||||
| import top.continew.starter.core.enums.BaseEnum; | ||||
| import top.continew.starter.core.util.validate.ValidationUtils; | ||||
|  | ||||
| import java.util.HashMap; | ||||
| import java.util.Map; | ||||
| @@ -42,8 +41,6 @@ public class BaseEnumConverter<T extends BaseEnum> implements Converter<String, | ||||
|  | ||||
|     @Override | ||||
|     public T convert(String source) { | ||||
|         T t = enumMap.get(source); | ||||
|         ValidationUtils.throwIfNull(t, "枚举值非法:{}", source); | ||||
|         return t; | ||||
|         return enumMap.get(source); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user