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)上說(shuō)需要用到:
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">
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- eclipse+maven+spring mvc項(xiàng)目基本搭建過(guò)程
- 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)文章
詳解如何Java中實(shí)現(xiàn)Excel的注釋和批注
注釋及批注是?Excel?中比較常用的功能,這篇文章主要為大家詳細(xì)介紹了如何在Java中實(shí)現(xiàn)Excel的注釋和批注,感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下2023-12-12
Java判斷object對(duì)象為空(包括null ,““)的方法
這篇文章主要介紹了Java判斷對(duì)象是否為空(包括null ,“”)的方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2023-12-12
Android中Socket通信的實(shí)現(xiàn)方法概述
這篇文章主要介紹了Android中Socket通信的實(shí)現(xiàn)方法,很有實(shí)用價(jià)值,需要的朋友可以參考下2014-08-08
java常用工具類(lèi)之Excel操作類(lèi)及依賴(lài)包下載
這篇文章主要介紹了java常用工具類(lèi)Excel操作類(lèi)及依賴(lài)包下載,需要的朋友可以參考下2014-07-07
Java基礎(chǔ)之顏色工具類(lèi)(超詳細(xì)注釋)
這篇文章主要介紹了Java基礎(chǔ)之顏色工具類(lèi)(超詳細(xì)注釋?zhuān)?文中有非常詳細(xì)的代碼示例,對(duì)正在學(xué)習(xí)java基礎(chǔ)的小伙伴們有非常好的幫助,需要的朋友可以參考下2021-04-04
Spring Boot中使用RabbitMQ 生產(chǎn)消息和消費(fèi)消息的實(shí)例代碼
本文介紹了在SpringBoot中如何使用RabbitMQ進(jìn)行消息的生產(chǎn)和消費(fèi),詳細(xì)闡述了RabbitMQ中交換機(jī)的作用和類(lèi)型,包括直連交換機(jī)、主題交換機(jī)、扇出交換機(jī)和頭交換機(jī),并解釋了各自的消息路由機(jī)制,感興趣的朋友一起看看吧2024-10-10
實(shí)戰(zhàn)分布式醫(yī)療掛號(hào)系統(tǒng)之整合Swagger2到通用模塊
這篇文章主要為大家介紹了實(shí)戰(zhàn)分布式醫(yī)療掛號(hào)系統(tǒng)之整合Swagger2到通用模塊,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-04-04
SpringBoot如何使用RequestBodyAdvice進(jìn)行統(tǒng)一參數(shù)處理
這篇文章主要介紹了SpringBoot使用RequestBodyAdvice進(jìn)行統(tǒng)一參數(shù)處理方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2021-06-06
idea創(chuàng)建javaweb原生項(xiàng)目的實(shí)現(xiàn)示例
這篇文章主要介紹了idea創(chuàng)建javaweb原生項(xiàng)目的實(shí)現(xiàn)示例,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-09-09
Java靜態(tài)方法和實(shí)例方法區(qū)別詳解
這篇文章主要為大家詳細(xì)介紹了Java靜態(tài)方法和實(shí)例方法的區(qū)別,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-12-12

