Commit 103178ec authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent bf62d00e
......@@ -39,6 +39,7 @@ import lombok.RequiredArgsConstructor;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;
import org.springframework.util.ResourceUtils;
......@@ -73,6 +74,9 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
private final TAttaInfoMapper attaInfoMapper;
@Value("${filePath.path}")
private String filePath;
@Override
public boolean save(TElecEmployeeInfo entity) {
return super.save(entity);
......@@ -93,8 +97,10 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
@Override
public R importZip(MultipartFile zipFile){
try {
String pathName = ResourceUtils.getURL("classpath:").getPath() + "unloap/";
String dec = ResourceUtils.getURL("classpath:").getPath() + "unloap/";
// String pathName = ResourceUtils.getURL("classpath:").getPath() + "unloap/";
// String dec = ResourceUtils.getURL("classpath:").getPath() + "unloap/";
String pathName = filePath;
String dec = filePath;
File file1 = new File(pathName);
//如果文件夹不存在 创建文件夹
if (!file1.exists()) {
......
......@@ -16,9 +16,11 @@ spring:
password: yf_zsk
#url: jdbc:mysql://127.0.0.1:3306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
servlet:
multipart:
location: /data/tmp
# servlet:
# multipart:
# location: /data/tmp/
filePath:
path: /data/tmp/
#法大大生产环境
#fdd:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment