# Spring Boot 404

By default, you do not need to add this configuration to access

Many friends can't access the doc.html interface after using SpringBoot integration swagger-bootstrap-ui. At this point, you may need to implement SpringBoot's WebMvcConfigurer interface, add related ResourceHandler, the code is as follows:

public class SwaggerBootstrapUiDemoApplication  implements WebMvcConfigurer{

	public void addResourceHandlers(ResourceHandlerRegistry registry) {

Similarly, when using a permission framework such as SpringMvc or shiro, if the page is inaccessible, configure the doc.html property.

For a code example of SpringBoot, see swagger-bootstrap-ui-demo (opens new window)

被围观 人次
上次更新: 2020-11-6 12:46:59