您的位置:首页 > Web前端

The reference to entity "characterEncoding" must end with the ';' delimiter

2011-05-14 09:51 489 查看
Caused by: org.xml.sax.SAXParseException: The reference to entity "characterEncoding" must end with the ';' delimiter.

JPA persistence xml 中报错的写法:

<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8" />

正确的写法:

<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8" />

在xml文件中有以下几类字符要进行转义替换:

<

<

小于号

>

>

大于号

&

&



'

'

单引号

"

"

双引号

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐