Spring JPA配置文件Eclipse报错如何解决
作者:cuisuqiang 发布时间:2022-05-07 00:51:34
标签:Spring,JPA,配置,文件,Eclipse
新公司工程是用Maven管理的,技术上使用了JPA,但是我导入工程到MyEclipse时,applicationContext.xml中提示错误:
Referenced file contains errors (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"
xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
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
http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring
http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.2.xsd"
default-lazy-init="true">
来源:https://www.iteye.com/blog/cuisuqiang-2053682


猜你喜欢
- 本文实例为大家分享了C语言实现一个扫雷小游戏的具体代码,供大家参考,具体内容如下一、全部源码//棋盘大小#define ROW 9#defi
- 原理UI设计的时候一般会按照一个固定的尺寸进行设计,如 360 x 690 ,实际设备分辨率可能是 Google Pixel: 1080 x
- 以前的Android(4.1之前的版本)中,SDcard路径通过“/sdcard”或者“/mnt/sdcard”来表示,而在JellyBea
- Java基础 Servlet * 详解 1 概念:Servlet * ,用来监听web容器的一些对象状态的变化,主要是Servle
- 之前学完了Java SE的知识,掌握了面向对象的编程思想,但对集合、多线程、反射、流的使用等内容理解的还不是很深入,打算再学习数据结构与算法
- 使用方法 首先在Github或者Gitee上面新建一个仓库复制仓库的链接用idea在本地新建一个demo项目点击菜单栏的VCS,按
- 微信朋友圈上面的图片封面,QQ空间说说上面的图片封面都有下拉反弹的效果,这些都是使用滚动条实现的。下拉,当松开时候,反弹至原来的位置。下拉时
- 本文实例讲述了Struts2+Hibernate实现数据分页的方法。分享给大家供大家参考,具体如下:1.用Hibernate实现分页技术:/
- —学习并使用mybatis-plus的一些高级功能的用法例如: AR模式、 乐观锁 、逻辑删除 、自动填充、数据保护等功能为了方便演示,咱们
- 概述在平时开发过程中经常会碰到需要使用圆角button的情况,一般也会包括很多其他小功能,比如要在里面添加img,设置不同的圆角大小等。针对
- 目前经常出现的时间有三个:本地时间(locale time)格林威治时间(Greenwich Mean Time GMT)时间协调时间 (U
- 判断JSONObject是否存在某个KeyJSONObject jsonObj = new JSONObject();jsonObj.put
- 目录Java8新特性重复注解与类型注解一、JDK5中的注解1.注解(@)2.作用3.如何理解注解?4.关于注解5.注解分为三个阶段6.注解的
- 在Google发布了support:design:23+以后我们发现有这么一个东西TextInputLayout,先看下效果图:<an
- 在派生类中对基类成员访问应该是唯一的,但是在多继承时,可能会导致对基类某成员访问出现不一致的情况,这就是C++多继承中的二义性。有两种继承的
- 对列表进行排序也是我们经常遇到的问题,这里缩小一下范围,使用map来对列表排序。相信大家都有过TreeMap排序的经历,不过Map.Entr
- 需求:将 一个容器List<Bean> 按照一定的字段进行分组,分组过后的值为特定的BEAN 里面的属性例如:假定有这样一个Be
- 由C#转入Java一段时间了,总结下个人认为的Java同C#语法之间的不同之处,有不同意见之处还望各位海涵 刚学Java时觉得语法同C#大致
- 2017年一直以来在公司负责爬虫项目相关工程,主要业务有预定、库存、在开发中也遇到很多问题,随手记录一下,后续会持续更新。chrome、fi
- 本文实例讲述了C#使用iTextSharp设置PDF所有页面背景图功能的方法。分享给大家供大家参考。具体如下:在生成PDF 的时候,虽然可以