17 lines
716 B
Kotlin
17 lines
716 B
Kotlin
|
package com.example.demo.config
|
||
|
|
||
|
import org.springframework.context.annotation.Configuration
|
||
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc
|
||
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
|
||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
|
||
|
|
||
|
@Configuration
|
||
|
@EnableWebMvc
|
||
|
class WebConfig : WebMvcConfigurer {
|
||
|
override fun addResourceHandlers(registry: ResourceHandlerRegistry) {
|
||
|
registry.addResourceHandler("swagger-ui.html")
|
||
|
.addResourceLocations("classpath:/META-INF/resources/")
|
||
|
registry.addResourceHandler("/webjars/**")
|
||
|
.addResourceLocations("classpath:/META-INF/resources/webjars/")
|
||
|
}
|
||
|
}
|