| | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Configuration |
| | | @ConditionalOnProperty(name = "swagger.enabled", havingValue = "true") |
| | | public class SwaggerConfig |
| | | { |
| | | /** 系统基础配置 */ |
| | |
| | | private RuoYiConfig ruoyiConfig; |
| | | |
| | | /** 是否开启swagger */ |
| | | @Value("${swagger.enabled}") |
| | | @Value("${swagger.enabled:false}") |
| | | private boolean enabled; |
| | | |
| | | /** 设置请求的统一前缀 */ |
| | | @Value("${swagger.pathMapping}") |
| | | @Value("${swagger.pathMapping:/}") |
| | | private String pathMapping; |
| | | |
| | | /** |
| | |
| | | // 用ApiInfoBuilder进行定制 |
| | | return new ApiInfoBuilder() |
| | | // 设置标题 |
| | | .title("标题:若依管理系统_接口文档") |
| | | .title("标题:智慧服务管理系统_接口文档") |
| | | // 描述 |
| | | .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") |
| | | // 作者信息 |