Caused by: java.lang.ClassNotFoundException: springfox.documentation.schema.ModelReference 错误解决

2022年10月24日10:13:53

造成这种错误的原因是父类的pom中<dependecies></dependecies>有springfox的依赖,在这里面的依赖是的所有工程都必须继承这个,因此会导致不需要这个或说没有用到swagger注解的工程,在执行导致上面的类找不到的错误。

解决方法, 是将这个springfox移除<dependecies></dependecies> 放入    <dependencyManagement>    </dependencyManagement>让需要它进行声明继承和使用。

<dependencies>和<dependencyManagement>作用和区别见

https://blog.csdn.net/liutengteng130/article/details/46991829

这个链接的文章说明。

  • 作者:玉标
  • 原文链接:https://blog.csdn.net/u013452335/article/details/84099671
    更新时间:2022年10月24日10:13:53 ,共 352 字。