天天看點

Element type "import" must be followed by either attribute specifications, ">" or "/>".

在複制粘貼了網上一段代碼<import resource="classpath:META-INF/cxf/cxf.xml"/>後,出現了如下錯誤:

Element type "import" must be followed by either attribute specifications, ">" or "/>".

錯誤原因:代碼中的空格出現了問題,将代碼中的空格删除,重加後儲存,問題就解決了。如果是代碼段之間,還應檢查是不是代碼段之間的回車空格問題。