zoukankan      html  css  js  c++  java
  • springboot Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboot-mybatis: There are test failures.

    springboot Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboot-mybatis: There are test failures.

    springboot创建项目maven install报错 ,

    Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboot-mybatis: There are test failures.

    寻找有用信息:

    Description:
    Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
    Reason: Failed to determine a suitable driver class

    未能配置数据源:未指定“url”属性,无法配置嵌入的数据源。

    于是推测可能我是引入了数据库相关依赖但并没有对其进行任何的配置,以至于报错。

    在application.properties中配置:

    #spring.datasource.username=root
    #spring.datasource.password=xingfu
    #spring.datasource.url=jdbc:mysql://localhost:3306/jdbctest?serverTimezone=UTC&useUnicode=true&characterEncoding=uft-8
    #spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

    或者在application.yml中配置相关内容。

    重新maven install,解决!

  • 相关阅读:
    CF1008D Pave the Parallelepiped
    Luogu P3324 [SDOI2015]星际战争
    Luogu P3157 [CQOI2011]动态逆序对
    CF1295E Permutation Separation
    位元算
    JavaScript 寻找数组中的第N大的元素
    JS常见的数组排序算法
    最新面试总结
    JavaScript BOM浏览器对象模型
    JavaScript DOM 事件
  • 原文地址:https://www.cnblogs.com/gyl5201314/p/12997399.html
Copyright © 2011-2022 走看看