这个是什么错?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TmNewsAction' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.skeyedu.entity.TmNews] to required type [com.skeyedu.action.teacher.news.TmNewsAction] for property 'tmNews'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.skeyedu.entity.TmNews] to required type [com.skeyedu.action.teacher.news.TmNewsAction] for property 'tmNews': no matching editors or conversion strategy found
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.skeyedu.entity.TmNews] to required type [com.skeyedu.action.teacher.news.TmNewsAction] for property 'tmNews'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.skeyedu.entity.TmNews] to required type [com.skeyedu.action.teacher.news.TmNewsAction] for property 'tmNews': no matching editors or conversion strategy found
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [com.skeyedu.entity.TmNews] to required type [com.skeyedu.action.teacher.news.TmNewsAction] for property 'tmNews': no matching editors or conversion strategy found --------------------编程问答-------------------- ssh搭建了一个框架,框架可运行无错,但是写了一条新闻添加的内容就报这个错。 --------------------编程问答-------------------- 你看看'TmNewsAction' 这个bean里的成员属性,是不是也有对应的bean,其类型是否匹配(注意引入包路径)? --------------------编程问答-------------------- Cannot convert value of type [com.skeyedu.entity.TmNews] to required type [com.skeyedu.action.teacher.news.TmNewsAction] for property 'tmNews'
貌似com.skeyedu.action.teacher.news.TmNewsAction 中tmNews属性注入有问题,检查一下配置TmNewsAction 这个action的配置。
补充:Java , Java EE