1. Class cls = Class.forName("com.chinaap.ttcp.v2.form.data.QueryBillDetailListData");
    2. Field[] fields = cls.getDeclaredFields();
    3. if(fields.length > 0 ){
    4. for (Field field : fields) {
    5. field.setAccessible(true);
    6. /*获取swagger注释中文*/
    7. ApiModelProperty apiModel = field.getAnnotation(ApiModelProperty.class);
    8. bodyField.put(field.getName(), apiModel.value());
    9. // field.getType().getName();
    10. }
    11. }

    bean
    image.png