spring bootcall different controller methods with same endpoint for a request based on condition code example
Example: spring controller method to run before every call
@ModelAttribute("foo")
public Foo foo() {
return new Foo();
}
@ModelAttribute("foo")
public Foo foo() {
return new Foo();
}