fix: 외사대상목표,외사장비 파일경로설정 및 적용
parent
5aa9fd0d9a
commit
ceba63b88f
|
|
@ -36,8 +36,10 @@ import java.util.*;
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class EquipService {
|
public class EquipService {
|
||||||
@Value("${spring.servlet.multipart.location}")
|
@Value("${file.dir}")
|
||||||
protected String locationPath;
|
protected String fileDir;
|
||||||
|
@Value("${file.dir.equip}")
|
||||||
|
protected String equ;
|
||||||
|
|
||||||
private final EquipRepository equipRepository;
|
private final EquipRepository equipRepository;
|
||||||
private final EquipFileRepository equipFileRepository;
|
private final EquipFileRepository equipFileRepository;
|
||||||
|
|
@ -81,7 +83,7 @@ public class EquipService {
|
||||||
|
|
||||||
public void saveFile(Equip equip, MultipartHttpServletRequest mRequest) throws Exception {
|
public void saveFile(Equip equip, MultipartHttpServletRequest mRequest) throws Exception {
|
||||||
try {
|
try {
|
||||||
String path = locationPath;
|
String path = fileDir+equ;
|
||||||
String FileSize;
|
String FileSize;
|
||||||
File dir = new File(path);
|
File dir = new File(path);
|
||||||
if(!dir.exists()) dir.mkdir();
|
if(!dir.exists()) dir.mkdir();
|
||||||
|
|
@ -190,7 +192,7 @@ public class EquipService {
|
||||||
|
|
||||||
public void updateFile(Equip equip,Equip equipTmp, MultipartHttpServletRequest mRequest) throws Exception {
|
public void updateFile(Equip equip,Equip equipTmp, MultipartHttpServletRequest mRequest) throws Exception {
|
||||||
try {
|
try {
|
||||||
String path = locationPath;
|
String path = fileDir+equ;
|
||||||
String FileSize;
|
String FileSize;
|
||||||
File dir = new File(path);
|
File dir = new File(path);
|
||||||
if(!dir.exists()) dir.mkdir();
|
if(!dir.exists()) dir.mkdir();
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import com.dbnt.faisp.main.fipTarget.service.FipTargetService;
|
||||||
import com.dbnt.faisp.main.organMgt.service.OrganConfigService;
|
import com.dbnt.faisp.main.organMgt.service.OrganConfigService;
|
||||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||||
import com.dbnt.faisp.main.userInfo.service.UserInfoService;
|
import com.dbnt.faisp.main.userInfo.service.UserInfoService;
|
||||||
import com.dbnt.faisp.util.Excel;
|
|
||||||
import com.dbnt.faisp.util.ParamMap;
|
import com.dbnt.faisp.util.ParamMap;
|
||||||
import com.dbnt.faisp.util.Utils;
|
import com.dbnt.faisp.util.Utils;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,14 +35,17 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class FipTargetService extends BaseService {
|
public class FipTargetService extends BaseService {
|
||||||
@Value("${spring.servlet.multipart.location}")
|
@Value("${file.dir}")
|
||||||
protected String locationPath;
|
protected String fileDir;
|
||||||
|
@Value("${file.dir.vulnerable}")
|
||||||
|
protected String vulnerable;
|
||||||
|
@Value("${file.dir.part}")
|
||||||
|
protected String part;
|
||||||
|
|
||||||
private final PartInfoRepository partInfoRepository;
|
private final PartInfoRepository partInfoRepository;
|
||||||
private final PartInfoFileRepository partInfoFileRepository;
|
private final PartInfoFileRepository partInfoFileRepository;
|
||||||
|
|
@ -83,7 +86,7 @@ public class FipTargetService extends BaseService {
|
||||||
} else {
|
} else {
|
||||||
for(MultipartFile file : multipartFileList){
|
for(MultipartFile file : multipartFileList){
|
||||||
String saveName = UUID.randomUUID().toString();
|
String saveName = UUID.randomUUID().toString();
|
||||||
String path = locationPath+File.separator+"publicFile"+File.separator;
|
String path = fileDir+part;
|
||||||
saveFile(file, new File(path+File.separator+saveName));
|
saveFile(file, new File(path+File.separator+saveName));
|
||||||
|
|
||||||
String originalFilename = file.getOriginalFilename();
|
String originalFilename = file.getOriginalFilename();
|
||||||
|
|
@ -251,7 +254,7 @@ public class FipTargetService extends BaseService {
|
||||||
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
|
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
|
||||||
for(MultipartFile file : multipartFileList){
|
for(MultipartFile file : multipartFileList){
|
||||||
String saveName = UUID.randomUUID().toString();
|
String saveName = UUID.randomUUID().toString();
|
||||||
String path = locationPath+File.separator+"publicFile"+File.separator;
|
String path = fileDir+part;
|
||||||
saveFile(file, new File(path+File.separator+saveName));
|
saveFile(file, new File(path+File.separator+saveName));
|
||||||
|
|
||||||
String originalFilename = file.getOriginalFilename();
|
String originalFilename = file.getOriginalFilename();
|
||||||
|
|
@ -351,7 +354,7 @@ public class FipTargetService extends BaseService {
|
||||||
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
|
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
|
||||||
for(MultipartFile file : multipartFileList){
|
for(MultipartFile file : multipartFileList){
|
||||||
String saveName = UUID.randomUUID().toString();
|
String saveName = UUID.randomUUID().toString();
|
||||||
String path = locationPath+File.separator+"publicFile"+File.separator;
|
String path = fileDir+vulnerable;
|
||||||
saveFile(file, new File(path+File.separator+saveName));
|
saveFile(file, new File(path+File.separator+saveName));
|
||||||
|
|
||||||
String originalFilename = file.getOriginalFilename();
|
String originalFilename = file.getOriginalFilename();
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,13 @@ spring.servlet.multipart.location=C:\\faispUploadFiles
|
||||||
spring.servlet.multipart.max-file-size=200MB
|
spring.servlet.multipart.max-file-size=200MB
|
||||||
spring.servlet.multipart.max-request-size=500MB
|
spring.servlet.multipart.max-request-size=500MB
|
||||||
|
|
||||||
|
#file
|
||||||
|
file.dir=C:\\faispUploadFiles
|
||||||
|
file.dir.vulnerable=/vulnerable
|
||||||
|
file.dir.part=/part
|
||||||
|
file.dir.equip=/equip
|
||||||
|
|
||||||
|
|
||||||
#thymeleaf
|
#thymeleaf
|
||||||
spring.thymeleaf.prefix=classpath:templates/
|
spring.thymeleaf.prefix=classpath:templates/
|
||||||
spring.thymeleaf.check-template-location=true
|
spring.thymeleaf.check-template-location=true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue