zoukankan      html  css  js  c++  java
  • java bug记录

    1、报错:You must configure either the server or JDBC driver (via the serverTimezone conf)

    这是由于mysql时区问题导致,默认是美国时区,而我们会比他们迟8个小时。

    解决方式:

    i:jdbc加载的时候: ?serverTimezone=GMT%2B8

    ii:使用低版本的mysql数据库

    2、报错: The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary

    引入升级后的mysql驱动类,Driver位置由com.mysql.jdbc.Driver 变为com.mysql.cj.jdbc.Driver 

    解决方式:

    将加载驱动类配置为 com.mysql.cj.jdbc.Driver 

    3、Class path contains multiple SLF4J bindings

    这是由于springboot默认的日志是logback和我们自己引入的log4j2包冲突。

    解决方式:在依赖中去除默认引用的包即可

        <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-logging</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-tomcat</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

     4、tomcat7:run运行时候,javax.annotation不存在

    由于idea用的jdk版本高

    解决方式:降低版本

    file--Project Structure

  • 相关阅读:
    React组件传值(子传父)
    React里面的componentDidMount()钩子函数用法
    修改主键的值
    mysql 命令
    Android ContentResolver
    linux下vim命令详解
    26种基于PHP的开源博客系统
    [环境配置] 如何为Apache绑定多IP多域名
    display属性值
    link标签 rel="stylesheet"
  • 原文地址:https://www.cnblogs.com/yewook/p/12665076.html
Copyright © 2011-2022 走看看