Spring JPA配置文件Eclipse報(bào)錯(cuò)如何解決
新公司工程是用Maven管理的,技術(shù)上使用了JPA,但是我導(dǎo)入工程到MyEclipse時(shí),applicationContext.xml中提示錯(cuò)誤:
Referenced file contains errors (http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd)
網(wǎng)上說需要用到:
http://www.springframework.org/schema/data/repository/spring-repository.xsd
于是對(duì)配置文件少做修改,不報(bào)錯(cuò),可以運(yùn)行,修改后的配置文件頭如下:
<?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">
以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- eclipse+maven+spring mvc項(xiàng)目基本搭建過程
- eclipse springboot工程打war包方法及再Tomcat中運(yùn)行的方法
- myeclipse安裝Spring Tool Suite(STS)插件的方法步驟
- 關(guān)于eclipse安裝spring插件報(bào)錯(cuò)An error occurred while collecting items to be installed...解決方案
- 在Eclipse安裝Spring boot插件的步驟(圖文)
- eclipse怎么引入spring boot項(xiàng)目插件的方法
- 只需兩步實(shí)現(xiàn)Eclipse+Maven快速構(gòu)建第一個(gè)Spring Boot項(xiàng)目
- eclipse下配置Spring環(huán)境的方法步驟
- MyEclipse2017創(chuàng)建Spring項(xiàng)目的方法
- 詳解eclipse下創(chuàng)建第一個(gè)spring boot項(xiàng)目
相關(guān)文章
在deepin上如何使用Fleet開發(fā)SpringBoot?3.0.0項(xiàng)目
這篇文章主要介紹了在deepin上使用Fleet開發(fā)SpringBoot?3.0.0項(xiàng)目的過程,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2023-09-098個(gè)簡單部分開啟Java語言學(xué)習(xí)之路 附j(luò)ava學(xué)習(xí)書單
8個(gè)簡單部分開啟Java語言學(xué)習(xí)之路,附j(luò)ava學(xué)習(xí)書單,這篇文章主要向大家介紹了學(xué)習(xí)java語言的方向,感興趣的小伙伴們可以參考一下2016-09-09如何在 Java 中利用 redis 實(shí)現(xiàn) LBS 服務(wù)
基于位置的服務(wù),是指通過電信移動(dòng)運(yùn)營商的無線電通訊網(wǎng)絡(luò)或外部定位方式,獲取移動(dòng)終端用戶的位置信息,在GIS平臺(tái)的支持下,為用戶提供相應(yīng)服務(wù)的一種增值業(yè)務(wù)。下面我們來一起學(xué)習(xí)一下吧2019-06-06SpringCloud項(xiàng)目中Feign組件添加請(qǐng)求頭所遇到的坑及解決
這篇文章主要介紹了SpringCloud項(xiàng)目中Feign組件添加請(qǐng)求頭所遇到的坑及解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-04-04Springboot編寫CRUD時(shí)訪問對(duì)應(yīng)數(shù)據(jù)函數(shù)返回null的問題及解決方法
我在學(xué)習(xí)springboot,其中在編寫CRUD時(shí)發(fā)現(xiàn)訪問數(shù)據(jù)的函數(shù)執(zhí)行下去返回值是null但是其它部分正常,這篇文章主要介紹了Springboot在編寫CRUD時(shí),訪問對(duì)應(yīng)數(shù)據(jù)函數(shù)返回null,需要的朋友可以參考下2024-02-02java 較大數(shù)據(jù)量取差集,list.removeAll性能優(yōu)化詳解
這篇文章主要介紹了java 較大數(shù)據(jù)量取差集,list.removeAll性能優(yōu)化詳解,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2020-09-09