package com.jiayue.ipp.common.security.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
public class WebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/cdn/**", "/css/**", "/img/**", "/js/**", "/fonts/**", "/svg/**")
                .addResourceLocations("classpath:/static/cdn/", "classpath:/static/css/", "classpath:/static/img/",
                        "classpath:/static/js/", "classpath:/static/fonts/", "classpath:/static/svg/");
    }
}
