I suggest to apply MVVC pattern to separate your bussinessbusiness object from your view object.
You expect to receive only strings from the view in your model attribute object.
Your entity object contains a list of tags and a list of answers => they are modeled differently and the usage of the same class is difficult, with many potential bugs.
In your case it is better to create.a separate view class only with strings and convert them to your entity object. Example
Example :
public class QuestionModelAttribute { private String tags; private String answers; ..... } and your method will receive:
@PostMapping("/questions/new") public String processQuestion(@Valid @ModelAttribute("question") QuestionModelAttribute questionModelAttribute, BindingResult result) { Questions question = questionsService.convertQuestion(questionModelAttribute); questionService.save(question); .. } Your view will receive in the model a QuestionModelAttribute
<form:form action="/questions/new" method="post" modelAttribute="questionModelAttribute"> This pattern offers a healthy decoupling between the view and model.