Microsoft JDBC Driver 的主页为:https://msdn.microsoft.com/en-us/data/aa937724.aspx 下载所需驱动 今天连接时报了四次错,记录下来 1.java.sql.SQLException: The server time zone value xxx异常解决方法 使用mybatis连接mysql8.0社区版时出现了这个异常信息,因为mysql默认的时区和本地时区不一致导致的 连接mysql时指定时区为UTC
2.Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 处理:提示信息表明数据库驱动com.mysql.jdbc.Driver’已经被弃用了、应当使用新的驱动com.mysql.cj.jdbc.Driver’ 3.提示java错误:Exception in thread “main” java.lang.SecurityException: Prohibited package name: java.generic