Spring 配置 Spring JPA 发生错误的解决方法
今天在项目的applicationContext.xml中配JPA时
<?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:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd"
default-lazy-init="true">
</beans>
Eclipse提示:
Referenced file contains errors (http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd).
google 之,发现 http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd 需要使用到 http://www.springframework.org/schema/data/repository/spring-repository.xsd
将配置文件修改为:
<?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:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
http://www.springframework.org/schema/data/repository
http://www.springframework.org/schema/data/repository/spring-repository-1.5.xsd
"
default-lazy-init="true"> </beans>
OK!错误提示消失!
Spring 配置 Spring JPA 发生错误的解决方法的更多相关文章
- ASP.NET MVC 3 loginUrl自动变成Account/Login,并且发生404错误的解决方法
http://www.cnblogs.com/think8848/archive/2011/07/08/2100814.html ASP.NET MVC 3 loginUrl自动变成Account/L ...
- Eclipse启动时发生An internal error occurred during: "Initializing Java Tooling".错误的解决方法
问题描述: Eclipse启动时发生An internal error occurred during: "Initializing JavaTooling".错误的解决方法 解决 ...
- 在VMware 虚拟机中配置 windows2003系统的NLB负载均衡;0x800706D5错误的解决方法;没有接口可用于安装新的群集
首先在VM里面 我装了3个2003的系统, 分别为 webservice01 ,webservice 02 , 以及 webview 这3台. 前面两台用于配置负载均衡,后面的webview就是 ...
- log4j中Spring控制台输出Debug级信息过多解决方法
log4j中Spring控制台输出Debug级信息过多解决方法 >>>>>>>>>>>>>>>>> ...
- eclipse spring boot 项目出现java.lang.ClassCastException 解决方法
问题 eclipse spring boot 项目出现java.lang.ClassCastException 解决方法: 重新生成项目
- Ubuntu下Linux配置内核各种常见错误和解决办法
镜像下载.域名解析.时间同步请点击阿里云开源镜像站 这篇把Ubuntu下Linux配置内核各种常见错误和解决办法给大家讲解一下,希望可以帮助到大家. 一.Ubuntu系统中缺少各种依赖包导致的问题 1 ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!&&在eclipse.ini中为eclipse指定jdk启动
参考:http://blog.csdn.net/zyz511919766/article/details/7442633 http://blog.sina.com.cn/s/blog_028f0c1c ...
- 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!
启动 Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误的解决方法 http://blog.csdn.net/z ...
- [转]权限问题导致Nginx 403 Forbidden错误的解决方法
权限问题导致Nginx 403 Forbidden错误的解决方法 投稿:junjie 字体:[增加 减小] 类型:转载 时间:2014-08-22 这篇文章主要介绍了权限问题导致Nginx 403 F ...
随机推荐
- 限制scrollView的上下移动
只要把scrollView.contentSize 中的hight高设为0,就不会上下移动了.如果不想水平移动,就把宽设0.
- oracle、mysql新增字段,字段存在则不处理
oracle: 表名:CHANNEL_TRADE_DETAIL列名:exchange_code declare v_rowcount integer; begin select count(*) in ...
- ueditor使用canvas在图片上传前进行压缩
之前就看到H5使用canvas就可以在前端使用JS压缩图片,这次接到任务要把这个功能嵌入到ueditor里面去,以节省流量,减轻服务器压力. H5使用canvas进行压缩的代码有很多,核心原理就是创建 ...
- ROS下创建第一个节点工程
1.创建工作区 mkdir catkin_ws cd catkin_ws mkdir src 2.在src目录下创建包Myrobot,后面所跟roscpp rospy为依赖包 catkin_creat ...
- Texture Filter中的Bilinear、Trilinear以及Anistropic Filtering
1. 为什么在纹理采样时需要texture filter(纹理过滤)?我们的纹理是要贴到三维图形表面的,而三维图形上的pixel中心和纹理上的texel中心并不一至(pixel不一定对应texture ...
- ubuntu 下搭建nginx
1.安装nginx sudo apt-get install nginx 2.nginx 的启动和关闭启动 nginx:# nginx -c /etc/nginx/nginx.conf 3.关闭 ng ...
- [Docker] docker 基础学习笔记2(共6篇)
febootstrap 是一个自制image的一个第三方的工具,好像他们现在都要用这个. 安装还是挺方便的. yum -y install febootstrap febootstrap -i ...
- 运行WPS遇到的问题及解决办法
http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Class/cases/find_the_bugs.php# For this case we are goin ...
- SQL Server 导出数据到 PostgreSQL
乘着倒数据这会儿,把方法记录一下 需求:因为数据迁移,需要将SQL Server 2012中的数据库导入到PostgreSQL 数据库中 思路:创建一个空的数据库,便于导入数据.下载PostgreSQ ...
- 第三方登录 QQ 错误码100044(提示 该应用非官方正版应用)
当你碰到这个问题的时候,不要着急,你的功能已经走通了,代码没有问题. 100044 原因: 1.首先确定你的包名和签名,跟申请第三方平台的是一个.(真心吐槽一下,接盘侠不好当,尤其是没有交接的) 2. ...