ssm整合MongoDb启动时出现无法将名称 'repository:auditing-attributes' 解析为 'attribute group' 组件异常
来源:互联网 发布:淘宝网首页登录 编辑:程序博客网 时间:2024/05/17 05:12
ssm整合MongoDb启动时出现无法将名称 ‘repository:auditing-attributes’ 解析为 ‘attribute group’ 组件异常
初始配置文件如下:
MongoDb相关的配置文件内容如下:
注意MongoDb的约束http://www.springframework.org/schema/data/repository/spring-repository-1.4.xsd , 这里使用了1.4的约束,问题就出在这,把1.4改为1.5就不会出问题了
<?xml version="1.0" encoding="utf-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:mongo="http://www.springframework.org/schema/data/mongo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/data/repository http://www.springframework.org/schema/data/repository/spring-repository-1.4.xsd "> <!--<mongo:mongo host="" port="27017"/>--> <mongo:mongo host="127.0.0.1" port="27017"/> <!--mongodb 数据库账号和密码信息 --> <bean id="userCredentials" class="org.springframework.data.authentication.UserCredentials"> <constructor-arg name="username" value="root"/> <constructor-arg name="password" value="root123"/> </bean> <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate"> <constructor-arg ref="mongo"/> <constructor-arg name="databaseName" value="test"/> <constructor-arg ref="userCredentials"/> </bean> <context:component-scan base-package="cn.hurrican.mongodbdao.*"/></beans>
修改spring-mongodb.xml配置文件
参考链接
阅读全文
0 0
- ssm整合MongoDb启动时出现无法将名称 'repository:auditing-attributes' 解析为 'attribute group' 组件异常
- spring结合mongodb报错: 无法将名称 'repository:auditing-attributes' 解析为 'attribute group' 组件
- spring结合mongodb报错: 无法将名称 'repository:auditing-attributes' 解析为 'attribute group' 组件
- src-resolve: 无法将名称 'repository:auditing-attributes' 解析为 'attribute group' 组件。
- 异常 Cannot resolve the name 'repository:auditing-attributes' to a(n) 'attribute group' component
- activiti 无法将名称 'extension' 解析为 'element declaration' 组件
- activiti src-resolve: 无法将名称 'extension' 解析为 'element declaration' 组件。
- SSM整合无法解析$解决方案
- ssm(spring+springMVC+mybatis)框架整合mongodb3.2.6提示Cannot resolve the name 'repository:auditing-attribut
- spring mongo testcase 报错 cannot resolve the name 'repository:auditing-attributes'
- ssm整合异常
- SSM框架整合异常
- 将MongoDB设置为服务随机启动
- 异常解决:Hadoop启动出现ssh无法解析主机名等错误提示
- Win7登录时,登录Administrator,出现 Group policy client 未启动,无法登陆
- 将bios还原为默认设置时无法启动windows
- wsimport命令报错:无法将名称 's:schema' 解析为 'element decla
- 出现 无法转换为内部表示 异常
- 【Linux命令】查看硬件配置命令
- 选择排序
- JavaWeb-Servlet-Reflect
- c#读取生成excel表格文件xls、xlsx格式文件
- Codeforces 315E Sereja and Subsequences【思维+Dp】
- ssm整合MongoDb启动时出现无法将名称 'repository:auditing-attributes' 解析为 'attribute group' 组件异常
- 10.5——10.26 组合数学训练
- 高并发秒杀之秒杀优化
- 加载easyui下拉框
- 安卓开发-尺寸单位+Logcat的使用+Android单元测试+安卓系统中数据的读写
- 3. Longest Substring Without Repeating Characters——LeetCode OJ
- SpringMVC源码研究之DispatcherServlet初始化
- Netty--心跳
- RxJava 1