首页 新闻 会员 周边 捐助

list注入遇到的问题

0
悬赏园豆:10 [已解决问题] 解决于 2019-08-06 17:50

这是什么造成的?截取了部分保存的代码
1 警告: Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#0': Cannot create inner bean 'cn.sxt.interceptor.LoginInterceptor#0' of type [cn.sxt.interceptor.LoginInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cn.sxt.interceptor.LoginInterceptor#0' defined in class path resource [mvc.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'allowedPass' of bean class [cn.sxt.interceptor.LoginInterceptor]: Bean property 'allowedPass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
2 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cn.sxt.interceptor.LoginInterceptor#0' defined in class path resource [mvc.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'allowedPass' of bean class [cn.sxt.interceptor.LoginInterceptor]: Bean property 'allowedPass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
3 Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'allowedPass' of bean class [cn.sxt.interceptor.LoginInterceptor]: Bean property 'allowedPass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
4 严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#0': Cannot create inner bean 'cn.sxt.interceptor.LoginInterceptor#0' of type [cn.sxt.interceptor.LoginInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cn.sxt.interceptor.LoginInterceptor#0' defined in class path resource [mvc.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'allowedPass' of bean class [cn.sxt.interceptor.LoginInterceptor]: Bean property 'allowedPass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
5 严重: StandardWrapper.Throwable
6 严重: Servlet /login threw load() exception

键盘小侠的主页 键盘小侠 | 初学一级 | 园豆:175
提问于:2019-08-06 02:27
< >
分享
最佳答案
0

Bean property 'allowedPass' is not writable or has an invalid setter method
这个提示,估计属性没有set方法吧

收获园豆:10
2012 | 高人七级 |园豆:21645 | 2019-08-06 08:04
其他回答(1)
0
Bean property 'allowedPass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

bean属性“allowedpass”不可写或具有无效的setter方法。setter的参数类型是否与getter的返回类型匹配?

小光 | 园豆:1766 (小虾三级) | 2019-08-06 09:14
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册