convert the servlet written by myself to spring mvc