我的配置文件:
*.servlet.xml
Xml代码  收藏代码    <bean id="beanNameUrlMapping"  
            class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" lazy-init="default" autowire="default" dependency-check="default">  
            <property name="order">  
                <value>1</value>  
            </property>  
            <property name="interceptors">  
                <list>  
                    <ref bean="openSessionInViewInterceptor" />  
                </list>  
            </property>  
        </bean>  
          
        <bean id="methodResolver" class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">  
            <property name="paramName">  
                <value>action</value>  
            </property>  
        </bean>  
Xml代码  收藏代码    <bean name="/mgraccount.do" class="com.jd.mysql.mgr.controller.account.AccountController">  
            <property name="mgrAccountService">  
                <ref bean="mgrAccountService"/>  
            </property>  
            <property name="methodResolver">  
                <ref bean="methodResolver"/>  
            </property>  
        </bean>  
Java代码  收藏代码    public class AccountController extends MultiActionController {  
          
        public IMgrAccountService mgrAccountService;  
        public MethodNameResolver methodResolver;  
          
        public void setMgrAccountService(IMgrAccountService mgrAccountService) {  
            this.mgrAccountService = mgrAccountService;  
        }  
          
        public void setMethodResolver(MethodNameResolver methodResolver) {  
            this.methodResolver = methodResolver;  
        }  
      
        /** 
         * Add  
         * @param request 
         * @param response 
         * @return 
         * @throws Exception 
         */  
        public ModelAndView addAccount(HttpServletRequest request,HttpServletResponse response) throws Exception {  
            String username = request.getParameter("username");  
            String password = request.getParameter("password");  
            String passwordAgain = request.getParameter("passwordAgain");  
            if(!password.equals(passwordAgain)){  
                request.setAttribute("msg", "Different passwords!");  
                return new ModelAndView("error");  
            }  
            if(StringUtil.isNull(username)){  
                request.setAttribute("msg", "Username is null,please input legal username");  
                return new ModelAndView("error");  
            }  
            if(StringUtil.isNull(password)){  
                request.setAttribute("msg", "Password is null,please input legal password");  
                return new ModelAndView("error");  
            }  
            if(StringUtil.isNull(passwordAgain)){  
                request.setAttribute("msg", "The second password is null,please input legal password again");  
                return new ModelAndView("error");  
            }  
            MgrAccount mgraccountOld = mgrAccountService.findMgrAccountByUserName(username);  
            if(mgraccountOld!=null){  
                request.setAttribute("msg", "Replicate username,change a special one just for you!");  
                return new ModelAndView("error");  
            }  
            MgrAccount mgraccount = new MgrAccount();  
            String passwordMd5 = MD5Util.getMD5(password);  
            mgraccount.setPassword(passwordMd5);  
            mgraccount.setUsername(username);  
            mgrAccountService.addAccount(mgraccount);  
            return new ModelAndView("accountList", "Add account success!", "addAccount");  
        }  
    }  
当我访问http://localhost:8080/project/mgraccount.do?action=addAccount的时候,提示找不到方法 <No request handling method with name 'mgraccount' in class [com.jd.mysql.mgr.controller.account.AccountController]>