gpt4 book ai didi

java - 我的应用程序正在提供 org.springframework.beans.factory.BeanCreationException

转载 作者:行者123 更新时间:2023-11-29 08:08:12 26 4
gpt4 key购买 nike

我的应用程序给出以下异常

org.springframework.beans.factory.BeanCreationException :Error creating bean with name '/userRegistration.htm' defined in ServletContext resource [/WEB-INF/dispatcher- servlet.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'successVeiw' of bean class [com.vaannila.web.UserController]: Bean property 'successVeiw' is not writable or has an invalid setter method. Did you mean '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>

最佳答案

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

Invalid property 'successVeiw'

你想要

p:successView

不是

p:successVeiw

关于java - 我的应用程序正在提供 org.springframework.beans.factory.BeanCreationException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9682454/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com