All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zoi7.component.web.config.ComWebMvcConfig Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package com.zoi7.component.web.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 自定义 WebMvcConfigurer 配置
 *
 * @author yjy
 * 2018-04-23 11:40
 */
@Configuration
public class ComWebMvcConfig implements WebMvcConfigurer {

    private static final Logger log = LoggerFactory.getLogger(ComWebMvcConfig.class);

    /**
     * 静态资源请求配置
     * @param registry 资源处理注册器
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        log.info("addResourceHandlers...........................");
        registry.addResourceHandler("/common/**").addResourceLocations("classpath:/common/");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy