mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
21 lines
597 B
Java
21 lines
597 B
Java
package cn.hellohao.config;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
import java.io.File;
|
|
|
|
|
|
@Configuration
|
|
public class WebImgConfigurer implements WebMvcConfigurer {
|
|
|
|
@Override
|
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
|
String filePath = GlobalConstant.LOCPATH + File.separator;
|
|
registry.addResourceHandler("/ota/**").addResourceLocations("file:"+filePath);
|
|
}
|
|
|
|
|
|
}
|