mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 20:50:14 +08:00
autoconfigure
This commit is contained in:
@@ -48,10 +48,23 @@ public class MaxKeyMgtMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
_logger.debug("add statics");
|
||||
registry.addResourceHandler("/static/**")
|
||||
.addResourceLocations("classpath:/static/");
|
||||
_logger.debug("add templates");
|
||||
registry.addResourceHandler("/templates/**")
|
||||
.addResourceLocations("classpath:/templates/");
|
||||
|
||||
_logger.debug("add swagger");
|
||||
registry.addResourceHandler("swagger-ui.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
|
||||
_logger.debug("add knife4j");
|
||||
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
|
||||
_logger.debug("add addResourceHandler");
|
||||
}
|
||||
|
||||
|
||||
@@ -73,13 +73,16 @@ public class MaxKeyMvcConfig implements WebMvcConfigurer {
|
||||
registry.addResourceHandler("/templates/**")
|
||||
.addResourceLocations("classpath:/templates/");
|
||||
|
||||
_logger.debug("add swagger");
|
||||
registry.addResourceHandler("swagger-ui.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
|
||||
_logger.debug("add knife4j");
|
||||
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
|
||||
_logger.debug("add addResourceHandler");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user