update
This commit is contained in:
@@ -33,16 +33,10 @@ public class PortalApiController {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/actuator/health-portal")
|
||||
@GetMapping("/actuator/health-info")
|
||||
public String status() {
|
||||
return String.format("GET Portal Service on" +
|
||||
"\n local.server.port :" + env.getProperty("local.server.port")
|
||||
+ "\n token expiration time :" + env.getProperty("token.expiration_time")
|
||||
+ "\n egov.server.ip :" + env.getProperty("egov.server.ip")
|
||||
+ "\n spring.datasource.username :" + env.getProperty("spring.datasource.username")
|
||||
+ "\n spring.profiles.active :" + env.getProperty("spring.profiles.active")
|
||||
+ "\n spring.cloud.config.label :" + env.getProperty("spring.cloud.config.label")
|
||||
+ "\n spring.cloud.config.uri :" + env.getProperty("spring.cloud.config.uri")
|
||||
+ "\n egov.message :" + env.getProperty("egov.message")
|
||||
);
|
||||
}
|
||||
@@ -52,13 +46,10 @@ public class PortalApiController {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/actuator/health-portal")
|
||||
@PostMapping("/actuator/health-info")
|
||||
public String poststatus() {
|
||||
return String.format("POST Portal Service on" +
|
||||
"\n local.server.port :" + env.getProperty("local.server.port")
|
||||
+ "\n token expiration time :" + env.getProperty("token.expiration_time")
|
||||
+ "\n egov.server.ip :" + env.getProperty("egov.server.ip")
|
||||
+ "\n spring.datasource.username :" + env.getProperty("spring.datasource.username")
|
||||
+ "\n egov.message :" + env.getProperty("egov.message")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,30 +1,17 @@
|
||||
package org.egovframe.cloud.portalservice.api.banner;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.egovframe.cloud.portalservice.api.banner.dto.BannerImageResponseDto;
|
||||
import org.egovframe.cloud.portalservice.api.banner.dto.BannerListResponseDto;
|
||||
import org.egovframe.cloud.portalservice.api.banner.dto.BannerRequestDto;
|
||||
import org.egovframe.cloud.portalservice.api.banner.dto.BannerResponseDto;
|
||||
import org.egovframe.cloud.portalservice.api.banner.dto.BannerSaveRequestDto;
|
||||
import org.egovframe.cloud.portalservice.api.banner.dto.BannerUpdateRequestDto;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.egovframe.cloud.portalservice.api.banner.dto.*;
|
||||
import org.egovframe.cloud.portalservice.service.banner.BannerService;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.web.PageableDefault;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* org.egovframe.cloud.portalservice.api.banner.BannerApiController
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package org.egovframe.cloud.portalservice.api.banner.dto;
|
||||
|
||||
import com.querydsl.core.annotations.QueryProjection;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.querydsl.core.annotations.QueryProjection;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* org.egovframe.cloud.portalservice.api.content.dto.BannerListResponseDto
|
||||
* <p>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package org.egovframe.cloud.portalservice.api.banner.dto;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.egovframe.cloud.portalservice.domain.banner.Banner;
|
||||
import org.egovframe.cloud.portalservice.domain.menu.Site;
|
||||
|
||||
import lombok.Getter;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* org.egovframe.cloud.portalservice.api.content.dto.BannerSaveRequestDto
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.egovframe.cloud.portalservice.api.content;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.egovframe.cloud.common.dto.RequestDto;
|
||||
import org.egovframe.cloud.portalservice.api.content.dto.ContentListResponseDto;
|
||||
import org.egovframe.cloud.portalservice.api.content.dto.ContentResponseDto;
|
||||
@@ -12,15 +11,9 @@ import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.web.PageableDefault;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* org.egovframe.cloud.portalservice.api.content.ContentApiController
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package org.egovframe.cloud.portalservice.api.privacy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.egovframe.cloud.common.dto.RequestDto;
|
||||
import org.egovframe.cloud.portalservice.api.privacy.dto.PrivacyListResponseDto;
|
||||
import org.egovframe.cloud.portalservice.api.privacy.dto.PrivacyResponseDto;
|
||||
@@ -14,15 +11,10 @@ import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.web.PageableDefault;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* org.egovframe.cloud.portalservice.api.privacy.PrivacyApiController
|
||||
|
||||
@@ -34,10 +34,9 @@ public class Resilience4JConfig {
|
||||
@Bean
|
||||
public Customizer<Resilience4JCircuitBreakerFactory> resilience4JCircuitBreakerFactoryCustomizer() {
|
||||
CircuitBreakerConfig circuitBreakerConfig = CircuitBreakerConfig.custom()
|
||||
.failureRateThreshold(50) // Circuit 열지 말지 결정하는 실패 threshold 퍼센테이지
|
||||
.waitDurationInOpenState(Duration.ofSeconds(5)) // (half closed 전에) circuitBreaker가 open 되기 전에 기다리는 기간
|
||||
.slidingWindowType(CircuitBreakerConfig.SlidingWindowType.COUNT_BASED) // circuit breaker count 기반 처리
|
||||
.slidingWindowSize(10) // 통계 대상 건수 -> N건의 요청중..
|
||||
.slidingWindowType(CircuitBreakerConfig.SlidingWindowType.TIME_BASED) // circuit breaker time 기반 처리
|
||||
.slowCallDurationThreshold(Duration.ofSeconds(10)) // 요청 지연으로 간주하는 시간
|
||||
.minimumNumberOfCalls(10) // 통계 최소 요청 건
|
||||
.build();
|
||||
|
||||
return circuitBreakerFactory -> circuitBreakerFactory.configureDefault(
|
||||
|
||||
@@ -455,7 +455,7 @@ public class AttachmentService extends AbstractService {
|
||||
for (Attachment attachment: attachmentList) {
|
||||
// 첨부파일 저장 후 기능 저장 시 오류 날 경우에만 첨부파일 전체 삭제를 하므로
|
||||
// entity 정보가 있는 경우에는 삭제하지 못하도록 한다.
|
||||
if (attachment.getEntityId() != null || StringUtils.hasText(attachment.getEntityId())) {
|
||||
if ((attachment.getEntityId() != null || StringUtils.hasText(attachment.getEntityId())) && !attachment.getEntityId().equals("-1")) {
|
||||
throw new BusinessMessageException(getMessage("valid.file.not_deleted"));
|
||||
}
|
||||
// 물리적 파일 삭제
|
||||
|
||||
@@ -118,7 +118,6 @@ public class BannerService extends AbstractService {
|
||||
*/
|
||||
@Transactional
|
||||
public BannerResponseDto save(BannerSaveRequestDto requestDto) {
|
||||
System.out.println("@@@@@@@@requestDto:"+requestDto);
|
||||
//site 정보 조회
|
||||
Site site = siteRepository.findById(requestDto.getSiteId())
|
||||
.orElseThrow(() ->
|
||||
|
||||
@@ -1,25 +1,9 @@
|
||||
package org.egovframe.cloud.portalservice.api.attachment;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.bouncycastle.util.encoders.Base64;
|
||||
import org.egovframe.cloud.portalservice.api.attachment.dto.AttachmentBase64RequestDto;
|
||||
import org.egovframe.cloud.portalservice.api.attachment.dto.AttachmentEditorResponseDto;
|
||||
import org.egovframe.cloud.portalservice.api.attachment.dto.AttachmentFileResponseDto;
|
||||
import org.egovframe.cloud.portalservice.api.attachment.dto.AttachmentResponseDto;
|
||||
import org.egovframe.cloud.portalservice.api.attachment.dto.AttachmentTempSaveRequestDto;
|
||||
import org.egovframe.cloud.portalservice.api.attachment.dto.AttachmentUpdateRequestDto;
|
||||
import org.egovframe.cloud.portalservice.api.attachment.dto.AttachmentUploadRequestDto;
|
||||
import org.egovframe.cloud.portalservice.api.attachment.dto.*;
|
||||
import org.egovframe.cloud.portalservice.domain.attachment.Attachment;
|
||||
import org.egovframe.cloud.portalservice.domain.attachment.AttachmentRepository;
|
||||
import org.egovframe.cloud.portalservice.service.attachment.AttachmentService;
|
||||
@@ -35,12 +19,7 @@ import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
@@ -48,9 +27,17 @@ import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Slf4j
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
|
||||
Reference in New Issue
Block a user