commit 0dfac544cee7c52af25a93fa8fa4dce93476bb52 Author: MonHun Date: Sun Feb 11 22:21:18 2024 +0900 win 0211 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..bf82ff0 Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..ca5ab4b --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/cfg/udpsocket.xml b/cfg/udpsocket.xml new file mode 100644 index 0000000..a3565fd --- /dev/null +++ b/cfg/udpsocket.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/ipworks/local/1.0.0/ipworks-local-1.0.0.jar b/lib/ipworks/local/1.0.0/ipworks-local-1.0.0.jar new file mode 100644 index 0000000..557d507 Binary files /dev/null and b/lib/ipworks/local/1.0.0/ipworks-local-1.0.0.jar differ diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..1d8ab01 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,188 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..ab35e82 --- /dev/null +++ b/pom.xml @@ -0,0 +1,106 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.7.16 + + + kr.gmtc.gw + + standstatus + 0.0.1-SNAPSHOT + EyeGW_StandStatus + Demo project for Spring Boot + + + + local-repository + local-repository + file:${project.basedir}/lib + + + + + 1.8 + + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + + kr.gmt.so + state-spring-boot-starter + 1.0.3 + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.projectlombok + lombok + 1.18.30 + provided + + + + + ipworks.local + ipworks-local-1.0.0 + system + 1.0.0 + ${basedir}/lib/ipworks/local/1.0.0/ipworks-local-1.0.0.jar + + + + + org.yaml + snakeyaml + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + com.fasterxml.jackson.core + jackson-databind + + + + + + EyeGW_StandStatus + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + + diff --git a/src/main/java/kr/gmtc/gw/comp/thread/CustomThread.java b/src/main/java/kr/gmtc/gw/comp/thread/CustomThread.java new file mode 100644 index 0000000..db977f4 --- /dev/null +++ b/src/main/java/kr/gmtc/gw/comp/thread/CustomThread.java @@ -0,0 +1,113 @@ +package kr.gmtc.gw.comp.thread; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import kr.gmtc.gw.comp.thread.handler.CustomThreadOnTerminate; +import kr.gmtc.gw.comp.thread.handler.CustomThreadWork; + +public class CustomThread extends Thread{ + + /* 대기시간 없음 */ + public static final long NO_SLEEP = 0; + /* 1밀리 초 */ + public static final long SLEEP_MILLI_SEC = 1; + /* 1초 */ + public static final long SLEEP_SECOND = 1000; + /* 30초 */ + public static final long SLEEP_HALF_MINIUTE = 30000; + /* 1분 */ + public static final long SLEEP_MINIUTE = 60000; + + public final String controllClassName; + public final long repeatMiliSec; + public final CustomThreadWork definedWork; + public final CustomThreadOnTerminate definedTerminate; + public final Logger logger; + private boolean running; + + /** + * 인터럽트를 받을 시 스레드가 종료됨.
+ * {@link Thread#sleep(long)} 기반으로 재실행 간격을 설정하므로 정확한 실행시간을 보장하지 않음.
+ * 정확한 실행시간 보장이 필요 할 경우 sleep 간격을 짧게 설정하고 호출위치에서 시간확인
+ * 정상적인 종료는 {@link #gracefulStop()}으로 종료함 + * @param threadName 스레드 이름 + * @param controllClass 스레드 관리 클래스, 일반적으로 this 사용 + * @param repeatMiliSec Sleep 시간(밀리 초), 0이하의 경우 대기시간 없음 + * @param definedWork 반복할 작업 + * @param definedTerminate 스레드가 인터럽트에 의해 종료될 경우 할 작업 + * @param autoStart 생성즉시 실행 + */ + + public CustomThread(String threadName, Object controllClass, long repeatMiliSec, + CustomThreadWork definedWork, CustomThreadOnTerminate definedTerminate, boolean autoStart) { + + if (definedWork == null) { + throw new IllegalArgumentException("[CustomThread] - definedWork is null."); + } + + this.definedWork = definedWork; + this.definedTerminate = definedTerminate; + this.controllClassName = controllClass == null ? "" : controllClass.getClass().getSimpleName(); + this.repeatMiliSec = repeatMiliSec > 0 ? repeatMiliSec : 0; + this.logger = LoggerFactory.getLogger(CustomThread.class); + this.running = false; + + setName(threadName); + setDaemon(true); + if (autoStart) { + this.start(); + } + } + + + @Override + public void run() { + logger.info("[CustomThread] Started."); + while ( this.running && !this.isInterrupted()) { + try { + try { + this.definedWork.work(); + } finally { + if (this.repeatMiliSec > 0) { + Thread.sleep(this.repeatMiliSec); + } + } + } catch(InterruptedException e) { // 인터럽트 수신시 종료 + logger.error("[CustomThread] Interrupted. "+ e.toString()); + Thread.currentThread().interrupt(); + break; + } catch(Exception e) { // 처리되지 않은 예외 로깅, 예외에 의한 무한루프에 주의 + logger.error("[CustomThread] Unknown Exception Occur. " + e.toString()); + } + } + + if(this.definedTerminate != null) { + this.definedTerminate.onTerminate(); + } + + logger.error("[CustomThread] Stoped."); + + } + + @Override + public String toString() { + + return "CustomThread [controllClass=" + this.controllClassName + ", threadName=" + getName() + + ", runnig=" + this.running + ", alive=" + isAlive()+ ", repeatMiliSec=" + this.repeatMiliSec + + ", definedTerminate=" + (this.definedTerminate == null ? "no" : "yes") + "]"; + } + + @Override + public synchronized void start() { + this.running = true; + super.start(); + } + + /** + * 스레드 정상종료, 진행중인 작업 완료 후 종료됨. + */ + public void gracefulStop() { + this.running = false; + } +} diff --git a/src/main/java/kr/gmtc/gw/comp/thread/handler/CustomThreadOnTerminate.java b/src/main/java/kr/gmtc/gw/comp/thread/handler/CustomThreadOnTerminate.java new file mode 100644 index 0000000..8f6930b --- /dev/null +++ b/src/main/java/kr/gmtc/gw/comp/thread/handler/CustomThreadOnTerminate.java @@ -0,0 +1,6 @@ +package kr.gmtc.gw.comp.thread.handler; + +@FunctionalInterface +public interface CustomThreadOnTerminate { + public void onTerminate(); +} diff --git a/src/main/java/kr/gmtc/gw/comp/thread/handler/CustomThreadWork.java b/src/main/java/kr/gmtc/gw/comp/thread/handler/CustomThreadWork.java new file mode 100644 index 0000000..4d3d156 --- /dev/null +++ b/src/main/java/kr/gmtc/gw/comp/thread/handler/CustomThreadWork.java @@ -0,0 +1,6 @@ +package kr.gmtc.gw.comp.thread.handler; + +@FunctionalInterface +public interface CustomThreadWork { + public void work() throws Exception; +} diff --git a/src/main/java/kr/gmtc/gw/standstatus/DevApplication.java b/src/main/java/kr/gmtc/gw/standstatus/DevApplication.java new file mode 100644 index 0000000..e566806 --- /dev/null +++ b/src/main/java/kr/gmtc/gw/standstatus/DevApplication.java @@ -0,0 +1,49 @@ +package kr.gmtc.gw.standstatus; + +import java.time.ZoneId; +import java.util.TimeZone; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.ApplicationPidFileWriter; +import org.springframework.boot.system.ApplicationHome; +import org.springframework.scheduling.annotation.EnableScheduling; + +@EnableScheduling +@SpringBootApplication +public class DevApplication { + // implements CommandLineRunner + // @Autowired + // private ApplicationContext appContext; + + public static void main(String[] args) { + //SpringApplication.run(SocketApplication.class, args); + ApplicationHome home = new ApplicationHome(DevApplication.class); + String root = home.getDir().getPath(); + + System.setProperty("user.dir", root); + + // TimeZone.setDefault(TimeZone.getTimeZone(ZoneId.of("UTC"))); + + Thread.currentThread().setName("JVM - Main"); + + SpringApplication springApplication = new SpringApplication(DevApplication.class); + + springApplication.addListeners(new ApplicationPidFileWriter("./application.pid")); + springApplication.run(args); + + } + + // @Override + // public void run(String...args) throws Exception { + + // String [] beans = appContext.getBeanDefinitionNames(); + // Arrays.sort(beans); + // for(String bean : beans ){ + // System.out.println(bean); + // } + + + // } + +} diff --git a/src/main/java/kr/gmtc/gw/standstatus/config/ServiceConfig.java b/src/main/java/kr/gmtc/gw/standstatus/config/ServiceConfig.java new file mode 100644 index 0000000..415cf0e --- /dev/null +++ b/src/main/java/kr/gmtc/gw/standstatus/config/ServiceConfig.java @@ -0,0 +1,27 @@ +package kr.gmtc.gw.standstatus.config; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.annotation.PostConstruct; + +import java.util.*; +import java.util.concurrent.LinkedBlockingQueue; + +@Configuration("ServiceConfig") +public class ServiceConfig { + + @Value("${root}") + private String root; + + @PostConstruct + private void initialize() { + } + + @Bean(name = "packetQ") + public Queue packetQ(){ + return new LinkedBlockingQueue(); + } + +} diff --git a/src/main/java/kr/gmtc/gw/standstatus/controller/MainController.java b/src/main/java/kr/gmtc/gw/standstatus/controller/MainController.java new file mode 100644 index 0000000..9761e37 --- /dev/null +++ b/src/main/java/kr/gmtc/gw/standstatus/controller/MainController.java @@ -0,0 +1,61 @@ +package kr.gmtc.gw.standstatus.controller; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationListener; +import org.springframework.context.event.ContextClosedEvent; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import kr.gmt.so.state.StateManager; +import kr.gmt.so.state.callback.IState; +import kr.gmt.so.state.model.SystemType; + +@Component("controller") +public class MainController implements ApplicationListener { + + @Autowired + private StateManager sm; + + public Logger logger; + + public MainController(StateManager sm){ + + this.logger = LoggerFactory.getLogger(MainController.class); + + this.sm = sm; + + sm.updateState(); + + // sm.isActive(); + + // sm.isActive("DT0201", SystemType.Primary); + + // sm.setCallback(new IState() { + // @Override + // public void onState(String ID, String Type, String State, boolean isActive) { + // logger.info("[STATE] {},{},{},{}", ID, Type, State, isActive); + // } + // }); + } + + @Scheduled(fixedRate = 1000 * 10) // 10초에 1번 + public void testSchduler() { + + if(sm.isActive()){ + logger.info("************************** Active **************************"); + } + + sm.updateState(); + } + + @Override + public void onApplicationEvent(ContextClosedEvent event) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'onApplicationEvent'"); + } + + + +} diff --git a/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000..97652e2 --- /dev/null +++ b/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,42 @@ +{"properties": [ + { + "name": "root", + "type": "java.lang.String", + "description": "A description for 'root'" + }, + { + "name": "asde.filepath1", + "type": "java.lang.String", + "description": "A description for 'asde.filepath1'" + }, + { + "name": "asde.filepath2", + "type": "java.lang.String", + "description": "A description for 'asde.filepath2'" + }, + { + "name": "asde.service", + "type": "java.lang.String", + "description": "A description for 'asde.service'" + }, + { + "name": "asde.service.queueCount", + "type": "java.lang.String", + "description": "A description for 'asde.queueCount'" + }, + { + "name": "asde.service.clearQ.max-count", + "type": "java.lang.String", + "description": "A description for 'asde.clearQ.max-count'" + }, + { + "name": "asde.service.clearQ.diff-time", + "type": "java.lang.String", + "description": "A description for 'asde.clearQ.diff-time'" + }, + { + "name": "asde.service.clearQ.clearTime", + "type": "java.lang.String", + "description": "A description for 'asde.clearQ.clearTime'" + } +]} \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..ef2208c --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,54 @@ +spring: + profiles: + active: default + group: + default: + - winTest + +--- +spring: + config: + activate: + on-profile: default + +server: + port: 18082 + tomcat: + # accept-count: 0 + # threads: + # max: 1 # 1이상인경우 Queue데이터 rest서비스할때 비정상 처리될 수 있음. + # keep-alive-timeout: 0 # Default: connectionTimeout = 60000(60s), 0이상인경우 비정상 처리됨 + # max-keep-alive-requests: 0 # Default: 100, 0이상인경우 rest 서비스 속도 느려짐 + # # max-connections: 3 # Default: 8192 + accesslog: + directory: ${root}/wasLog/ + enabled: true + file-date-format: .yyyy-MM-dd + max-days: 14 + pattern: '%h %l %u %t "%r" %s %b %D' + prefix: was_access + rotate: true + suffix: .log + +--- +spring: + config: + activate: + on-profile: real + +root: /home/gmt/app/EyeGW_AsdeRecv + +--- +spring: + config: + activate: + on-profile: winTest + +root: D:\Workspace\Odroid_repository\EyeGW_CompDev + +state: + # 공통코드 CT001의 코드 6자리 + id: DT0201 + # 1:Primary, 2:Secondary + type: Secondary + diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..2d2907c --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${LOG_PATTERN} + + + + + + + + + INFO + + + + ${LOG_PATH}${PATH_SEPARATOR}${LOG_FILE_NAME}.log + + + + ${FILE_LOG_PATTERN} + + + + + + ${LOG_PATH}${PATH_SEPARATOR}%d{yyyyMM,aux}${PATH_SEPARATOR}%d{yyyyMMdd}.log + + 10 + + 100mb + + true + + + + + + + false + 0 + 1024 + true + + + + + + + + + + + + + + + \ No newline at end of file