遇到的问题:

  1. 问题:Cannot create PoolableConnectionFactory (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.)

    解决方案:

    出现这个问题的原因是时间无法识别,只需要在连接mysql的url后添加:?serverTimezone=UTC即可

     如:jdbc:mysql://localhost:3306/test?serverTimezone=UTC  #在数据库地址后边添加

  2. 问题:发起HTTP请求调用接口,接口内容是插入数据到数据库,数据中包含中文,插入到数据库后数据变成了??

    解决方案:请求配置中添加utf-8

    image.png