Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

spring boot example with swagger

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry.addResourceHandler("swagger-ui.html")
      .addResourceLocations("classpath:/META-INF/resources/");

    registry.addResourceHandler("/webjars/**")
      .addResourceLocations("classpath:/META-INF/resources/webjars/");
}
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #spring #boot #swagger
ADD COMMENT
Topic
Name
6+5 =