首先,一般配置通配符之前,你都會有如下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你自己在下面用明明空間+“:”會自動幫你導入哦!!!!!(我為什么這么晚才發現,蠢哭)