AdminSwagger2Configuration
package org.linlinjava.litemall.admin.config; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2; /**
* swagger在线文档配置<br>
* 项目启动后可通过地址:http://host:ip/swagger-ui.html 查看在线文档
*
* @author enilu
* @version 2018-07-24
*/ @Configuration
@EnableSwagger2
public class AdminSwagger2Configuration {
@Bean
public Docket adminDocket() { return new Docket(DocumentationType.SWAGGER_2)
.groupName("admin")
.apiInfo(adminApiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("org.linlinjava.litemall.admin.web"))
.paths(PathSelectors.any())
.build();
} private ApiInfo adminApiInfo() {
return new ApiInfoBuilder()
.title("litemall-admin API")
.description("litemall管理后台API")
.termsOfServiceUrl("https://github.com/linlinjava/litemall")
.contact("https://github.com/linlinjava/litemall")
.version("1.0")
.build();
}
}
AdminSwagger2Configuration的更多相关文章
随机推荐
- P1426 小鱼会有危险吗
题解: 在测试数据里有一个是临界值问题,探测范围是闭区间 #include<stdio.h>int main(){ double s,x; //注意:此 ...
- Redis: Reducing Memory Usage
High Level Tips for Redis Most of Stream-Framework's users start out with Redis and eventually move ...
- choice接口、同花顺使用
一 choice接口使用 1.choice软件-->量化-->下载中心,下载python接口文件 EMQuantAPI_Python 2.要先绑定手机号,绑定后账户权限不够,暂时放弃. 二 ...
- css选择器,选择指定属性的值
选择属性为href的值: <a class='test' href='www.baidu.com' >test</a> response.css('.test::attr(hr ...
- 吴裕雄--天生自然MySQL学习笔记:MySQL 创建数据库
在登陆 MySQL 服务后,使用 create 命令创建数据库,语法如下: CREATE DATABASE 数据库名; 以下命令简单的演示了创建数据库的过程,数据名为 RUNOOB: [root@ho ...
- Java并发分析—volatile
在https://www.cnblogs.com/xyzyj/p/11148497.html中已经说明了在多线程并发的情况下,会出现数据的不一致问题,但归根结底就是一个原因,在宏观上就是线程的执行顺序 ...
- linux下ffmpeg环境搭建记录
1.Linux下安装yasm 官网下载:http://yasm.tortall.net/Download.html tar -zvxf yasm-1.3.0.tar.gz cd yasm-1.3.0/ ...
- 使用java(jdbc)向mysql中添加数据时出现“unknown column……”错误
错误情况如题,出现这个错误的原因是这样的: 在数据库中,插入一个字符串数据的时候是需要用单引号引起来的. 而下面的代码,注意看: sta.executeUpdate("INSERT INTO ...
- js date 常用
1.怎么获取当月的最后一天 var now=new Date(); new Date(new Date(now.getFullYear(),now.getMonth()+1,1).getTime() ...
- java查看简单GC日志
测试代码: public class GCtest { public static void main(String[] args) { for (int i = 0; i < 10000; i ...