Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

枚举类型映射失败 #34

Open
PrimaryKey3610 opened this issue Feb 21, 2019 · 2 comments
Open

枚举类型映射失败 #34

PrimaryKey3610 opened this issue Feb 21, 2019 · 2 comments

Comments

@PrimaryKey3610
Copy link

好像不支持字段是枚举类型的属性.

@Crab2died
Copy link
Owner

支持的,你能说下具体的是什么样的情况下不支持吗?

@PrimaryKey3610
Copy link
Author

实体类如下
@DaTa
public class ExcelModel {

@ExcelField(title = "序列号")
private String serialNum;

@ExcelField(title = "数据类型")
private DataSourceEnum state;

}
枚举类如下
public enum DataSourceEnum {
Y("激活", 1),

N("未激活", 2);

}
这时excel写入
序列号 数据类型
1 Y
2 N

这样的excel时, 就会读取失败

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants