问题1:No exception of type HibernateException can be thrown; an exception type must be a subclass of Throwable
解决方法:导入javaee-api-7.0.jar包 (jar包获取地址放在最下面了)
问题2: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.
翻译:
解决方法:错误是因为时区导致的,我们可以在连接数据库时指定时区
指定时区为上海
格式:jdbc:mysql:///hibernate?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
javaee-api-7.0.jar包获取地址链接:https://pan.baidu.com/s/18NhE-EnPMrpIgNr8JnK8zg
提取码:pk6w