MySQL模糊查询,查询语句是对的。但是就是没有查询结果

问题


解决

当我用其他非中文的值去查询,发现可以查询到结果

所以问题就出现在数据库的配置中

spring.datasource.url=jdbc:mysql://localhost:3306/database?serverTimezone=GMT%2B8

修改成

spring.datasource.url=jdbc:mysql://localhost:3306/guli?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&useSSL=true
原文地址:https://www.cnblogs.com/10134dz/p/13780522.html