refactor for springmvc