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.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsdhttp://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsdhttp://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsdhttp://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsdhttp://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í)有所幫助,也希望大家多多支持好吧啦網(wǎng)。
相關(guān)文章:
1. ASP.NET Core自定義中間件的方式詳解2. 用xslt+css讓RSS顯示的跟網(wǎng)頁(yè)一樣漂亮3. 《CSS3實(shí)戰(zhàn)》筆記--漸變?cè)O(shè)計(jì)(一)4. CSS3實(shí)現(xiàn)動(dòng)態(tài)翻牌效果 仿百度貼吧3D翻牌一次動(dòng)畫特效5. 移動(dòng)端HTML5實(shí)現(xiàn)拍照功能的兩種方法6. 讓chatgpt將html中的圖片轉(zhuǎn)為base64方法示例7. 教你JS更簡(jiǎn)單的獲取表單中數(shù)據(jù)(formdata)8. html5手機(jī)觸屏touch事件介紹9. ASP.NET MVC把數(shù)據(jù)庫(kù)中枚舉項(xiàng)的數(shù)字轉(zhuǎn)換成文字10. 測(cè)試模式 - XSL教程 - 5
