org.mybatis.generator.exception.XMLParserException: XML Parser Error on line 12: 对实体 “useUnicode” 的引用必须以 ‘;’ 分隔符结尾。
在使用mybatis逆向工程时发生这个错误,将generatorConfig.xml中的URL中的&改为&emp;,就可以正常解析了。
<!-- Mysql数据库连接的信息:驱动类、连接地址、用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/management?serverTimezone=UTC&\
rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf8&useSSL=false"
userId="****"
password="*****">
</jdbcConnection>