I am using Spring3 MVC. In my controller, I have many methods such as create, edit, and search.
In my form in the view, I need a list which contains some values from db. So I add a following method
```
@ModelAttribute("types")
public Collection<BooleanValue> populateTypes() {
return typeRepository.findAll();
}
```
Then, every request will call this method first and put the 'types' object in to my model object. But for some request, such like searh or listAll. I don't want to this method be called. How can I filter some request for the method which has @ModelAttribute("types") on it?
```
@RequestMapping(value = "/search", method = RequestMethod.GET)
public String search(Model model) {
List<User> result = userService.findAll();
model.add("result");
return "index";
}
```
I don't want search
request call populateTypes
first since I don't need populateTypes
in my search
view.