zoukankan      html  css  js  c++  java
  • xml文件中配置JDBC源遇到问题 : The reference to entity "characterEncoding" must end with the ';' delimiter

      

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

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

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

      

     <dataSource type="POOLED">  
                    <property name="driver" value="com.mysql.jdbc.Driver"/>
                    <property name="url" value="jdbc:mysql://localhost:3306/solr_db?useUnicode=true&characterEncoding=utf-8"/>
                    <property name="username" value="root"/>  
                    <property name="password" value="xx@"/>  
                </dataSource>  

    正确的如下:

     <dataSource type="POOLED">  
                    <property name="driver" value="com.mysql.jdbc.Driver"/>
                    <property name="url" value="jdbc:mysql://localhost:3306/solr_db?useUnicode=true&amp;characterEncoding=utf-8"/>
                    <property name="username" value="root"/>  
                    <property name="password" value="xx"/>  
                </dataSource>  

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

       

  • 相关阅读:
    linux Mysql 安装
    百度地图的一些操作
    Angularjs Table
    liunx安装mongodb
    ARP协议
    Python获取IP的方式与意义
    selenium 的使用--持续更
    使用pyquery
    beautiful soup的用法
    内置函数
  • 原文地址:https://www.cnblogs.com/shaosks/p/8629258.html
Copyright © 2011-2022 走看看