1. 程式人生 > >Spring配置檔案中屬性值不能提示的解決辦法(eclipse新增xsd檔案)

Spring配置檔案中屬性值不能提示的解決辦法(eclipse新增xsd檔案)

原因:eclipse中沒有配置xsd檔案

解決辦法:

  • 步驟一:把標頭檔案拷貝到你的spring配置檔案中。
<?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:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx" 
    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
    http://www.springframework.org/schema/context 
    http://www.springframework.org/schema/context/spring-context-3.0.xsd
    http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/jdbc 
    http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
    http://www.springframework.org/schema/tx 
    http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
    http://www.springframework.org/schema/aop 
    http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
</beans>
  • 步驟二:根據標頭檔案中的連結點選去下載spring對應版本的.xsd檔案下載到本地
  • 步驟三:下載好後,新增到eclipse中
  1. 在eclipse選單中進入Windows 》 prefemces 》XML 》XML Catalog 》Add 》FileSystem 然後選擇剛才下載的.xsd檔案
  2. location:比如d:\spring-beans-2.5.xsd
  3. key type:選擇Schema Location
  4. 重啟eclipse。

相關推薦

Spring配置檔案屬性不能提示解決辦法(eclipse新增xsd檔案)

原因:eclipse中沒有配置xsd檔案解決辦法:步驟一:把標頭檔案拷貝到你的spring配置檔案中。<?xml version="1.0" encoding="UTF-8"?> <b

百度度地圖總是提示key 驗證出錯! 請在 AndroidManifest.xml 檔案檢查 key 設定解決辦法

呼叫百度度地圖總是提示key 驗證出錯! 請在 AndroidManifest.xml 檔案中檢查 key 設定 logcat提示如下 01-06 10:08:37.886: E/baidumapsdk(12351): Authentication Error error

C#:讀取html模板檔案,並替換修改檔案指定,儲存為修改後的檔案

1.準備html模板檔案:Pages/Device/DeviceModel8.html   2 using System.IO:讀取檔案內容,並替換指定內容                  &nbs

利用FTPClient上傳的檔案中文名字亂碼解決辦法

新增下面這一段: if (FTPReply.isPositiveCompletion(ftpClient.sendCommand( "OPTS UTF8", "ON"))) {// 開啟伺服器對UTF-8的支援,如果伺服器支援就用UTF-8編碼,否則就使用本地編碼(GBK)

**執行緒裡面使用註解(執行緒裡面spring使用註解無法注入解決辦法)**

今天在使用SSM框架(spring/springmvc/mybatis)進行開發時,自己也是第一次使用,所以遇到的問題也比較多啊········· 我今天是在一條執行緒裡面使用註解時,發現一直報空指標異常,仔細看了一下發現使用註解時並沒有注入值,所以才一直空指

struts2改spring boot過程一些問題及解決辦法記錄

1、引入依賴包的問題 一般情況下,常用的jar包在maven倉庫都可以找到,並能知道如何在pom.xml檔案中配置,但是有時候需要在一些專案中使用一些我們自己寫的程式碼生成的jar包,要引入maven中就需要做一些必要的處理。 我們專案中就有這樣的情況存在,

myeclipse 在專案上報錯在檔案不報錯 解決辦法

借下網友的問題啊: myeclipse中,專案上有個叉報錯,但是檔案中一個叉都沒有,我的專案檔案中一個錯都沒有,為什麼專案的圖示上有個紅叉,我是把專案提交到svn上的,沒有錯,一點改動都沒有,前些日子

git配置過程出現錯誤的解決辦法

git push origin master出現如下錯誤: Counting objects: 3, done. Writing objects: 100% (3/3), 226 bytes, done. Total 3 (delta 0), reused 0 (del

讀取properties配置檔案屬性的工具類

自制讀取properties配置檔案的工具類 專案中常用的一些配置的維護,例如redis的ip,資料庫ip這些一點是用檔案維護起來,方便專案開發時進行除錯,為了方便以後使用,就直接封裝了一個工具類以便使用,程式碼如下: /** * 讀取properties配置檔案中屬性的值的工

Spring動態獲取配置檔案(properties, 或者yml)

平時我們都習慣用@Value("${"XXXX"}")註解標註在成員變數上來獲取,但是如果說沒有配置則連繫統都啟動不了 所以我寫了一個工具類可以在程式執行期間動態獲取配置檔案中的值: 直接上工具類: package com.zz.amqp1.utils; import

Spring獲取配置檔案的一種方式

1、載入配置檔案 <context:property-placeholder location="classpath:resource/*.properties"> 2、在程式中 @Value("${FTP_ADDRESS}") private String FTP_ADDRESS; 

spring引入properties檔案,並在controller等層獲得引入檔案屬性

引入配置檔案方法一: 用context:property-placeholder引入配置檔案 <!-- 配置由spring讀取jdbc的屬性檔案 --> <context:property-placeholder location="classpath:

springMvc 之 【javaBean讀取屬性配置檔案】---註解方式

如果在javaBean中讀取屬性配置檔案中的值呢?方法如下: 1、屬性配置檔案【application.properties】中的部分鍵值對如下: # qidao FTP config qidaoFTPHost=10.10.6.12 qidaoFTPPort=21 qid

Java檔案有關錯誤提示解決方法

1.用eclipse執行Java檔案報錯Error occurred during initialization of boot layer   2.編譯時遇到  Resource leak: 'input' is never closed 3.在編譯Ja

Mybatis學習總結三之簡化sql對映xml檔案的引用及解決欄位名與實體類屬性名不相同的衝突

一、為實體類定義別名,簡化sql對映xml檔案中的引用 我們在sql對映xml檔案中的引用實體類時,需要寫上實體類的全類名(包名+類名),如下:parameterType="com.aiit.pojo.User"這裡寫的實體類User的全類名com.aiit.pojo.User, <i

SpringBoot配置檔案獲取

     在spring框架裡面對一些系統配置或者常量配置必須要在名字為application檔案裡配置 ,檔案型別可以為字尾為.properties或者.yml形式.      其實無論是properties檔案還是yml檔案,他們的本質是相同的,即都是鍵值對,只不過寫法

springBoot屬性檔案獲取

1、使用springBoot中自帶的屬性檔案application.properties datasource.driverName=com.mysql.jdbc.Driver datasource.url=jdbc:mysql://localhost:3306

Spring配置事務的 transactionAttributes 各屬性含義及XML配置

                transactionAttributes 屬性:PROPAGATION事務傳播行為型別說明PROPAGATION_REQUIRED如果當前沒有事務,就新建一個事務,如果已經存在一個事務中,加入到這個事務中。這是最常見的選擇。PROPAGATION_SUPPORTS支援當前事務

如何解決XML檔案的警告提示“No grammar constraints (DTD or XML Schema) referenced in the document.”

方法一:常用方法   關閉XML驗證 工具欄:windows => preferences => xml => xml files => validation => Indicate when no grammar is specifi

mapper.xml檔案標籤沒有提示解決

1、首先我們來看看mapper.xml的標頭檔案 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.