The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method...

开发中,总有一下奇奇怪怪的问题

完整的错误就不贴了,异常提示:

hibernate.xml] is invalid; nested exception is org.xml.sax.SAXParseException: 
The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)". org.xml.sax.SAXParseException:
The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)".

简单来说,就是你的配置文件中有问题,具体什么问题,得直接一个一个排除。

可能性排除:

1、标签没有闭合

##检查标签,最好按照格式把标签都规范好。

2、账号或者秘钥错误

##确认连接数据库的账号、密码、库、ip、驱动都正确(总一下你想象不到的情况)

3、数据源ID配置没有对应上(可能比较大)

##确认你的dataSource和sessionFactory配置的对应上

4、标签写法不规范(可能性为0.1)

<ref local="sessionFactory"/> 都换成 <ref bean="sessionFactory"/>

spring-4.*不支持local了。

 

转载于:https://www.cnblogs.com/learcher/p/8941504.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值