提交 356894cd authored 作者: xc's avatar xc

[excel导入]修改路径

上级 e4e016f5
......@@ -5,6 +5,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
......@@ -27,7 +28,7 @@ import java.io.File;
@Configuration
@EnableSwagger2
public class WebMvcConfig {
public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Bean
public WebMvcConfigurer corsConfigurer() {
......@@ -61,4 +62,10 @@ public class WebMvcConfig {
.build();
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
// 这里之所以多了一"/",是为了解决打war时访问不到问题
registry.addResourceHandler("/webs/**").addResourceLocations("classpath:/webs/");
}
}
......@@ -16,4 +16,5 @@ import javax.persistence.Table;
public class ExcelConfig extends BaseEntity {
private String path;
private String rootPath;
private Integer fillIn;//0填写,1不天
}
package com.tykj.model_layer.excel;
import lombok.Data;
import java.util.List;
@Data
public class CompareData {
private String ruleName;//字段别名
private List<String> dataList;//真实数据
private List<String> sheetNameList;//sheetname
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论