Browse Source
修改文件下载类的获取文件相对路径的方法 新增 获取文件附件配置类 Shiro过滤器配置新增 过滤 /attachments/文件夹 修改销售出货单的所有导出方法,统一调用文件下载类的获取文件相对路径的方法 修改/attachments/文件路径: 由resources下面->移动到static下面dev
liuxiaoxu
3 months ago
12 changed files with 36 additions and 10 deletions
@ -0,0 +1,20 @@ |
|||||
|
package com.ruoyi.framework.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 class FilePathConfig implements WebMvcConfigurer{ |
||||
|
|
||||
|
@Override |
||||
|
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
||||
|
|
||||
|
//附件文件都在静态目录static下存放
|
||||
|
registry.addResourceHandler("/attachments/**").addResourceLocations("classpath:/static/attachments/"); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue