SpringBoot单元测试java.lang.IllegalStateException Could not initialize plugin: interface org.mockito解决方案

02-27 阅读 0评论

  大家好,我是爱编程的喵喵。双985硕士毕业,现担任全栈工程师一职,热衷于将数据思维应用到工作与生活中。从事机器学习以及相关的前后端开发工作。曾在阿里云、科大讯飞、CCF等比赛获得多次Top名次。现为CSDN博客专家、人工智能领域优质创作者。喜欢通过博客创作的方式对所学的知识进行总结与归纳,不仅形成深入且独到的理解,而且能够帮助新手快速入门。

SpringBoot单元测试java.lang.IllegalStateException Could not initialize plugin: interface org.mockito解决方案,SpringBoot单元测试java.lang.IllegalStateException Could not initialize plugin: interface org.mockito解决方案,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,人工智能,方法,第1张
(图片来源网络,侵删)

  本文主要介绍了SpringBoot项目单元测试java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker,希望能对使用SpringBoot项目单元测试的同学们有所帮助。

文章目录

  • 1. 问题描述
  • 2. 原因分析
  • 3. 解决办法

1. 问题描述

  今天在对新功能进行单元测试的时候,使用MockedStatic对其中的一个静态方法进行了模拟,结果执行报错了,错误信息是`java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null),具体报错信息如下图所示:

SpringBoot单元测试java.lang.IllegalStateException Could not initialize plugin: interface org.mockito解决方案,SpringBoot单元测试java.lang.IllegalStateException Could not initialize plugin: interface org.mockito解决方案,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,人工智能,方法,第2张
(图片来源网络,侵删)
SpringBoot单元测试java.lang.IllegalStateException Could not initialize plugin: interface org.mockito解决方案,SpringBoot单元测试java.lang.IllegalStateException Could not initialize plugin: interface org.mockito解决方案,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,人工智能,方法,第3张
(图片来源网络,侵删)

免责声明
本网站所收集的部分公开资料来源于AI生成和互联网,转载的目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复: 表情:
评论列表 (暂无评论,人围观)

还没有评论,来说两句吧...

目录[+]