java.lang.IllegalArgumentException: Cannot convert value of type [com.lopu.framework.modules.maintain.action.BeltAction] to required type [com.lopu.framework.modules.maintain.bean.Belt] for property 'btBean': no matching editors or conversion strategy found
引起的原因是我在action中起的属性名字btBean和在Spring中的配置文件中applicationContext起的bean的id一样。我又在action中对btBean写了get,set方法.所以spring就想当然的帮我注入这个bean,但这个bean我设置的是实体类,而spring的配置文件写的是action,所以报错啦。
本文详细解析了在Spring框架中由于Bean ID与Action属性名相同导致的IllegalArgumentException异常,并提供了具体的解决办法。
920

被折叠的 条评论
为什么被折叠?



