swagger开启密码访问

6/9/2025 swagger

# application.properties

swagger.production=false #生产环境设为true
swagger.basic.enable=true
swagger.basic.username=root    #账号
swagger.basic.password=123456   #密码
1
2
3
4

# 启动入口main增加

@EnableSwagger2
@EnableSwaggerBootstrapUI
1
2