org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
### The error may exist in mapper/db_userMapper.xml
### The error may involve UseInterface.findUserListByUserCode
### The error occurred while executing a query
### Cause: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
解决方案:
mybatis-config.xml文件中的
<property name="url" value="jdbc:mysql://localhost:3306/db"/> 改为: <property name="url" value="jdbc:mysql://localhost:3306/db?serverTimezone=UTC"/> 运行成功
附:mybatis-config.xml文件maven项目中一般会放置在main-->resources-->mybatis-config.xml