Closed dunwu closed 5 years ago
参考 https://github.com/springfox/springfox/issues/2265,
修改 pom.xml
<dependency> <groupId>com.spring4all</groupId> <artifactId>swagger-spring-boot-starter</artifactId> <version>1.8.0.RELEASE</version> <exclusions> <exclusion> <groupId>io.swagger</groupId> <artifactId>swagger-annotations</artifactId> </exclusion> <exclusion> <groupId>io.swagger</groupId> <artifactId>swagger-models</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-annotations</artifactId> <version>1.5.21</version> </dependency> <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-models</artifactId> <version>1.5.21</version> </dependency>
或者修改 build.gradle
compile ('com.spring4all:swagger-spring-boot-starter:1.8.0.RELEASE') { exclude module: 'swagger-annotations' exclude module: 'swagger-models' } compile "io.swagger:swagger-annotations:1.5.21" compile "io.swagger:swagger-models:1.5.21"
应该可以解决。
Originally posted by @huahouye in https://github.com/SpringForAll/spring-boot-starter-swagger/issues/116#issuecomment-428481666
参考 https://github.com/springfox/springfox/issues/2265,
修改 pom.xml
或者修改 build.gradle
应该可以解决。
Originally posted by @huahouye in https://github.com/SpringForAll/spring-boot-starter-swagger/issues/116#issuecomment-428481666