To convert beans into maps, it is recommended to make multiple selections using either cglib or non cglib
In EasyExcel, it relies on cglib to convert beans into maps, add elements to the map, and synchronously modify beans. I hope EasyExcel can adapt to native images. For converting beans to maps, consider adding options such as cglib or a more efficient way within Java
BeanMap beanMap = BeanMapUtils.create(oneRowData);
refer: https://github.com/alibaba/easyexcel/issues/3994
Great suggestion. Similar concerns have been brought up in the community before. I think adding this feature could benefit some developers using EasyExcel, though there may be some performance trade-offs. We'll continue to evaluate the practicality and potential impact of this feature.
之前也有过类似的问题或者建议提出来。我们会讨论这个功能的合理性和影响范围。感谢你的建议。
(1)how to check whether it is native-image,can refer this: https://github.com/apache/dubbo/blob/3.3/dubbo-common/src/main/java/org/apache/dubbo/common/aot/NativeDetector.java
https://github.com/apache/dubbo/blob/3.3/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/aot/AotWithSpringDetector.java
(2)adapter:
if (AotWithSpringDetector.isAotProcessing()) {
//cglib
}else{
//non cglib
}