package lingtao.net.config;

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


@Configuration
public abstract class ResourceServerConfig implements WebMvcConfigurer {

	private String localPrefix = "abc";

	private String localPath = "F:\\java_project\\bj\\upload";

	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/" + localPrefix + "/**")
				.addResourceLocations("file:" + localPath);
	}

}
