How to bind an object list with thymeleaf?

You need a wrapper object to hold the submited data, like this one: public class ClientForm { private ArrayList<String> clientList; public ArrayList<String> getClientList() { return clientList; } public void setClientList(ArrayList<String> clientList) { this.clientList = clientList; } } and use it as the @ModelAttribute in your processQuery method: @RequestMapping(value=”/submitQuery”, method = RequestMethod.POST) public String processQuery(@ModelAttribute ClientForm … Read more

How to avoid the “Circular view path” exception with Spring MVC test

@Controller → @RestController I had the same issue and I noticed that my controller was also annotated with @Controller. Replacing it with @RestController solved the issue. Here is the explanation from Spring Web MVC: @RestController is a composed annotation that is itself meta-annotated with @Controller and @ResponseBody indicating a controller whose every method inherits the … Read more