完全跟着mybatis_plus官网的案例一步一步来的,但是到junit的时候突然报错

Internal Error occurred.

org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests

at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:189)

at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:168)

at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)

at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69)

at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)

at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)

at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)

Caused by: org.junit.platform.commons.JUnitException: MethodSelector [className = 'com.atguigu.mybatisplus.demo.MybatisPlusApplicationTests', methodName = 'testSelectList', methodParameterTypes = ''] resolution failed

at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)

at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:102)

at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)

at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)

at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:45)

at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69)

at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:181)

... 6 more

Caused by: org.junit.platform.commons.PreconditionViolationException: Could not load class with name: com.atguigu.mybatisplus.demo.MybatisPlusApplicationTests

at org.junit.platform.engine.discovery.MethodSelector.lambda$lazyLoadJavaClass$0(MethodSelector.java:157)

at org.junit.platform.commons.function.Try$Failure.getOrThrow(Try.java:335)

at org.junit.platform.engine.discovery.MethodSelector.lazyLoadJavaClass(MethodSelector.java:156)

at org.junit.platform.engine.discovery.MethodSelector.getJavaClass(MethodSelector.java:135)

at org.junit.jupiter.engine.discovery.MethodSelectorResolver.resolve(MethodSelectorResolver.java:69)

at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:146)

at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)

at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)

at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)

at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)

at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)

at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)

at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)

at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)

at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)

at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)

at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)

... 11 more

Caused by: java.lang.ClassNotFoundException: com.atguigu.mybatisplus.demo.MybatisPlusApplicationTests

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

at org.junit.platform.commons.util.ReflectionUtils.lambda$tryToLoadClass$9(ReflectionUtils.java:790)

at org.junit.platform.commons.function.Try.lambda$call$0(Try.java:57)

at org.junit.platform.commons.function.Try.of(Try.java:93)

at org.junit.platform.commons.function.Try.call(Try.java:57)

at org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass(ReflectionUtils.java:753)

at org.junit.platform.commons.util.ReflectionUtils.tryToLoadClass(ReflectionUtils.java:709)

... 27 more

百度了很久也没有找到解决的办法,最后无奈重新走了一遍springbootInitilizr 自己手动添加配置 结果测试成功! 如果大家遇这种错误,建议重配置一下项目。

springboot整合mybatisplus遇到的错误的更多相关文章

  1. SpringBoot 整合 MyBatis-Plus 入门体验

    一.前言 本文小编将基于 SpringBoot 整合 MyBatis-Plus , MyBatis-Plus 是一个 MyBatis 的增强工具,在 MyBatis 的基础上做增强并且不改变原本功能 ...

  2. SpringBoot整合Mybatis-Plus

    这篇文章介绍一个SpringBoot整合Mybatis-Plus,提供一个小的Demo供大家参考. 已经很久没有写文章了,最近家里有点事刚刚处理完,顺便也趁机休息了一段时间.刚回到公司看了一下码云,发 ...

  3. SpringBoot整合MyBatisPlus配置动态数据源

    目录 SpringBoot整合MyBatisPlus配置动态数据源 SpringBoot整合MyBatisPlus配置动态数据源 推文:2018开源中国最受欢迎的中国软件MyBatis-Plus My ...

  4. SpringBoot整合Mybatis-plus实现增删查改

    今天给大家分享一下SpringBoot整合Mybatis-plus的增删查改案例. pom.xml <?xml version="1.0" encoding="UT ...

  5. 5、SpringBoot整合之SpringBoot整合MybatisPlus

    SpringBoot整合MybatisPlus 目录(可点击直接跳转,但还是建议按照顺序观看,四部分具有一定的关联性): 实现基础的增删改查 实现自动填充功能 实现逻辑删除 实现分页 首先给出四部分完 ...

  6. 实践丨SpringBoot整合Mybatis-Plus项目存在Mapper时报错

    摘要:在SpringBoot运行测试Mybatis-Plus测试的时候报错的问题分析与修复 本文分享自华为云社区<SpringBoot整合MybatisPlus项目存在Mapper时运行报错的问 ...

  7. Springboot 整合 MyBatisPlus[详细过程]

    Springboot 整合 MyBatisPlus[详细过程] 提要 这里已经将Springboot环境创建好 这里只是整合MyBatis过程 引入Maven依赖 添加MyBatisPlus启动依赖, ...

  8. SpringBoot 整合 MybatisPlus 3.0

      CRUD是指在做计算处理时的增加(Create).读取查询(Retrieve).更新(Update)和删除(Delete)几个单词的首字母简写.主要被用在描述软件系统中DataBase或者持久层的 ...

  9. SpringBoot整合MyBatis-Plus实现快速业务功能开发

    概览:使用MybatisPlus和它的代码生成整合SpringBoot可以实现快速的业务功能开发,具体步骤如下 一.添加依赖 <dependency> <groupId>org ...

随机推荐

  1. 使用Python批量爬取美女图片

    运行截图 实列代码: from bs4 import BeautifulSoup import requests,re,os headers = { 'User-Agent': 'Mozilla/5. ...

  2. Typora的破解

    Typora是什么? Typora是一款支持实时预览的Markdown文本编辑器.支持即时渲染技术,这也是与其他Markdown编辑器最显著的区别.即时渲染使得你写Markdown就想是写Word文档 ...

  3. CodeForces - 1690F

    Problem - F - Codeforces 题意: 给出一个字符串,给出一个序列,每次对应位置的字符变成序列指定位置的字符,即序列中对应位置为2,那么字符串的这个位置的字符就要变成字符串第二个位 ...

  4. SpringMVC前置复习以及扩展

    SpringMVC ssm:mybatis+Spring+SpringMVC javaSE javaweb 框架 理解的DAO层和Service层 先简单来讲下Dao层,和Service层的概念: S ...

  5. Zookeeper+dubbo+Springboot集成总结

    1. 尽量用XML 集成,这也的Dubbo官方推荐的集成方式 自己在使用注解集成过程中发现有坑:Springmvc包扫描和dubbo包扫描冲突,导致消费端一直拿不到代理对象(null),非常蛋疼,所以 ...

  6. 这里聊聊扫地机的 IOT 开发

    以下内容为本人的著作,如需要转载,请声明原文链接微信公众号「englyf」https://www.cnblogs.com/englyf/p/16663833.html 消费者使用扫地机通常的方式是通过 ...

  7. 记一次Linux光盘救援

    最近遇到一个zz把/etc/profile改坏了导致系统起不来,所以复习一下光盘救援 工具:vm-workstation,centos6 原系统盘起不来后,插入有救援工具的系统盘后 按照提示进入she ...

  8. 【pkuwc2018】随机算法

    我们考虑用状压dp来解决这一道题 设$f[i][S]$表示当前排列的前i位所构成的最大独立集恰好为S的方案数 我们考虑用$f[i][S]$推出$f[i+1][S']$的值 那么我们有两种扩展的方法,一 ...

  9. Elasticsearch:分布式计分

  10. Pod的dns记录怎么组成的

    Pod的dns记录怎么组成的 <Pod Name>.<service name>.<namespace name>.svc.cluster.local Pod的Na ...