我的申请出现以下异常


  org.springframework.beans.factory.BeanCreationException:在ServletContext资源[/WEB-INF/dispatcher-servlet.xml]中定义的名称为'/userRegistration.htm'的bean创建时出错:设置属性值时出错;嵌套的异常是org.springframework.beans.NotWritablePropertyException:Bean类[com.vaannila.web.UserController]的无效属性'successVeiw':Bean属性'successVeiw'不可写或具有无效的setter方法。您是说“ successView”吗?


这是我的dispatcher-servlet.xml文件

 <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans                    http://www.springframework.org/schema/beans/spring-beans.xsd">

   <bean id="viewResolver"

   class="org.springframework.web.servlet.view.InternalResourceViewResolver"

    p:prefix="/WEB-INF/JSPs/" p:suffix=".jsp" />

   <bean id="userService" class="com.vaannila.service.UserServiceImpl"/>

   <bean name="/userRegistration.htm" class="com.vaannila.web.UserController"
    p:userService-ref="userService"
    p:formView="userForm"
    p:successVeiw="userSuccess"/>
   </beans>

最佳答案

这是一个错字。该异常告诉您出了什么问题:


  无效的属性“ successVeiw”


你要

p:successView




p:successVeiw

10-07 16:08