Java Code Examples for org.springframework.web.servlet.config.annotation.ViewControllerRegistry#addStatusController()

The following examples show how to use org.springframework.web.servlet.config.annotation.ViewControllerRegistry#addStatusController() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SwaggerConfig.java    From youran with Apache License 2.0 5 votes vote down vote up
@Override
public void addViewControllers(ViewControllerRegistry registry) {
    registry.addStatusController("/swagger-ui.html", HttpStatus.NOT_FOUND);
    registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
}
 
Example 2
Source File: MoonServletConfig.java    From moon-api-gateway with MIT License 4 votes vote down vote up
/**
 * Defines api for health check.
 */

@Override
public void addViewControllers(ViewControllerRegistry registry) {
    registry.addStatusController("/valid", HttpStatus.OK);
}