Package org.springdoc.webmvc.ui
Class SwaggerWelcomeWebMvc
- java.lang.Object
-
- org.springdoc.ui.AbstractSwaggerWelcome
-
- org.springdoc.webmvc.ui.SwaggerWelcomeCommon
-
- org.springdoc.webmvc.ui.SwaggerWelcomeWebMvc
-
@Controller public class SwaggerWelcomeWebMvc extends SwaggerWelcomeCommon
The type Swagger welcome.- Author:
- bnasslahsen
-
-
Constructor Summary
Constructors Constructor Description SwaggerWelcomeWebMvc(org.springdoc.core.SwaggerUiConfigProperties swaggerUiConfig, org.springdoc.core.SpringDocConfigProperties springDocConfigProperties, org.springdoc.core.SwaggerUiConfigParameters swaggerUiConfigParameters, org.springdoc.core.providers.SpringWebProvider springWebProvider)Instantiates a new Swagger welcome web mvc.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringbuildApiDocUrl()Build api doc url string.protected StringbuildSwaggerConfigUrl()Build swagger config url string.protected StringbuildUrl(String contextPath, String docsUrl)Build url string.protected voidcalculateUiRootPath(StringBuilder... sbUrls)Calculate ui root path.org.springframework.http.ResponseEntity<Void>redirectToUi(javax.servlet.http.HttpServletRequest request)Redirect to ui string.-
Methods inherited from class org.springdoc.webmvc.ui.SwaggerWelcomeCommon
calculateOauth2RedirectUrl, openapiJson
-
-
-
-
Constructor Detail
-
SwaggerWelcomeWebMvc
public SwaggerWelcomeWebMvc(org.springdoc.core.SwaggerUiConfigProperties swaggerUiConfig, org.springdoc.core.SpringDocConfigProperties springDocConfigProperties, org.springdoc.core.SwaggerUiConfigParameters swaggerUiConfigParameters, org.springdoc.core.providers.SpringWebProvider springWebProvider)Instantiates a new Swagger welcome web mvc.- Parameters:
swaggerUiConfig- the swagger ui configspringDocConfigProperties- the spring doc config propertiesswaggerUiConfigParameters- the swagger ui config parametersspringWebProvider- the spring web provider
-
-
Method Detail
-
redirectToUi
@GetMapping("${springdoc.swagger-ui.path:#{T(org.springdoc.core.Constants).DEFAULT_SWAGGER_UI_PATH}}") public org.springframework.http.ResponseEntity<Void> redirectToUi(javax.servlet.http.HttpServletRequest request)Redirect to ui string.- Overrides:
redirectToUiin classSwaggerWelcomeCommon- Parameters:
request- the request- Returns:
- the string
-
calculateUiRootPath
protected void calculateUiRootPath(StringBuilder... sbUrls)
Calculate ui root path.- Specified by:
calculateUiRootPathin classorg.springdoc.ui.AbstractSwaggerWelcome- Parameters:
sbUrls- the sb urls
-
buildUrl
protected String buildUrl(String contextPath, String docsUrl)
Build url string.- Overrides:
buildUrlin classorg.springdoc.ui.AbstractSwaggerWelcome- Parameters:
contextPath- the context pathdocsUrl- the docs url- Returns:
- the string
-
buildApiDocUrl
protected String buildApiDocUrl()
Build api doc url string.- Specified by:
buildApiDocUrlin classorg.springdoc.ui.AbstractSwaggerWelcome- Returns:
- the string
-
buildSwaggerConfigUrl
protected String buildSwaggerConfigUrl()
Build swagger config url string.- Specified by:
buildSwaggerConfigUrlin classorg.springdoc.ui.AbstractSwaggerWelcome- Returns:
- the string
-
-