zoukankan      html  css  js  c++  java
  • xml文件报错:The reference to entity "characterEncoding" must end with the ';' delimiter.

    在xml文件中的mysql链接URL报错:The reference to entity "characterEncoding" must end with the ';' delimiter.

    原因是在XML文件中,& 符号需要转义

    <jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
            connectionURL="jdbc:mysql://localhost:3306/ssm_crud??serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=false"
            userId="root"
            password="root">
    </jdbcConnection>

    正确写法是

    connectionURL="jdbc:mysql://localhost:3306/ssm_crud??serverTimezone=UTC&amp;characterEncoding=utf8&amp;useUnicode=true&amp;useSSL=false"

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

    &lt;

    <

    小于号

    &gt;

    >

    大于号

    &amp;

    &

    &apos;

    '

    单引号

    &quot;

    "

    双引号

  • 相关阅读:
    自动完成
    自动验证[2]
    自动验证[1]
    PHP算法
    用户请求服务器资源过程
    CURD 操作 [2]
    [转]PHP部分常见算法
    CURD 操作 [1]
    常用正则表达式集锦
    centos 6.4 FTP安装和配置
  • 原文地址:https://www.cnblogs.com/fangjb/p/15101227.html
Copyright © 2011-2022 走看看