WebConfiguration.java
1004 Bytes
package com.cnlive.shenhe.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @Auther: 周伟鹏
* @Date: 2018/12/4 10:51
*/
@Configuration
@ComponentScan("com.cnlive.shenhe.job")
@EnableScheduling
public class WebConfiguration implements WebMvcConfigurer {
/* @Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new LoginIntercept()).addPathPatterns("/**");
}*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
}
}