How to get the list of all attributes of a Java object using BeanUtils introspection?

前端 未结 3 2198
陌清茗
陌清茗 2020-12-06 05:41

I have method which gets a POJO as it\'s parameter. Now I want to programmatically get all the attributes of the POJO (because my code may not know what are all the attribut

3条回答
  •  春和景丽
    2020-12-06 06:22

    get all properties/variables ( just the name ) using reflection. Now use getProperty method to get the value of that variable

提交回复
热议问题