對實體 "characterEncoding" 的引用必須以 ';' 分隔符結尾及常見的轉義字符

今天在springmvc集成mybatis時,遇到一個錯誤 "characterEncoding" 的引用必須以 ';' 分隔符結尾。spring

這是「&」定義與解析的緣由,須要對&進行轉義。mybatis

&轉義爲&mvc

如:?useUnicode=true&autoReconnect=true&rewriteBatchedStatements=TRUEcode

需改成:?useUnicode=true&autoReconnect=true&rewriteBatchedStatements=TRUEit

附:常見的XML轉義字符coding

如下是XML中須要的轉義字符:
&(邏輯與)  &        
<(小於)    &lt;        
>(大於)    &gt;        
"(雙引號)  &quot;      
'(單引號)  &apos; 
引用

相關文章
相關標籤/搜索