springfox: Error when rendering recursively defined models
This error causes the stack to overflow in the ModelAttributeParameterExpander class:
I tried to fix it in my code:
if (Types.isBaseType(itemType) || itemType.getErasedType().isEnum()) { parameters.add(simpleFields(context.getParentName(), context.getDocumentationContext(), each)); } else { parameters.addAll( expand( context.childContext( nestedParentName(context.getParentName(), each.getField()), each.getFieldType(), context.getDocumentationContext()))); } }
In addition, because of the large number of my project interface, the project started very slow, compared to 2.5.0 version of a slow slow for a whole minute
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 16 (7 by maintainers)
Hello, I think I have the same problem when I use @ModelAttribute in controller …
Entities like:
Is there any solutions for this problem for now ? (except use @RequestBody instead @ModelAttribute) Or can I ignore some properties in entity ?
class A { List<B> bList; }
class B{ List<A> aList; }