ajp 활성화

파일 업로드 경로 오류 수정.
강석 최 2022-12-09 09:49:33 +09:00
parent ad4c3fbcd7
commit bddc38d95c
12 changed files with 21 additions and 21 deletions

View File

@ -7,7 +7,7 @@ import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
//@Configuration
@Configuration
public class TomcatConfiguration {
@Value("${tomcat.ajp.protocol}")

View File

@ -105,7 +105,7 @@ public class FaRptService extends BaseService {
int fileSeq = lastFile==null?1:(lastFile.getFileSeq()+1);
for(MultipartFile file: multipartFileList){
String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"faRpt"+File.separator;
String path = locationPath+File.separator+"faRpt";
saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename();

View File

@ -218,7 +218,7 @@ public class FishingBoatService extends BaseService {
int fileSeq = 1;
for(MultipartFile file : fileList){
String saveName = UUID.randomUUID().toString();
String path = locationPath+ File.separator+sailorPath+File.separator;
String path = locationPath+ File.separator+sailorPath;
saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename();

View File

@ -99,7 +99,7 @@ public class AffairService extends BaseService { // 견문보고
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"affair"+File.separator;
String path = locationPath+File.separator+"affair";
saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename();

View File

@ -121,7 +121,7 @@ public class PlanService extends BaseService { // 월간계획
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"monthPlan"+File.separator;
String path = locationPath+File.separator+"monthPlan";
saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename();

View File

@ -112,7 +112,7 @@ public class ResultService extends BaseService { // 월간계획
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"affairResult"+File.separator;
String path = locationPath+File.separator+"affairResult";
saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename();

View File

@ -89,7 +89,7 @@ public class BoardInvestigationService extends BaseService {
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString();
String path = locationPath+ File.separator+"ivsgt"+File.separator;
String path = locationPath+ File.separator+"ivsgt";
saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename();

View File

@ -63,7 +63,7 @@ public class PublicBoardService extends BaseService {
int fileSeq = lastFileInfo==null?1:(lastFileInfo.getFileSeq()+1);
for(MultipartFile file : multipartFileList){
String saveName = UUID.randomUUID().toString();
String path = locationPath+File.separator+"publicFile"+File.separator;
String path = locationPath+File.separator+"publicFile";
saveFile(file, new File(path+File.separator+saveName));
String originalFilename = file.getOriginalFilename();

View File

@ -1,4 +1,4 @@
#tomcat.ajp.protocol=HTTP/1.1
tomcat.ajp.protocol=HTTP/1.1
spring.devtools.livereload.enabled=true
#file upload

View File

@ -1,4 +1,4 @@
#tomcat.ajp.protocol=AJP/1.3
tomcat.ajp.protocol=HTTP/1.1
#file upload
spring.servlet.multipart.location=/uploadFiles

View File

@ -1,4 +1,4 @@
#tomcat.ajp.protocol=HTTP/1.1
tomcat.ajp.protocol=HTTP/1.1
#file upload
spring.servlet.multipart.location=/uploadFiles

View File

@ -16,22 +16,22 @@
<input type="hidden" name="wrtUserGrd" th:value="${info.wrtUserGrd}">
<input type="hidden" name="wrtUserNm" th:value="${info.wrtUserNm}">
<div class="row mb-1">
<label for="wrtUserNm" class="col-sm-2 col-form-label text-center">작성자</label>
<label for="wrtUserNm" class="col-sm-2 col-form-label col-form-label-sm text-center">작성자</label>
<div class="col-sm-2">
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd eq info.wrtUserGrd}">
<input type="text" class="form-control" id="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
<input type="text" class=" form-control form-control-sm" id="wrtUserNm" th:value="|${commonCode.itemValue} ${info.wrtUserNm}|" readonly>
</th:block>
</th:block>
</div>
<label for="wrtDt" class="col-sm-1 col-form-label text-center">작성일시</label>
<label for="wrtDt" class="col-sm-1 col-form-label col-form-label-sm text-center">작성일시</label>
<div class="col-sm-2">
<input type="text" class="form-control" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
<input type="text" class=" form-control form-control-sm" id="wrtDt" name="wrtDt" th:value="${#temporals.format(info.wrtDt, 'yyyy-MM-dd HH:mm')}" readonly>
</div>
<div class="col-sm-auto my-auto">
<input type="checkbox" id="organChk" name="organChk" value="T" th:checked="${info.organChk eq 'T'}">
</div>
<label for="organChk" class="col-sm-2 col-form-label text-left">소속관서에만 노출</label>
<label for="organChk" class="col-sm-2 col-form-label col-form-label-sm text-left">소속관서에만 노출</label>
<!-- <div class="col-sm-2" >-->
<!-- <select class="form-select form-select-sm" name="tabStatusList" id="tabStatusList" style="font-size: 1rem">-->
<!-- <option value="">메뉴 선택-</option>-->
@ -42,7 +42,7 @@
<!-- </select>-->
<!-- </div>-->
<div class="col-sm-2">
<select class="form-select form-select-sm" name="tabStatus" id="tabStatus" style="font-size: 1rem">
<select class="form-select form-select-sm" name="tabStatus" id="tabStatus">
<option value="">분류 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('RPC')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}">
@ -53,20 +53,20 @@
</div>
<div class="row mb-1">
<label for="title" class="col-sm-2 col-form-label text-center">제목</label>
<label for="title" class="col-sm-2 col-form-label col-form-label-sm text-center">제목</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="title" name="title" th:value="${info.title}" autocomplete="off">
<input type="text" class=" form-control form-control-sm" id="title" name="title" th:value="${info.title}" autocomplete="off">
</div>
</div>
<div class="row mb-1 justify-content-center">
<label for="content" class="col-sm-2 col-form-label text-center">내용</label>
<label for="content" class="col-sm-2 col-form-label col-form-label-sm text-center">내용</label>
<div class="col-sm-10">
<div id="editor"></div>
<textarea id="content" class="d-none" th:utext="${info.content}"></textarea>
</div>
</div>
<div class="row mb-3">
<label for="fileInputer" class="col-sm-2 col-form-label text-center">첨부파일</label>
<label for="fileInputer" class="col-sm-2 col-form-label col-form-label-sm text-center">첨부파일</label>
<div class="col-sm-10" style="min-height: 70px;">
<div class="w-100 h-100 border border-info rounded text-center" id="uploadDiv">
<th:block th:if="${#arrays.isEmpty(info.fileList)}">