swagger2 引入的问题,依赖报错,版本兼容问题~

img

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    springfox.bean.validators.plugins.Validators.annotationFromBean(Validators.java:57)

The following method did not exist:

    springfox.documentation.spi.schema.contexts.ModelPropertyContext.getBeanPropertyDefinition()Ljava/util/Optional;

The method's class, springfox.documentation.spi.schema.contexts.ModelPropertyContext, is available from the following locations:

    jar:file:/C:/Users/isari/.m2/repository/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2.jar!/springfox/documentation/spi/schema/contexts/ModelPropertyContext.class

The class hierarchy was loaded from the following locations:

    springfox.documentation.spi.schema.contexts.ModelPropertyContext: file:/C:/Users/isari/.m2/repository/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of springfox.documentation.spi.schema.contexts.ModelPropertyContext