该异常是由 swagger 引起的
解决方法:忽略原版本的swagger-annotations和swagger-models,添加1.5.21版本的
1 <dependency> 2 <groupId>io.springfox</groupId> 3 <artifactId>springfox-swagger-ui</artifactId> 4 <version>2.9.2</version> 5 <exclusions> 6 <exclusion> 7 <groupId>io.swagger</groupId> 8 <artifactId>swagger-annotations</artifactId> 9 </exclusion> 10 <exclusion> 11 <groupId>io.swagger</groupId> 12 <artifactId>swagger-models</artifactId> 13 </exclusion> 14 </exclusions> 15 </dependency> 16 <dependency> 17 <groupId>io.swagger</groupId> 18 <artifactId>swagger-annotations</artifactId> 19 <version>1.5.21</version> 20 </dependency> 21 <dependency> 22 <groupId>io.swagger</groupId> 23 <artifactId>swagger-models</artifactId> 24 <version>1.5.21</version> 25 </dependency>