The reference to entity "characterEncoding" must end with the ';' delimiter.
2017-05-22 16:42
495 查看
在配置一个访问数据库的Url时,第一次设置的内容如下:
jdbc:mysql://localhost:3306/photo?useUnicode=true&characterEncoding=UTF-8,注意中间那个“&”,在xml中这个是读不出的哦,那么应该怎么改呢?我采取了一个折衷的方法,不过真的可以了:
jdbc:mysql://localhost:3306/photo?useUnicode=true&characterEncoding=UTF-8
分析:
有时候在使用xml作为配置文件的时候,应该要使用xml的编码规则来进行适当的设置。
下面给出xml中一些特殊符号的编码转换:
jdbc:mysql://localhost:3306/photo?useUnicode=true&characterEncoding=UTF-8,注意中间那个“&”,在xml中这个是读不出的哦,那么应该怎么改呢?我采取了一个折衷的方法,不过真的可以了:
jdbc:mysql://localhost:3306/photo?useUnicode=true&characterEncoding=UTF-8
分析:
有时候在使用xml作为配置文件的时候,应该要使用xml的编码规则来进行适当的设置。
下面给出xml中一些特殊符号的编码转换:
< | < | 小于号 |
> | > | 大于号 |
& | & | and字符 |
' | ' | 单引号 |
" | " | 双引号 |
相关文章推荐
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- java报错:The reference to entity "characterEncoding" must end with the ';' delimiter.
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter. Nested exception: The r
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter.
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- dom4j:The reference to entity "characterEncoding" must end with the ';' delimiter
- 【url】The reference to entity "characterEncoding" must end with the ';' delimiter
- 配置JNDI 报错 The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- 关于The reference to entity "characterEncoding" must end with the ';' delimiter. org.xml.sax.SAXParseE
- java报错:The reference to entity "characterEncoding" must end with the ';' delimiter.