com.github.xiaoymin.swaggerbootstrapui.web.SwaggerBootstrapUiResourceExtController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-bootstrap-ui Show documentation
Show all versions of swagger-bootstrap-ui Show documentation
Swagger-Bootstrap-UI is the front of the UI Swagger implementation, using jQuery+bootstrap implementation, the purpose is to replace the default UI Swagger implementation of the Swagger-UI, so that the document is more friendly...
The newest version!
/*
* Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD.
* All rights reserved.
* Official Web Site: http://www.xiaominfo.com.
* Developer Web Site: http://open.xiaominfo.com.
*/
package com.github.xiaoymin.swaggerbootstrapui.web;
import com.github.xiaoymin.swaggerbootstrapui.model.SwaggerResourceExt;
import com.github.xiaoymin.swaggerbootstrapui.service.SwaggerResourcesExtProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
/***
*
* @since:swagger-bootstrap-ui 1.9.4
* @author [email protected]
* 2019/06/02 16:28
*/
@ApiIgnore
@Controller
@RequestMapping("/swagger-resources-ext")
public class SwaggerBootstrapUiResourceExtController {
private final SwaggerResourcesExtProvider swaggerResourcesExtProvider;
@Autowired
public SwaggerBootstrapUiResourceExtController(@Qualifier("swaggerResourcesExtProvider") SwaggerResourcesExtProvider swaggerResources) {
this.swaggerResourcesExtProvider = swaggerResources;
}
@RequestMapping
@ResponseBody
public ResponseEntity> swaggerResources() {
return new ResponseEntity>(swaggerResourcesExtProvider.get(), HttpStatus.OK);
}
}