数据源配置时加上编码转换格式后出问题了: 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文件中有如下几类字符要进行转义替换:
< |
< |
小于号 |
> |
> |
大于号 |
& |
& |
和 |
' |
' |
单引号 |
" |
" |
双引号 |