數據源配置時加上編碼轉換格式後出問題了: mysql
The reference to entity "characterEncoding" must end with the ';' delimiter sql
這個錯誤就是 context.xml中設置數據源連接URL的問題 編碼
<context-param> url
<param-name>url</param-name> spa
<param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&characterEncoding=UTF-8</param-value> code
</context-param> xml
正確的以下: ci
<context-param> it
<param-name>url</param-name> table
<param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&characterEncoding=UTF-8</param-value>
</context-param>
這大概是由xml文件中的編碼規則決定要這麼變換。
在xml文件中有如下幾類字符要進行轉義替換:
< |
< |
小於號 |
> |
> |
大於號 |
& |
& |
和 |
' |
' |
單引號 |
" |
" |
雙引號 |