Spring JPA配置文件Eclipse報錯如何解決
新公司工程是用Maven管理的,技術(shù)上使用了JPA,但是我導(dǎo)入工程到MyEclipse時,applicationContext.xml中提示錯誤:
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
于是對配置文件少做修改,不報錯,可以運行,修改后的配置文件頭如下:
<?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)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- eclipse+maven+spring mvc項目基本搭建過程
- eclipse springboot工程打war包方法及再Tomcat中運行的方法
- myeclipse安裝Spring Tool Suite(STS)插件的方法步驟
- 關(guān)于eclipse安裝spring插件報錯An error occurred while collecting items to be installed...解決方案
- 在Eclipse安裝Spring boot插件的步驟(圖文)
- eclipse怎么引入spring boot項目插件的方法
- 只需兩步實現(xiàn)Eclipse+Maven快速構(gòu)建第一個Spring Boot項目
- eclipse下配置Spring環(huán)境的方法步驟
- MyEclipse2017創(chuàng)建Spring項目的方法
- 詳解eclipse下創(chuàng)建第一個spring boot項目
相關(guān)文章
Java判斷object對象為空(包括null ,““)的方法
這篇文章主要介紹了Java判斷對象是否為空(包括null ,“”)的方法,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-12-12
Spring Boot中使用RabbitMQ 生產(chǎn)消息和消費消息的實例代碼
本文介紹了在SpringBoot中如何使用RabbitMQ進行消息的生產(chǎn)和消費,詳細闡述了RabbitMQ中交換機的作用和類型,包括直連交換機、主題交換機、扇出交換機和頭交換機,并解釋了各自的消息路由機制,感興趣的朋友一起看看吧2024-10-10
實戰(zhàn)分布式醫(yī)療掛號系統(tǒng)之整合Swagger2到通用模塊
這篇文章主要為大家介紹了實戰(zhàn)分布式醫(yī)療掛號系統(tǒng)之整合Swagger2到通用模塊,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2022-04-04
SpringBoot如何使用RequestBodyAdvice進行統(tǒng)一參數(shù)處理
這篇文章主要介紹了SpringBoot使用RequestBodyAdvice進行統(tǒng)一參數(shù)處理方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2021-06-06
idea創(chuàng)建javaweb原生項目的實現(xiàn)示例
這篇文章主要介紹了idea創(chuàng)建javaweb原生項目的實現(xiàn)示例,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-09-09

