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

  • 相关阅读:
    web页面静态化与伪静态化
    mysql 优化之空间换时间
    QPS、PV、UV、RT 之间的关系
    接口
    MySQL 索引
    名词解释
    go 语言标识符
    Git版本控制与工作流
    Maven安装与配置
    IDEA工具使用说明
  • 原文地址:https://www.cnblogs.com/yewook/p/12665076.html
Copyright © 2011-2022 走看看