1.org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’ defined in file [G:\ClassDemo\IDEA_WorkSpace\Maven\itheima_parent\springmvc_ssm_03\target\classes\spring\applicationContext_dao.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type ‘java.lang.String’ to required type
找不到创建 sqlSessionfactory的对象
出错的地方:
改后:
junit 测试成功,但tomcat启动失败
最新推荐文章于 2022-08-31 11:16:22 发布
本文详细解析了在Spring MVC与SSM框架整合过程中遇到的BeanCreationException异常,具体表现为在applicationContext_dao.xml文件中定义的'sessionFactory'bean初始化失败,深层次原因在于类型不匹配错误,即无法将String类型的属性值转换为所需类型。
摘要由CSDN通过智能技术生成