1. 程式人生 > >配置beans.xml報錯

配置beans.xml報錯

報錯內容如下:

Multiple annotations found at this line:
    - cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. One of '{"http://xmlns.jcp.org/xml/ns/javaee":interceptors, "http://xmlns.jcp.org/
     xml/ns/javaee":decorators, "http://xmlns.jcp.org/xml/ns/javaee":alternatives, "http://xmlns.jcp.org/xml/ns/javaee":scan, "http://xmlns.jcp.org/xml/ns/javaee":trim}' is 

解決方法:

<?xml version="1.0"?>
<beans bean-discovery-mode="annotated" version="2.0"
 xmlns="http://xmlns.jcp.org/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" />
將 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 中的www刪除,然後儲存就可以了

最後說一句,這個錯真的是奇葩,找好久,還以為是dtd的問題。。。

相關推薦

配置beans.xml

報錯內容如下: Multiple annotations found at this line:     - cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. On

Maven的配置檔案pom.xml:ArtifactTransferException: Failure to transfer javax.xml.stream:stax-api:jar

報錯資訊: ArtifactTransferException: Failure to transfer javax.xml.stream:stax-api:jar:1.0-2 from http:

fastJson與springmvc結合,在spring-mvc.xml中的配置,解決415

<!-- 會自動註冊了validator ConversionService --> <mvc:annotation-driven> <!--enableMatrixVariables="true">-->

IDEA 匯入或新建maven專案 web.xml配置檔案路徑,配置檔案找不到

某次碰到一個很奇怪的問題,本來專案沒問題的,重新匯入到Idea執行時就跑不起來了。 跑專案時,報如下錯誤: 看報錯好像是log4j2的配置檔案找不到 不可能呀,上次還跑得好好的,檔案也都在。 於是我進入web.xml看看: 怎麼配置檔案都報紅了

配置xml:URI is not registered ( Setting | Project Settings | Schemas and DTDs )

gis setting project png gist XML ngs info schema 報紅提示:URI is not registered ( Setting | Project Settings | Schemas and DTDs ) 解決方法:打開Sch

Spring的配置檔案xml中報xml檔案Referenced file contains errors (http://www.springframework.org/schema/cont

今天開啟我的ssh專案,突然Spring的xml配置檔案中報錯: Referenced file contains errors (http://www.springframework.org/s

待解決Maven_pom.xml

XML maven構建項目 maven構建 itl pan 構建項目 構建 tag spa maven構建項目時,pom.xml文件<version>${shiro.version}</version>報錯,將內容換為具體的版本號就消失了待解決Mav

菜鳥調(四)——Spring與DWR集成,配置文件

microsoft his www data editors bing ces myeclipse java 背景簡單介紹:該項目是市信用辦的一個系統,之前好像是一個石家莊的公司負責的。我屬於是半路接手。拿到源代碼後。依據他們給的簡(shao)單(de)明(ke)了(l

Spring,SpringMVC,Mybatis等配置文件解決(Referenced file contains errors)

info ems art valid mes ont conf window 程序   今天自己搭建了ssm框架,頭文件什麽的都是拷貝的筆記的,本來不會出錯。可是偏偏報錯(如下): Referenced file contains errors (http://www.i

pom.xml:web.xml is missing and <failOnMissingWebXml> is set to true

-i 成了 tro pom inf esc 方法 target targe 出現這個錯誤的原因是Maven不支持缺少web.xml的web項目 解決方法 添加Web模塊,對項目右鍵->Java EE Tools->Generate Deployment

SSM 整合 ehcache spring 配置文件

報錯 ehcache ati bat pre xsd 添加 ext con 添加 <!-- end MyBatis使用ehcache緩存 --> <cache:annotation-driven cache-manager="cacheMana

Springboot項目中Pom.xml

xml報錯 pen https idea ID 怎麽 分享 import 項目 摘要:使用idea,兩次在maven上浪費時間,第一次不知道怎麽就解決了,第二次記錄一下解決辦法 情況說明:界面如下圖,pom.xml中存在多個jar,報錯,依賴沒有找到,檢查maven模型以解

【監控】Jprofiler監控tomcat的配置方法及解決過程

could CA 監聽端口 arch https img .net http 沒有 準備工作: 1.Jprofiler for Linux安裝包一個(服務端) 2.Jprofiler for windows安裝包一個(客戶端) 3.各自安裝、解壓 Linux:/opt/jp

maven web項目的web.xmlThe markup in the document following the root element must be well-formed.

utf-8 style sta 元素 nbsp 地形 很好 ati instance maven項目裏面的web.xml開頭約束是這樣的 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi=

maven的pom.xml

info 版本 XML 創建 .com 可能 mage align prope 新創建maven就報錯,剪切後就好了,一會又報錯 可能maven版本過低 添加一下配置 <properties> //加入以下配置就不會報錯 <maven-jar-

Maven 搭建SSM pom.xml注意項

1. 找不到mapper對映檔案異常:Invalid bound statement (not found)       eg:    Invalid bound statement (not found): cn.wz.ssm.m

java selenium 讀取配置檔案,中文亂碼

參考引自:https://blog.csdn.net/qq_27093465/article/details/70765870 根據自己問題解決: package com.property; import java.io.BufferedInputStream; import java.i

使用@Value讀取yml配置檔案編譯

直接上編譯時發生的錯誤 Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spr

Maven pom.xml Cannot create resource output directory

maven 執行clean package 命令時報錯:Cannot create resource output directory: D:\test\****\target\classes 後來去資料夾下試著手動刪除,確實是提示刪除不了需要管理員許可權,因此有很多程式設計師就去以管理員許可權

maven專案中的pom.xml Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMapping" is not available.

專案是springboot專案,jdk為1.8版本. 今天開啟myeclipse,開啟該專案發現pom.xml檔案中的<packaging/>標籤這報錯:  Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMappi