提交 d1cc9af4 authored 作者: zhoushaopan's avatar zhoushaopan

[工作流模块]修改文件访问路径

上级 22a9b57b
......@@ -4,6 +4,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;
import java.io.File;
/**
* @author zsp
......@@ -32,9 +34,11 @@ public class WebMvcConfig {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/workflow/xml/**")
.addResourceLocations("file:" + System.getProperty("user.dir") + "\\xml\\");
.addResourceLocations("file:" + System.getProperty("user.dir") + File.separator+"xml"+File.separator);
// .addResourceLocations("file:" + System.getProperty("user.dir") +"\\xml\\");
registry.addResourceHandler("/xml/**")
.addResourceLocations("file:" + System.getProperty("user.dir") + "\\xml\\");
.addResourceLocations("file:" + System.getProperty("user.dir") + File.separator+"xml"+File.separator);
// .addResourceLocations("file:" + System.getProperty("user.dir") + "\\xml\\");
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/workflow/");
}
......
......@@ -52,7 +52,8 @@ import java.util.concurrent.ConcurrentHashMap;
@Service
public class WorkFlowServiceImpl implements WorkFlowService {
private static String XML_FILE_PATH = "\\xml\\";
private static String XML_FILE_PATH = File.separator+"xml"+File.separator;
// private static String XML_FILE_PATH = File.separator+"xml"+File.separator;
private static String BASE_PATH = System.getProperty("user.dir");
private final RepositoryService repositoryService;
private final RuntimeService runtimeService;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论