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

  • 相关阅读:
    js 脚本学习 索引
    nodejs 学习索引
    oracle 学习 笔记
    githut 的 管理 使用
    sublime text 插件记录
    web 学习 相关索引
    wpf 自定义 无边框 窗体 resize 实现
    vs 效率工具
    ANDROID开发实用小工具
    iOS开发之Core Animation
  • 原文地址:https://www.cnblogs.com/yewook/p/12665076.html
Copyright © 2011-2022 走看看