File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/io/geekidea/springbootplus/config Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 2323import org .springframework .beans .factory .annotation .Value ;
2424import org .springframework .context .annotation .Configuration ;
2525import org .springframework .web .servlet .config .annotation .InterceptorRegistry ;
26+ import org .springframework .web .servlet .config .annotation .ResourceHandlerRegistry ;
2627import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
2728
2829import java .util .Arrays ;
@@ -93,4 +94,11 @@ public void addInterceptors(InterceptorRegistry registry) {
9394
9495 }
9596
97+ @ Override
98+ public void addResourceHandlers (ResourceHandlerRegistry registry ) {
99+ registry .addResourceHandler ("swagger-ui.html" )
100+ .addResourceLocations ("classpath:/META-INF/resources/" );
101+ registry .addResourceHandler ("/webjars/**" )
102+ .addResourceLocations ("classpath:/META-INF/resources/webjars/" );
103+ }
96104}
You can’t perform that action at this time.
0 commit comments