You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When Lombok is combined with easyexcel, reading Excel files and reflecting them into entities are all null
To Reproduce
The entity class attributes I defined are named after humps. When I use easyexcel to implement the write operation, I find that all the data written are null values, but the get and set methods generated by me can be written to the file normally. @Data public class DataDemo { @ExcelProperty("一级分类") private String oName; @ExcelProperty("二级分类") private String tName; }
Expected behavior
If I use Lombok's @ Data annotation, this is how it works
dataDemo.setOName("dd");
dataDemo.setTName("dd");
But if I use the generated set method, the use is like this
dataDemo.setoame("dd");
dataDemo.settame("dd");
I think it is caused by the difference between the set method generated by @ Data annotation and the method approved by easyexcel Version info (please complete the following information):
1.18.12
jdk8
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I think that the problem here is that there are competing "standards" on how to generate getter and setter names in this corner case. See #757 for more details. To solve this one you can either rename your fields or write the required getters by hand.
Describe the bug
When Lombok is combined with easyexcel, reading Excel files and reflecting them into entities are all null
To Reproduce
The entity class attributes I defined are named after humps. When I use easyexcel to implement the write operation, I find that all the data written are null values, but the get and set methods generated by me can be written to the file normally.
@Data public class DataDemo { @ExcelProperty("一级分类") private String oName; @ExcelProperty("二级分类") private String tName; }
Expected behavior
If I use Lombok's @ Data annotation, this is how it works
dataDemo.setOName("dd");
dataDemo.setTName("dd");
But if I use the generated set method, the use is like this
dataDemo.setoame("dd");
dataDemo.settame("dd");
I think it is caused by the difference between the set method generated by @ Data annotation and the method approved by easyexcel
Version info (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: