当前位置:Gxlcms > 数据库问题 > 异常记录---Error creating bean with name 'sqlSessionFactory'

异常记录---Error creating bean with name 'sqlSessionFactory'

时间:2021-07-01 10:21:17 帮助过:25人阅读

原因:未引入jstl包

pom.xml引入jstl,问题解决。

  <!-- java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>



4、在JDBC使用的时候有时候会出现java.sql.SQLException: The server time zone value ‘???ú±ê×??±??‘ is unrecognized or represents........的错误,具体错误如下:

Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver‘. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

 出现这个的原因是因为 mysql返回的时间总是有问题,比实际时间要早8小时。

解决办法:

jdbc.url = jdbc:mysql://localhost:3306/jdbc01?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false

 在jdbc连接的url后面加上serverTimezone=GMT即可解决问题,如果需要使用gmt+8时区,需要写成GMT%2B8,问题就会解决;

  

异常记录---Error creating bean with name 'sqlSessionFactory'

标签:update   unicode   Servle   nec   bat   springmvc   group   EDA   resource   

人气教程排行