Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/rest/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 有没有办法为每个控制器配置单独的招摇过市url?_Java_Rest_Spring Boot_Swagger 2.0 - Fatal编程技术网

Java 有没有办法为每个控制器配置单独的招摇过市url?

Java 有没有办法为每个控制器配置单独的招摇过市url?,java,rest,spring-boot,swagger-2.0,Java,Rest,Spring Boot,Swagger 2.0,我试图在springboot项目中配置swagger 2,以便为每个控制器类分别编写文档 在文档中找不到这样的东西 控制器示例: @Api(description=“giftcard controller”) @RestController @请求映射(“/giftcard”) 公共类GiftCardController{ @ApiOperation(value=“获取有关请求卡的信息”) @GetMapping(value=“/getInfo”) 公共HttpStatus获取信息(字符串id)

我试图在springboot项目中配置swagger 2,以便为每个控制器类分别编写文档

在文档中找不到这样的东西

控制器示例:

@Api(description=“giftcard controller”)
@RestController
@请求映射(“/giftcard”)
公共类GiftCardController{
@ApiOperation(value=“获取有关请求卡的信息”)
@GetMapping(value=“/getInfo”)
公共HttpStatus获取信息(字符串id){
返回HttpStatus.NOT_可接受;
}
}
昂首阔步

swagger: "2.0"
info:
  title: Sample API
  description: API description in Markdown.
  version: 1.0.0
host: api.example.com
basePath: /v1
schemes:
  - https
paths:
  /users:
    get:
      summary: Returns a list of users.
      description: Optional extended description in Markdown.
      produces:
        - application/json
      responses:
        200:
          description: OK
Swagger-SpringBoot启用:

@配置
@使能招摇过市2
公共类SwaggerConfig{}