fix: chuncheon, cheonan 패키지 적용

main
Jonguk. Lim 3 months ago
parent 086f14539d
commit 5f699f331b

@ -79,11 +79,10 @@
<include>*</include>
<include>static/**/*</include>
<include>egovframework/**/*</include>
<include>config/application-${env}.yml</include>
<include>config/application.yml</include>
<include>config/application-app.yml</include>
<include>config/application-ens*</include>
<include>config/application-jpa.yml</include>
<include>config/application-${env}.yml</include>
<include>config/application-ens.yml</include>
</includes>
<filtering>true</filtering>
</resource>
@ -130,7 +129,16 @@
</execution>
</executions>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-javadoc-plugin</artifactId>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-jxr-plugin</artifactId>-->
<!-- </plugin>-->
</plugins>
</build>
</project>

@ -1,5 +1,11 @@
package kr.xit.ens.kakao.web;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
@ -14,11 +20,6 @@ import kr.xit.core.model.IApiResponse;
import kr.xit.ens.kakao.service.IAsyncKkopayEltrcDocService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <pre>
@ -49,7 +50,7 @@ public class AsyncKkopayEltrcDocController {
* -. .
* </pre>
* @param reqDTO KkopayDocDTO.SendRequest
* @return ApiResponseDTO<KkopayDocDTO.SendResponse>
* @return ApiResponseDTO{@literal <KkopayDocDTO.SendResponse>}
*/
@io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = {
@Content(mediaType = "application/json", examples = {

@ -1,16 +1,19 @@
### API 가이드
[카카오페이 문서발송 단건](./document/카카오페이내문서함_1.문서발송(단건).pdf)
[카카오페이 문서발송 대량](./document/카카오페이내문서함_1.문서발송(대량).pdf)
[카카오페이 문서발송 네트워크가이드](./document/카카오페이내문서함_1.네트워크가이드.pdf)
### swagger
[API URL](http://localhost:8081/swagger-ui.html)
[Front URL](http://localhost:8080/swagger-ui.html)
[Front test page](http://localhost:8080/api/kakaopay/test)
### API 결과 수신
* 정상 수신
```java
public class ApiResponseDTO<T> implements Serializable {
private static final String FAIL_STATUS = "fail";
@ -36,7 +39,9 @@ public class ApiResponseDTO<T> implements Serializable {
private int count;
}
```
* 정상 수신
```json
{
"success": true,
@ -58,7 +63,9 @@ public class ApiResponseDTO<T> implements Serializable {
"paginationInfo": null
}
```
* 에러 수신
```json
{
"success": false,
@ -70,44 +77,49 @@ public class ApiResponseDTO<T> implements Serializable {
"paginationInfo": null
}
```
* API 호출 결과가 서버등(네트웍장애)의 장애인 경우를 제외 하고
예외로 return 되는 경우는 없다(발생시 공통팀에 반드시 알려 줄 것)
예외로 return 되는 경우는 없다(발생시 공통팀에 반드시 알려 줄 것)
```js
$.ajax({
url: url,
type: method,
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify(data),
beforeSend: (xhr) => {
//xhr.setRequestHeader(header, token);
$("#loading").show();
},
success: function (res, textStatus) {
console.log( JSON.stringify(res));
if(res.success){
//정상 응답
$("#resData").text(res.data)
}else{
//에러 응답
$("#errData").text(JSON.stringify(res));
}
},
error : function(data) {
// 여기로 오는 경우 공통팀에 알려 주세요
alert("점검필요-error로 return", data.responseText);
},
complete: () => {
$("#loading").hide();
url: url,
type: method,
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify(data),
beforeSend: (xhr) => {
//xhr.setRequestHeader(header, token);
$("#loading").show();
},
success: function (res, textStatus) {
console.log(JSON.stringify(res));
if (res.success) {
//정상 응답
$("#resData").text(res.data)
} else {
//에러 응답
$("#errData").text(JSON.stringify(res));
}
});
},
error: function (data) {
// 여기로 오는 경우 공통팀에 알려 주세요
alert("점검필요-error로 return", data.responseText);
},
complete: () => {
$("#loading").hide();
}
});
```
### API(Restful call) validation
* Controller 단에서 @Validated 사용으로 처리 가능
* But, 이경우 API 로그를 남기기 위해 Service 단에서 체크 하도록 컨트롤러 단에서는 유효성 체크 skip
### spring validation
```text
@Valid는 Java, @Validated는 Spring에서 지원하는 어노테이션
@Validated@Valid의 기능을 포함하고, 유효성을 검토할 그룹을 지정할 수 있는 기능이 추가됨
@ -120,11 +132,11 @@ public class ApiResponseDTO<T> implements Serializable {
@NotBlank // null, "", " " 모두 허용하지 않습니다.
@Email // 이메일 형식을 검사합니다. 다만 ""의 경우를 통과 시킵니다
@Pattern(regexp = ) // 정규식을 검사할 때 사용됩니다.
@Size(min=, max=) // 길이를 제한할 때 사용됩니다.
@Pattern(regexp =) // 정규식을 검사할 때 사용됩니다.
@Size(min =, max =) // 길이를 제한할 때 사용됩니다.
@Max(value = ) // value 이하의 값을 받을 때 사용됩니다.
@Min(value = ) // value 이상의 값을 받을 때 사용됩니다.
@Max(value =) // value 이하의 값을 받을 때 사용됩니다.
@Min(value =) // value 이상의 값을 받을 때 사용됩니다.
@Positive // 값을 양수로 제한합니다.
@PositiveOrZero // 값을 양수와 0만 가능하도록 제한합니다.
@ -138,7 +150,9 @@ public class ApiResponseDTO<T> implements Serializable {
@AssertFalse // false 여부, null은 체크하지 않습니다.
@AssertTrue // true 여부, null은 체크하지 않습니다.
```
### intellij devtools 활성
```text
1. IntelliJ - Preferencs…
2. 컴파일러 - build project automatically(프로젝트 자동 빌드) 체크
@ -150,7 +164,9 @@ public class ApiResponseDTO<T> implements Serializable {
Modfy Options > On Update Action > Update Resources
```
### ens-api 배포 및 run : profile에 따라 local|dev|prod
```shell
# jdk : azul-17.0.1
# 프로젝트 root 폴더로 이동 : ens-parent
@ -163,9 +179,11 @@ $ c:\tools\java\azul-17.0.1\java -jar -Dspring.profiles.active=local .\ens-api.j
# mvn 명령어 설명
# -pl [모듈명] : 모듈명의 프로젝트만 빌드
# -am : 의존성 있는 프로젝트 함께 빌드 - C가 A를 디펜던시로 가지고 있으며 C를 빌드하면 A -> C 순으로 빌드
$ mvnw clean package -pl ens-api -am -P local
$ mvnw clean package -pl mens-api -am -P local
# -amd : 의존성 있는 타 프로젝트 빌드 - C가 A를 디펜던시로 가지고 있는 경우 A를 빌드 하면 A -> C 순으로 빌드
$ mvnw clean package -pl egov-core -amd -P local
```
### 스프링 배치 DB schema
[mysql DDL 스크립트](./document/batch-schema-mysql.sql)

@ -78,6 +78,10 @@
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
</dependency>
</dependencies>
@ -95,7 +99,6 @@
<include>config/application.yml</include>
<include>config/application-app.yml</include>
<include>config/application-ens.yml</include>
<include>config/application-jpa.yml</include>
<include>config/application-${env}.yml</include>
</includes>
<filtering>true</filtering>

@ -460,18 +460,6 @@
<directory>${basedir}/target</directory>
<finalName>${project.name}</finalName>
<!-- 코드 난독화 : proguard-->
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>${proguard-plugin-version}</version>
</plugin>
</plugins>
</pluginManagement>
<!-- 코드 난독화 : proguard -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -482,70 +470,6 @@
</excludes>
</configuration>
</plugin>
<!-- proguard -->
<!--
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<injar>${project.build.finalName}.jar</injar>
<outjar>${project.build.finalName}.jar</outjar>
<obfuscate>true</obfuscate>
<addMavenDescriptor>false</addMavenDescriptor>
<proguardInclude>proguard.cfg</proguardInclude>
<putLibraryJarsInTempDir>true</putLibraryJarsInTempDir>
<injarNotExistsSkip>true</injarNotExistsSkip>
<options>
<option>-target 17</option>
<option>-dontshrink</option>
<option>-dontnote</option>
<option>-dontwarn</option>
<option>-keepparameternames</option>
<option>-renamesourcefileattribute SourceFile</option>
<option>-keepattributes Signature,Exceptions,*Annotation*,
InnerClasses,PermittedSubclasses,EnclosingMethod,
Deprecated,SourceFile,LineNumberTable
</option>
<option>-keep public class * {
public protected *;
}
</option>
<option>-keepclasseswithmembernames,includedescriptorclasses class * {
native <![CDATA[<methods>]]>;
}
</option>
<option>-keepclassmembers,allowoptimization enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
</option>
<option>-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
</option>
</options>
<libs>
<lib>${java.home}/jmods/java.base.jmod</lib>
</libs>
</configuration>
</plugin-->
</plugins>
</build>
</project>

@ -1,9 +1,11 @@
package kr.xit.core.service;
import javax.annotation.Resource;
import kr.xit.core.spring.util.MessageUtil;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import kr.xit.core.spring.util.MessageUtil;
/**
* org.egovframe.cloud.common.service.AbstractService
* <p>
@ -14,7 +16,7 @@ import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
* @version 1.0
*
* <pre>
* << (Modification Information) >>
* (Modification Information)
*
*
* ---------- -------- ---------------------------

@ -3,8 +3,6 @@
#logMessageFormat
#filter
#exclude
#################################################################
# P6Spy Options File #
# See documentation for detailed instructions #
@ -34,7 +32,7 @@
# using a JDBC driver that does not implement the JDBC 4.0 API
# (specifically automatic registration).
#driverlist=org.mariadb.jdbc.Driver,com.p6spy.engine.spy.P6SpyDriver
driverlist=org.mariadb.jdbc.Driver
driverlist=org.mariadb.jdbc.Driver,oracle.jdbc.OracleDriver
# for flushing per statement
# (default is false)
#autoflush=false

@ -164,6 +164,7 @@
</executions>
<configuration>
<source>${maven.compiler.source}</source>
<!-- Java 8 은 Javadoc 에 대해서도 lint 를 수행 : 잘못된 doc이 있을 경우 warning이 아닌 error로 처리해서 javadoc 생성을 중지 -->
<doclint>none</doclint>
<minmemory>128m</minmemory>
@ -189,85 +190,37 @@
<reportOutputDirectory>${project.build.directory}</reportOutputDirectory>
<excludePackageNames>xit.core.init.custom.*</excludePackageNames>
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
<additionalJOption>-Xdoclint:none</additionalJOption>
<detectJavaApiLink>false</detectJavaApiLink>
</configuration>
</plugin>
<!-- Generating Java Source in HTML -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<configuration>
<inputEncoding>${project.encoding}</inputEncoding>
<outputEncoding>${project.encoding}</outputEncoding>
<linkJavadoc>true</linkJavadoc>
<javadocDir>apidocs</javadocDir>
<destDir>xref</destDir>
<windowTitle>${project.name} - Source Code</windowTitle>
</configuration>
<executions>
<execution>
<id>generate-xref</id>
<phase>site</phase>
<goals>
<goal>jxr</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
<reporting>
<!--outputDirectory>${basedir}/target/site</outputDirectory-->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<!--version>3.3.0</version-->
<reportSets>
<reportSet>
<id>sunlink</id>
<reports>
<report>javadoc</report>
</reports>
<inherited>true</inherited>
<configuration>
<links>
<link>https://docs.oracle.com/javase/8/docs/api/</link>
</links>
</configuration>
</reportSet>
</reportSets>
</plugin>
<!-- JUnit Test Results & EMMA Coverage Reporting -->
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>surefire-report-maven-plugin</artifactId>
<inherited>true</inherited>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
-->
<!-- Generating JavaDoc Report -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<!-- Generating Java Source in HTML -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<configuration>
<inputEncoding>${project.encoding}</inputEncoding>
<outputEncoding>${project.encoding}</outputEncoding>
<linkJavadoc>true</linkJavadoc>
<javadocDir>apidocs</javadocDir>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<!-- default : local configuration -->
<profile>

Loading…
Cancel
Save