数据源配置时加上编码转换格式后出问题了:

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

这个错误就是 context.xml中设置数据源链接URL的问题

<context-param>

<param-name>url</param-name>

<param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&characterEncoding=UTF-8</param-value>

</context-param>

正确的如下:

<context-param>

<param-name>url</param-name>

<param-value>jdbc:mysql://localhost:3306/bookstore?useUnicode=true&amp;characterEncoding=UTF-8</param-value>

</context-param>

这大概是由xml文件中的编码规则决定要这么变换。

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

&lt;

<

小于号

&gt;

>

大于号

&amp;

&

&apos;

'

单引号

&quot;

"

双引号

The reference to entity "characterEncoding" must end with the ';' delimiter (Mybatis + Mysql)的更多相关文章

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

    数据源配置时加上编码转换格式后出问题了: The reference to entity "characterEncoding" must end with the ';' del ...

  2. xml文件中配置JDBC源遇到问题 : The reference to entity "characterEncoding" must end with the ';' delimiter

    数据源配置时加上编码转换格式后出问题了: The reference to entity"characterEncoding" must end with the ';' deli ...

  3. java报错:The reference to entity "characterEncoding" must end with the ';' delimiter.

    java关于报错:The reference to entity "characterEncoding" must end with the ';' delimiter. Java ...

  4. 在java的xml文件配置数据库URL地址时提示The reference to entity "characterEncoding" must end with the ';' delimiter.错误信息

    配置数据库的URL<property name="url" value="jdbc:mysql://127.0.0.1:3306/micro_message&quo ...

  5. Caused by: org.xml.sax.SAXParseException: The reference to entity "characterEncoding" must end with the ';' delimiter.

    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Sourc ...

  6. 配置c3p0-config.xml数据库连接池,jdbcurl配置项报错Type The reference to entity "useUnicode" must end with the ';' delimiter.

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xml> <c3p0-confi ...

  7. 项目配置 xml文件时 报错提示(The reference to entity "useSSL" must end with the ';' delimiter.)

    这次在配置xml文件时,出现错误提示( The reference to entity “useSSL” must end with the ‘;’ delimiter.) 报错行为 <prop ...

  8. 在配置XML时报的The reference to entity "dataSource" must end with the ';' delimiter错误

    <?xml version="1.0" encoding="UTF-8"?> <ECharts> <element>http ...

  9. XML报错:The reference to entity "characterEncoding" must end with the ';' delimite

    解决方法: 在web.xml增加如下配置: <filter>  <filter-name>encodingFilter</filter-name>  <fil ...

随机推荐

  1. stixel-world和psmnet结合出现的问题

    float32位,4字节 原本的stixel-world是用sgbm生成深度图,并且转成了float型 psmnet保存最终的disparity图是保存成uint16的,skimage.io.imsa ...

  2. lca(最近公共祖先(在线)) 倍增法详解

    转自大佬博客 : https://blog.csdn.net/lw277232240/article/details/72870644 描述:倍增法用于很多算法当中,通过字面意思来理解 LCA是啥呢 ...

  3. 酷炫的3D照片墙

    今天给大家分享的案例是酷炫的3D照片墙 这个案例主要是通过 CSS3 和原生的 JS 来实现的,接下来我给大家分享一下这个效果实现的过程.博客上不知道怎么放本地视频,所以只能放两张效果截图了. 1.实 ...

  4. Codevs1033 蚯蚓的游戏

    题目描述 Description 在一块梯形田地上,一群蚯蚓在做收集食物游戏.蚯蚓们把梯形田地上的食物堆积整理如下: a(1,1)  a(1,2)…a(1,m) a(2,1)  a(2,2)  a(2 ...

  5. Mac brew 安装amp环境

    |首先加入Homebrew官方的几个软件源 $ brew tap homebrew/dupes $ brew tap homebrew/versions $ brew tap homebrew/php ...

  6. 实验二 JSP基本动态元素的使用

    实验二  JSP基本动态元素的使用 实验性质:验证性          实验学时:  2学时      实验地点: 一 .实验目的与要求 1.掌握JSP中声明变量.定义方法.java程序片及表达式的使 ...

  7. day 37 MySQL行(记录)的详细操作

    MySQL行(记录)的详细操作   阅读目录 一 介绍 二 插入数据INSERT 三 更新数据UPDATE 四 删除数据DELETE 五 查询数据SELECT 六 权限管理 一 介绍 MySQL数据操 ...

  8. eclipse使用技巧的网站收集——转载(三)

    本文来自:https://www.cnblogs.com/jeffen/p/5965227.html,未经更改,尊重作者 工欲善其事,必先利其器.对于程序员来说,Eclipse便是其中的一个“器”.本 ...

  9. 做ios工程时,把UI从xib移动到代码中遇到的问题

    由于四期要做多语言版本,带xib页面的工程做多语言版本比较麻烦,再加上现在已经习惯了代码中的viewdidload函数中初始化控件,所以就把两个页面从xib移到代码中去了. 在修改后加载页面会遇到ba ...

  10. Pond Cascade Gym - 101670B 贪心+数学

    题目:题目链接 思路:题目让求最下面池子满的时间和所有池子满的时间,首先我们考虑所有池子满的时间,我们从上到下考虑,因为某些池子满了之后溢出只能往下溢水,考虑当前池子如果注满时间最长,那么从第一个池子 ...