我想使用 mapstruct 将 String 转换为 enum
enum TestEnum {
NO("no");
String code;
TestEnum(String code) {
this.code = code
}
public String getCode() {
return code;
}
}
Run Code Online (Sandbox Code Playgroud)
我有一个从服务中获得的代码,我想将此代码转换为 Enum 如何通过 mapstruct 以更简单的方式执行此操作