Spring JPA配置文件Eclipse報錯如何解決
新公司工程是用Maven管理的,技術上使用了JPA,但是我導入工程到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.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'>
以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網(wǎng)。
相關文章:
1. CSS可以做的幾個令你嘆為觀止的實例分享2. vue前端RSA加密java后端解密的方法實現(xiàn)3. php使用正則驗證密碼字段的復雜強度原理詳細講解 原創(chuàng)4. JSP+Servlet實現(xiàn)文件上傳到服務器功能5. vue項目登錄成功拿到令牌跳轉失敗401無登錄信息的解決6. 基于javaweb+jsp實現(xiàn)企業(yè)財務記賬管理系統(tǒng)7. asp批量添加修改刪除操作示例代碼8. ASP動態(tài)網(wǎng)頁制作技術經(jīng)驗分享9. ASP中實現(xiàn)字符部位類似.NET里String對象的PadLeft和PadRight函數(shù)10. 淺談由position屬性引申的css進階討論

網(wǎng)公網(wǎng)安備