The reference to entity "characterEncoding" must end with the ';' delimiter.
来源:互联网 发布:皮皮麻将算法 编辑:程序博客网 时间:2024/05/29 03:46
Java 解析XML文件错误。
错误信息提示代码类似如下:
The reference to entity "characterEncoding" must end with the ';' delimiter.
org.xml.sax.SAXParseException: The reference to entity "characterEncoding" must end with the ';' delimiter.
或
ontext initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreEx
纠错结果:
我在配置一个访问数据库的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中一些特殊符号的编码转换:
< < 小于号
> > 大于号
& & and字符
' ' 单引号
" " 双引号
- 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
- 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.
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter.
- iOS xcode 9 注释快捷键
- python 3 爬取百度图片
- Github简单操作详解——初识Git
- 九度OJ题目1053:互换最大最小数
- rapidjson组装map和数组array的代码示例
- The reference to entity "characterEncoding" must end with the ';' delimiter.
- The C Programming Language 练习题2-5
- IA-32指令类型
- ActionContext和ServletActionContext
- 自然语言识别(1)--利用bosonNLP分析歌词感情
- 201710020117->unity中monosingleton
- Olympic Parade UVALive
- Python中解决Gensim找不到模块的问题
- C++继承