ruoyi框架开通swagger登录验证

1、common-swagger模块加入依赖:


    com.github.xiaoymin
    swagger-bootstrap-ui
    1.9.3

2、SwaggerAutoConfiguration类上加注解:@EnableSwaggerBootstrapUI

3、给共享配置中加入登录密码:这个配置中:application-dev.yml

# swagger配置

swagger:

        title: 系统模块接口文档

        license: Powered By xxx

        licenseUrl: https://xxx.vip

        production: false

        basic:

                enable: true

                username: xxx

                password: xxx

你可能感兴趣的:(swagger)