---
title: "Ibatis 中文条件查询不到数据问题"
author: "mowan"
date: "2014-04-15T23:21:02Z"
tags: []
categories: ["编程语言"]
slug: "ibatis"
draft: false
lastmod: "2014-04-15T23:21:02Z"
id: 2047114
url: "https://mowan.iteye.com/blog/2047114"
---

Ibatis 中文条件查询不到数据问题

更改数据库URL地址连接，强制UTF-8编码

jdbc:mysql://localhost:3306/hammer?useUnicode=true&amp;characterEncoding=utf8

 

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

 

由于jdbc:mysql://localhost:3306/hammer?useUnicode=true&characterEncoding=utf8没有写成

jdbc:mysql://localhost:3306/hammer?useUnicode=true&amp;characterEncoding=utf8