- 通过我的分析,是swagger 被关闭了。而关闭的原因是在Swagger2Config上使用了@Profile注解标识.
而当前环境prod 没有在里面
所以改成
@Autowired(required=false)
Docket docket; - 或者修改
spring:
profiles:
active: local - 或者修改
Swagger2Config @Profile注解标识
- 或者修改
@Component @Profile({"local", "dev", "test"}) public class MySwaggerConfig {