| | |
| | | |
| | | import java.util.concurrent.TimeUnit; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.http.CacheControl; |
| | |
| | | @Autowired |
| | | private RepeatSubmitInterceptor repeatSubmitInterceptor; |
| | | |
| | | /** 照片存储路径 */ |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | | |
| | | /** 报告 word 存储路径 */ |
| | | @Value("${wordUrl}") |
| | | private String wordUrl; |
| | | |
| | | @Override |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) |
| | | { |
| | |
| | | registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**") |
| | | .addResourceLocations("file:" + RuoYiConfig.getProfile() + "/"); |
| | | |
| | | /** 业务图片(印章等)与报告 word/pdf 的静态访问 */ |
| | | registry.addResourceHandler("/img/**").addResourceLocations("file:" + filePath + "/"); |
| | | registry.addResourceHandler("/word/**").addResourceLocations("file:" + wordUrl + "/"); |
| | | |
| | | /** swagger配置 */ |
| | | registry.addResourceHandler("/swagger-ui/**") |
| | | .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/") |