通配符的匹配很全面, 但無法找到元素 'xxxxxxxx'


首先,一般配置通配符之前,你都會有如下xml頭吧

<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:tx="http://www.springframework.org/schema/tx" 
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
            http://www.springframework.org/schema/context 
            http://www.springframework.org/schema/context/spring-context-2.5.xsd 
            http://www.springframework.org/schema/tx 
            http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

每當你添加了一個新的命名空間的時候(IDEA你自己手動加的話)

xmlns:tx="http://www.springframework.org/schema/tx" 

你還需要記得加入

http://www.springframework.org/schema/tx 
            http://www.springframework.org/schema/tx/spring-tx-3.0.xsd

到xsi:schemaLocation=“     ”中。

 

據說IDEA你自己在下面用明明空間+“:”會自動幫你導入哦!!!!!(我為什么這么晚才發現,蠢哭)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM