버전 업데이트
가이드 version 2.2.0
제•개정이력
버전 | 제•개정 페이지 및 내용 | 제•개정 일자 |
---|---|---|
v1.0 | 최초작성 | 2020-02-20 |
v1.2.1 | 버전 패치 내역 추가 | 2020-03-16 |
v1.2.2 | 버전 패치 내역 추가 | 2020-05-27 |
v2.0.0 | 버전 패치 내역 추가 | 2020-07-07 |
v2.0.2 | 버전 패치 내역 추가 | 2020-10-08 |
v2.0.3 | 버전 패치 내역 추가 | 2020-11-09 |
v2.0.4 | 버전 패치 내역 추가 | 2020-11-26 |
v2.1.0 | 버전 패치 내역 추가 | 2021-04-12 |
v2.2.0 | 버전 패치 내역 추가 | 2021-09-30 |
목 차 (Table of Content)
[toc]
(공통)패치 가이드
패치 내역
전달된 패치 파일의 압축을 해제하여 ‘readme.txt’ 파일을 확인한다.
(파일명 : chamomile-distribution-[버전]-[날짜]-[SHA]-bin.zip)
패치 파일 구조
압축 해제된 폴더의 구조는 아래와 같다.
(파일명 : chamomile-distribution-[버전]-[날짜]-[SHA]-bin.zip)
항목 | 유형 | 설명 |
---|---|---|
adapter-jars | 폴더 | Nexacro, websquare등을 사용 할 때 필요한 라이브러리 모음 |
docs | 폴더 | Chamomile이용시 필요한 각종 개발/운영가이드, javadoc |
jars | 폴더 | Chamomile이용시 필요한 각종 라이브러리 모음(chamomile라이브러리 포함) |
sql | 폴더 | Chamomile이용시 기본적으로 생성될 DDL, DML |
chamomile-admin-[버전].war | 파일 | Chamomile admin의 패키지 파일 |
chamomile-batch-[버전]-dist.tar.gz | 파일 | Chamomile batch application 구동 파일 |
chamomile-mobile-api[버전].war | 파일 | Chamomile 모바일 개발을 위한 API 가이드 서버 |
chamomile-mobile-appstore[버전].war | 파일 | Chamomile 모바일 배포를 위한 Private AppStore 서버 |
license.txt | 파일 | 라이선스 파일 |
readme.txt | 파일 | 패치 내역 파일 |
라이브러리 패치
라이브러리 패치는 온라인인 경우 아래와 같이 pom.xml 파일 내 chamomile.version을 변경하여 적용한다. (라이브러리가 변경 된 경우 캐모마일 라이브러리 배포 서버로부터 내려 받는다.)
<project>
...
<properties>
<chamomile.version>{변경 된 버전으로 변경}</chamomile.version>
</properties>
</project>
프로젝트 환경이 오프라인이어서 별도의 레파지토리로 구성된 경우 배포 된 배포 파일 내 repositories 폴더내 내용을 복사하여 별도 레파지토리로 복사한다.
JAR 복사 (v1.2 버전 아래인 경우 적용.)
jars폴더내의 필요한 jar파일들을 개발/운영 중인 프로젝트에 복사한다(기존 파일은 삭제 한다)
![](media/3dec149632fa071a3423affed4e20449.png)
pom.xml 파일내 버전을 변경한다 (v1.2 버전 아래인 경우 적용.)
![](media/8da1256e1f3fe9f9aeb4308601e70afd.png)
ADMIN 패치
chamomile-admin-[버전].war 파일을 “개발환경가이드_[버전].pdf” 파일 내 “administrator 설정” 항목을 참조 하여 admin을 추가한다.
(상세)버전별 패치 가이드
1.0.0에서 1.1.0 버전으로 업데이트
1.1.0 버전 업데이트
1.0.0버전에서 1.1.0 버전으로 업데이트 하는 방법은 아래와 같다. 전달받은 설치 파일과 개발도구를 준비하여 아래와 같은 순으로 진행한다.
DDL 변경사항 적용
라이브러리 변경사항 적용
프레임워크 변경사항 적용 (개발도구에서 신규 프로젝트 생성 후 해당 리소스 활용하여 적용)
DDL 변경 사항
| +- CHMM_SERVICE_CONTROL_INFO : SERVICE_ID VARCHAR (PK) 추가
| +- CHMM_REST_INFO : SERVICE_BASEURL VARCHAR(1024) 추가.
| +- CHMM_REST_HIS : SERVICE_BASEURL VARCHAR(1024) 추가.
라이브러리 변경 사항
| +- chamomile 관련 라이브러리 버전 업데이트 (1.0.0 -> 1.1.0)
| +- 신규 라이브러리
| | +- chamomile-integration-service-1.1.0.jar
| +- 신규 의존성 라이브러리
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-redis</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<!-- 2.6.1 -->
<version>${redis.clients.jedis.version}</version>
</dependency>
<dependency>
<groupId>it.ozimov</groupId>
<artifactId>embedded-redis</artifactId>
<version>0.7.2</version>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
<version>1.3.5.RELEASE</version>
<type>pom</type>
</dependency>
프레임워크 변경 사항
src/main/resources
| +- config
| | +- cache 폴더 삭제 (ehcache -> redis 캐시 사용)
| | +- redis.properties 추가
| | +- rest.properties 삭제
| | +- rminfosync.properties 파일 내 serviceId.provider=propertyServiceIdProvider 추가.
| | +- serviceintegration.properties 추가
| +- spring
| | +- context-cache.xml 파일 변경 (cacheManager 변경)
| | +- context-common.xml 파일 변경
| | | +- component-scan 디렉토리 변경 (net.lotte.chamomile.admin -> net.lotte.chamomile.api)
| | | +- propertyConfigurer의 properties 파일 추가
| | +- context-file.xml 파일 내 fileManager 삭제
| | +- context-integration.xml 파일 추가
| | +- context-mapper.xml. 파일 내 sqlSessionFactory의 admin location 삭제
| | +- context-redis.xml 파일 추가
| | +- context-rest.xml 파일 삭제
| | +- context-security.xml 파일
| | | +- http admin 설정 제거 후 서비스 설정 추가
| | | +- adminLogin{success|failure}Handler 제거
| | | +- reloadableRoleHierarchy 속성으로 cacheManager 추가
| +- sql
| | +- admin 폴더 삭제
| +- log4j.xml 설정 변경 (monitor 관련 rewrite 제거)
src/main/webapp
| +- WEB-INF
| | +- files 폴더 삭제
| | +- lib : chamomile 라이브러리 업데이트
| | +- spring
| | | +- context-servlet.xml 파일 변경
| | | | +- component-scan 디렉토리 변경 (net.lotte.chamomile.admin -> net.lotte.chamomile.api)
| | +- tiles 폴더 삭제
| | +- tlds 폴더 삭제
| | +- views
| | | +- admin 폴더 삭제
| | | +- cmm 폴더 삭제
| | | +- main 폴더 삭제
| | | +- template 폴더 삭제
| | +- web.xml 파일 변경
| | | +- tilesConfiugurer 및 tilesView 제거
| | | +- interceptors의 admin 관련 exclude-mapping 제거
| | | +- method trace log 관련 admin 제거하고, 사용자 패키지 명시
| | | +- propertyServiceIdProvider 추가.
| | | +- websocket handlers 2개 제거.
1.1.0에서 1.1.1 버전으로 업데이트
1.1.1 버전 업데이트
1.1.0버전에서 1.1.1 버전으로 업데이트 하는 방법은 아래와 같다. 전달받은 설치 파일과 개발도구를 준비하여 아래와 같은 순으로 진행한다.
DDL 변경사항 적용
라이브러리 변경사항 적용
어드민 패치
DDL 변경 사항
각 DBMS별 DML파일에 다국어 관리 테이블 메시지 코드 추가
CHMM_MESSAGE_SOURCE_INFO 테이블에 아래와 같이popup.title.parameter.type.mvc.list 각 나라별 메시지코드를 추가해줘야한다.
* Mysql, maria, mssql
INSERT INTO CHMM_MESSAGE_SOURCE_INFO ( ..)
SELECT 'en', 'US', 'popup.title.parameter.type.mvc.list', 'Parameters type', '1', NULL, NULL, NULL, NULL UNION ALL
SELECT 'ko', 'KR', 'popup.title.parameter.type.mvc.list', '파라미터 타입', '1', NULL, NULL, NULL, NULL UNION ALL
SELECT 'zn', 'CN', 'popup.title.parameter.type.mvc.list', '参数类型', '1', NULL, NULL, NULL, NULL UNION ALL
* Oracle, tibero
INSERT INTO CHMM_MESSAGE_SOURCE_INFO( .. )
SELECT 'en', 'US', 'popup.title.parameter.type.mvc.list', 'Parameters type', '1', NULL, NULL, NULL, NULL FROM dual UNION ALL
SELECT 'ko', 'KR', 'popup.title.parameter.type.mvc.list', '파라미터 타입', '1', NULL, NULL, NULL, NULL FROM dual UNION ALL
SELECT 'zn', 'CN', 'popup.title.parameter.type.mvc.list', '参数类型', '1', NULL, NULL, NULL, NULL FROM dual UNION ALLㅍ
라이브러리 변경 사항
1.3 항목을 참고하여 라이브러리 버전 업데이트
어드민 패치
1.4 항목을 참고하여 어드민 패치
1.1.1에서 1.1.2 버전으로 업데이트
1.1.2 버전 업데이트
1.1.1버전에서 1.1.2 버전으로 업데이트 하는 방법은 아래와 같다. 전달받은 설치 파일과 개발도구를 준비하여 아래와 같은 순으로 진행한다.
- 라이브러리 변경사항 적용
라이브러리 변경 사항
1.3 항목을 참고하여 라이브러리 버전 업데이트
1.1.2에서 1.2.0 버전으로 업데이트
1.1.2 버전 업데이트
1.1.2부터 스프링 부트 지원에 따른 ‘스프링’ 버전과 ‘스프링부트’ 버전 업데이트를 각각 가이드한다.
1.1.2버전에서 1.2.0 버전으로 업데이트 하는 방법은 아래와 같다. 전달받은 설치 파일과 개발도구를 준비하여 아래와 같은 순으로 진행한다.
라이브러리 변경사항 적용
프로퍼티 파일 변경
신규 프로퍼티
파일 변경 및 이동
pom.xml 변경
어드민 패치
라이브러리 변경 사항(공통)
1.3 항목을 참고하여 라이브러리 버전 업데이트
프로퍼티 파일 변경(공통)
각각의 프로퍼티 파일이 application.properties 파일 한 개로 통합되었다.
이름이 불명확한 key이름이 변경되었다.
변경해야될 내용은 아래와 같다.
- 기존 파일 목록({프로젝트}/src/main/resources/config 디렉토리 이하) 백업 후 삭제
aoplog.properties
file.properties
property.properties
pushmsg.properties
redis.properties
rest.properties
rminfosync.properties
scouter.properties
serviceintegration.properties
smtp.properties
jdbcs.properties
신규 파일 생성 ({프로젝트}/src/main/resources/application.properties)
기존 프로퍼티를 신규 파일로 마이그레이션
chmm.aoplog.onoff <- aoplog.onoff
chmm.file.dir <- file.dir
chmm.file.upload.tableName <- upload.tableName
chmm.file.upload.allowExtensionKey <- upload.allowExtensionKey
chmm.file.upload.maxSizeKey <- upload.maxSizeKey
chmm.file.upload.column <- upload.column
chmm.jdbc.driverClassName <-- jdbc.driverClassName
chmm.jdbc.url <-- jdbc.url
chmm.jdbc.username <-- jdbc.username
chmm.jdbc.password <-- jdbc.password
chmm.property.table <-- property.table
chmm.property.key.column <-- property.key.column
chmm.property.value.column <-- property.value.column
chmm.push.telegram.token <-- telegram.token
chmm.push.alimtalk.host <-- alimtalk.host
chmm.push.alimtalk.port <-- alimtalk.port
chmm.push.alimtalk.tokenPath <-- alimtalk.tokenPath
chmm.push.alimtalk.clientId <-- alimtalk.clientId
chmm.push.alimtalk.clientPwd <-- alimtalk.clientPwd
chmm.push.alimtalk.alimTalkPath <-- alimtalk.alimTalkPath
chmm.push.alimtalk.msgId <-- alimtalk.msgId
chmm.push.alimtalk.sendTime <-- alimtalk.sendTime
chmm.push.alimtalk.sendPhone <-- alimtalk.sendPhone
chmm.push.alimtalk.templateCode <-- alimtalk.templateCode
chmm.push.alimtalk.senderKey <-- alimtalk.senderKey
chmm.redis.hostName <-- redis.hostName
chmm.redis.port <-- redis.port
chmm.redis.usePool <-- redis.usePool
chmm.restTest.id <-- rest.id
chmm.restTest.password <-- rest.password
chmm.restTest.defUrl <-- rest.defUrl
chmm.requestMappingSync.batch.use <-- batch.use
chmm.requestMappingSync.delete.use <-- delete.use
chmm.requestMappingSync.serviceId.provider <-- serviceId.provider
chmm.scouter.ip <- ip
chmm.scouter.port <- port
chmm.scouter.timeLength <- timeLength
chmm.serviceintegration.healthCheck.interval <- service.healthcheck.interval
chmm.serviceintegration.registration.interval <- service.registration.interval
chmm.serviceintegration.authentication.loginUrl <- service.authentication.loginUrl
chmm.serviceintegration.authentication.id <- service.authentication.id
chmm.serviceintegration.authentication.pw <- service.authentication.pw
chmm.serviceintegration.serviceId <- service.id
chmm.serviceintegration.serviceAddress <- service.address
chmm.serviceintegration.registration.interval <- service.registration.interval
chmm.smtp.address <-- smtp.address
chmm.smtp.port <-- smtp.port
chmm.smtp.id <-- smtp.id
chmm.smtp.pw <-- smtp.pw
신규 프로퍼티(공통)
context-datasource.xml에 정의되어있는 트랜잭션 포인트컷 패키지를 프로퍼티에서 선언한다.
예시)
##Transaction Pointcut
chmm.txPointcut.expression=(execution(* net.lotte.sample..*ServiceImpl.*(..)) or execution(* net.lotte.chamomile.core.servlet.mvc.method.RequestMappingInfoSynchronization.*(..)))
신규 프로퍼티(부트 포팅 한정)
context-common.xml에 정의되어있는 메서드 트레이스 포인트컷 패키지를 프로퍼티에서 선언한다.
예시)
##MethodTrace Pointcut
chmm.methodTracePointcut.expression=(execution(* net.lotte.sample..*Controller.*(..)) or execution(* net.lotte.sample..*ServiceImpl.*(..)) or execution(* net.lotte.sample..*DAO.*(..)))
파일 변경 및 이동(공통)
{프로젝트}/src/main/resources/config/mask 디렉토리를 {프로젝트}/src/main/resources로 이동한다.
{프로젝트}/src/main/resources/config 디렉토리를 삭제한다. (cache, properties 파일들 포함)
파일 변경 및 이동(부트 포팅 한정)
{프로젝트}/src/main/resources/spring에 있는 이하 파일들을 삭제한다.
context-aoplog.xml
context-cache.xml
context-common.xml
context-datasource.xml
context-file.xml
context-integration.xml
context-mapper.xml
context-redis.xml
context-security.xml
pom.xml 변경(공통)
IDE(패치 전)를 통해 초기 세팅 pom.xml과 현재 프로젝트의 pom.xml을 비교하여 프로젝트에서 추가된 라이브러리를 백업한다.
기존 pom.xml을 삭제하고 IDE(패치 후)를 통해 새로운 pom.xml로 변경한다.
스프링과 스프링부트의 pom.xml이 다르므로 주의한다.
백업했던 라이브러리를 새로운 pom.xml에 추가한다.
1.2.0에서 1.2.1 버전으로 업데이트
해당 버전의 가이드 패치는 모바일 프레임워크를 사용하는 경우 적용 한다.
1.2.0 버전 업데이트
1.2.0버전에서 1.2.1 버전으로 마이그레이션 하는 방법은 아래와 같다. 전달받은 설치 파일과 개발도구를 준비하여 아래와 같은 순으로 진행한다.
DDL 변경사항 적용
라이브러리 변경사항 적용
프레임워크 변경사항 적용 (개발도구에서 신규 프로젝트 생성 후 해당 리소스 활용하여 적용)
DDL 변경사항 적용
| +- CM_APP_INFO : 테이블 추가
| +- CM_APP_FILE_INFO : 테이블 추가.
| +- CM_APP_DEVICE_INFO : 테이블 추가.
| +- CM_DEVICE_CERT_NUM : 테이블 추가.
| +- CM_B2C_APP_VER_INFO : 테이블 추가.
| +- CM_WEB_FILE_INFO : 테이블 추가.
| +- CM_COM_HIST_LOG : 테이블 추가.
| +- CM_LOGIN_LOG : 테이블 추가.
| +- CM_STAT_APP_USE : 테이블 추가.
| +- CM_STAT_LOGIN : 테이블 추가.
| +- CM_STAT_SERVICE_REQ : 테이블 추가.
라이브러리 변경사항 적용
| +- 신규 라이브러리
| | +- chamomile-mobile-1.0.0.jar
프레임워크 변경사항 적용
src/main/resources
| +- spring
| | +- context-mobile.xml 파일 추가
| | +- context-security.xml 파일 변경
| | | +- 글로벌 변수 추가
| | | +- http auto-config 속성 false변경, entry-point-ref추가
| | | +- access-denied-handler 추가
| | | +- FORM_LOGIN_FILTER용 custom-filter 추가
| | | +- FORM_LOGIN_FILTER용, CONCURRENT_SESSION_FILTER용, LOGOUT_FILTER용 custom-filter추가
| | | +- session-management 추가.
| | | +- mobileUsernamePasswordAuthenticationFilter bean추가.
| | | +- loginUrlAuthenticationEntryPoint bean추가.
| | | +- 로그아웃을 위한 mobileLogoutSuccessHandler, securityContextLogoutHandler, cookieClearingLogoutHandler, logoutFilter bean추가.
| | | +- 동시성 제어를 위한 sessionRegistry, mobileSessionInformationExpiredStrategy, concurrentSessionFilter, CompositeSessionAuthenticationStrategy bean추가.
| | | +- mobileAccessDeniedHandler bean 추가
src/main/webapp
| +- WEB-INF
| | +- lib : chamomile-mobile.jar 라이브러리 추가
| | +- spring
| | | +- context-servlet.xml 파일 변경
| | | | +- component-scan 디렉토리 추가(net.lotte.chamomile.mobile)
| | | | +- interceptor 추가(MobileCommonInterceptor)
| | | | +- mobileExecutor, mobileScheduler 추가
| | +- web.xml 파일 변경
| | | +- MobileCorsFilter 추가
| | | +- MobileFilter 추가
1.2.1에서 1.2.2 버전으로 업데이트
1.2.2 버전 업데이트
1.2.0버전 혹은 1.2.1 버전에서 마이그레이션 하는 방법은 아래와 같다. 전달받은 설치 파일과 개발도구를 준비하여 아래와 같은 순으로 진행한다.
라이브러리 변경사항 적용
프레임워크 변경사항 적용 (기본 예외 처리 모듈 추가)
라이브러리 변경 사항
1.3 항목을 참고하여 라이브러리 버전 업데이트
프레임워크 변경 사항
src/main/resources
| +- application.properties 파일 내 chmm.exception.errorPage=error 추가
| +- spring
| | +- context-common.xml 파일 변경
| | | +- jdbcExceptionService 추가
| +- WEB-INF
| | +- spring
| | | +- context-servlet.xml 파일 변경
| | | | +- reusingPropertyPlaceholderConfigurer 추가
| | | | +- defaultExceptionResolver 추가
1.2.2에서 2.0.0 버전으로 업데이트
2.0.0 버전 업데이트
1.2.x버전에서 마이그레이션 하는 방법은 아래와 같다. 전달받은 설치 파일과 개발도구를 준비하여 아래와 같은 순으로 진행한다.
라이브러리 변경사항 적용
프레임워크 변경사항 적용 (기본 예외 처리 모듈 추가)
라이브러리 변경 사항
1.3 항목을 참고하여 라이브러리 버전 업데이트
프레임워크 변경 사항
src/main/resources
| +- application.properties
spring.main.allow-bean-definition-overriding=true
...
# dbcp가 hikaricp 로 jdbc 설정이 다음과 같이 변경됨.
chmm.jdbc.driverClassName
# db url 주소 (기존 url에서 jdbc-url로 변경)
chmm.jdbc.jdbc-url
# db 접속 아이디
chmm.jdbc.username
# db 접속 비밀번호
chmm.jdbc.password
# 최대 풀 사이즈
chmm.jdbc.maximumPoolSize
# 커넥션 타임 아웃 시간
chmm.jdbc.connectionTimeout
pom.xml(Chamomile boot 한정)
| +- chamomile-common-starter 추가
<dependency>
<groupId>net.lotte.chamomile</groupId>
<artifactId>chamomile-common-starter</artifactId>
</dependency>
2.0.0에서 2.0.2 버전으로 업데이트
2.0.2 버전 업데이트
MVC 목록 scan방식이 옵션 처리됨.
프레임워크 변경 사항
src/main/resources
| +- application.properties 파일 내 chmm.requestMappingSync.enabled=true추가
| +- spring
| | +- context-uiadapter.xml 파일 변경 (**uiadapter 프로젝트 한정**)
| | | +- exceptionService 속성 추가 (아래 참고)
<bean id="uiAdapterExceptionResolver" class="net.lotte.chamomile.core.web.adapter.UiAdapterHandlerExceptionResolver" p:order="0">
<property name="uiAdapterManager" ref="uiAdapterManager" />
<property name="exceptionService" ref="jdbcExceptionService" />
<property name="exceptionTransfers">
<list>
<ref bean="exceptionLogInfo" />
<ref bean="exceptionInfoSave" />
</list>
</property>
</bean>
2.0.2에서 2.0.3 버전으로 업데이트
2.0.3 버전 업데이트
- 캐모마일 액츄에이터 추가.
- 스웨거 라이브러리와의 충돌로 인한 클래스 이름 변경.
- hikaricp 설정 일부 추가.
프레임워크 변경 사항
src/main/resources
| +- application.properties
# 어플리케이션 이름
spring.application.name
...
# 캐모마일 액츄에이터 메트릭 노출 범위
management.endpoints.web.exposure.include
# 캐모마일 어드민 주소
spring.boot.admin.client.url
# 캐모마일 어드민 관리자 아이디
spring.boot.admin.client.username
# 캐모마일 어드민 관리자 비밀번호
spring.boot.admin.client.password
# 현재 앱 서비스 주소
spring.boot.admin.client.instance.service-base-url
# 현재 앱 유저 아이디
spring.boot.admin.client.instance.metadata.user.name
# 현재 앱 유저 비밀번호
spring.boot.admin.client.instance.metadata.user.password
...
# 커넥션 풀에서 살아있을 수 있는 커넥션의 최대 수명시간
chmm.jdbc.maxLifetime
| +- WEB-INF
| | +- spring
| | | +- context-servlet.xml 파일 변경
- 기존 DocumentationConfiguration 등록에서 CustomDocumentationConfiguration 변경.
- SpringBootAdminClientConfiguration 모듈 추가. (Chamomile boot 한정)
<bean class="net.lotte.chamomile.core.documentation.configuration.CustomDocumentationConfiguration" />
<beans:bean class="net.lotte.chamomile.actuator.SpringBootAdminClientConfiguration" ></beans:bean>
pom.xml
- chamomile-actuator 추가
<dependency>
<groupId>net.lotte.chamomile</groupId>
<artifactId>chamomile-actuator</artifactId>
</dependency>
어드민 변경 사항
- 스프링 부트 어드민 추가.
src/main/resources
| +- application.properties
#어드민 어플리케이션 이름 설정.
spring.application.name=admin
#어드민 어플리케이션 포트 설정.
server.port=23636
#어드민 어플리케이션 서비스 등록 취소 옵션
spring.boot.admin.discovery.ignored-services=${spring.application.name}
#스프링 부트 어드민 컨텍스트 패스 설정
spring.boot.admin.context-path=/sba
#스프링 부트 어드민 제목
spring.boot.admin.ui.title=spring boot admin
#스프링 부트 어드민 로고
spring.boot.admin.ui.brand=<img src="/resources/images/logo.png"><span>spring boot admin</span>
# eureka config
#유레카 클라이언트 사용 여부
eureka.client.enabled=false
#서비스간 통신 시 hostname 보다 ip 를 우선 사용 여부
eureka.instance.preferIpAddress
#client 서비스가 eureka 서버로 부터 서비스 리스트 정보를 local에 caching 할지 여부
eureka.client.fetchRegistry
#유레카 주소
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
pom.xml
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
</dependency>
<!-- Spring Cloud -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>nl.devillers</groupId>
<artifactId>spring-boot-admin-hystrix-dashboard</artifactId>
</dependency>
<dependency>
<groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId>
</dependency>
2.0.3에서 2.0.4 버전으로 업데이트
2.0.4 버전 업데이트
- UiAdapterHandlerExceptionResolver에 MessageSource적용 기능 추가
- MethodTraceAdvice 의 에러메시지 셋팅 글자수 제한 오류 조치
프레임워크 변경 사항(선택)
src/main/resources/spring/context-uiadapter.xml
Nexacro사용시 exception메시지의 다국어 처리 필요시 아래와 같이 messageSource property설정
<bean id="uiAdapterExceptionResolver" class="net.lotte.chamomile.core.web.adapter.UiAdapterHandlerExceptionResolver" p:order="0">
<property name="uiAdapterManager" ref="uiAdapterManager" />
<property name="exceptionService" ref="jdbcExceptionService" />
<property name="messageSource" ref="messageSource"/>
<property name="exceptionTransfers">
<list>
<ref bean="exceptionLogInfo" />
<ref bean="exceptionInfoSave" />
</list>
</property>
</bean>
2.0.4에서 2.0.5 버전으로 업데이트
해당 버전의 가이드 패치는 모바일 프레임워크를 사용하는 경우 적용 한다.
2.0.5 버전 업데이트
2.0.4버전에서 2.0.5 버전으로 마이그레이션 하는 방법은 아래와 같다.
- DDL 변경사항
DDL 변경사항 적용
하기 테이블에 대한 Primary 지정 및 Primary 키에 대한 not null 설정
DDL의 업데이트 내역은 아래와 같으며, 벤더사 별 DDL에 맞게 업데이트 수행 필요.
배포 되는 파일 내 DDL 참고. (chamomile-distribution-2.0.5-xxx/sql/{vendor}/DDL.sql)
-- 아래 내역은 oracle 기준
CHMM_STATISTICS_CLIENTSYSTEM (
CLIENTSYSTEM_ID NUMBER(10) NOT NULL
, PRIMARY KEY (CLIENTSYSTEM_ID)
)
CHMM_REST_INFO (
, PRIMARY KEY (SERVICE_ID, SERVICE_URI)
);
CHMM_REST_HEADER_INFO(
, PRIMARY KEY (SERVICE_ID, TEST_KEY)
);
CHMM_REST_BODY_INFO(
, PRIMARY KEY (SERVICE_ID, TEST_BODY_TYPE)
);
CHMM_REST_ASSERTION_INFO(
, PRIMARY KEY (SERVICE_ID, TEST_ASSERTION_CODE, TEST_KEY, TEST_COMPARISON)
);
CHMM_REST_HEADER_HIS(
, PRIMARY KEY (SCENARIO_GROUP_ID, SCENARIO_ID, SERVICE_ID, TEST_KEY)
);
CHMM_REST_BODY_HIS(
, PRIMARY KEY (SCENARIO_GROUP_ID, SCENARIO_ID, SERVICE_ID)
);
CHMM_REST_ASSERTION_HIS(
, PRIMARY KEY (SCENARIO_GROUP_ID, SCENARIO_ID, SERVICE_ID, TEST_ASSERTION_CODE, TEST_KEY, TEST_COMPARISON)
);
-- oralce 혹은 tibero 설정 시
CREATE SEQUENCE SEQ_CLIENTSYSTEM_IDX
START WITH 1
INCREMENT BY 1;
2.0.5에서 2.1.0 버전으로 업데이트
2.1.0 버전 업데이트
- 성능 테스트 기능 추가
DDL 변경사항 적용
하기 테이블에 대한 Primary 지정 및 Primary 키에 대한 not null 설정
DDL/DDL 업데이트 내역은 아래와 같으며, 벤더사 맞게 업데이트 수행 필요.
배포 되는 파일 내 DDL 참고. (chamomile-distribution-2.1.0-xxx/sql/{vendor}/DDL.sql) 배포 되는 파일 내 DDL 참고. (chamomile-distribution-2.1.0-xxx/sql/{vendor}/DML.sql)
CREATE TABLE chmm_perform_his
(
chmm_perform_his_id
VARCHAR(40) NOT NULL COMMENT 'CHMM_PERFORM_HIS 아이디',
service_id
VARCHAR(40) NOT NULL COMMENT 'SERVICE_ID 아이디',
service_name
VARCHAR(255) NOT NULL COMMENT '서비스명',
START_DTM
TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '시작 시간',
END_DTM
TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '종료 시간',
output_path
VARCHAR(200) NOT NULL COMMENT 'OUT_PUT 파일 위치',
perform_type
VARCHAR(40) NOT NULL COMMENT '성능 테스트 타입',
thread_count
INT(11) NOT NULL COMMENT '쓰레드 수',
repeat_type
VARCHAR(40) NOT NULL COMMENT '반복 타입',
repeat_value
INT(11) NOT NULL COMMENT '반복 횟수 및 시간',
PRIMARY KEY (chmm_perform_his_id
)
)
COMMENT='성능 테스트 기록'
;
create table chmm_perform_info
(
service_id varchar(40) not null comment '서비스아이디',
user_count varchar(40) not null comment '사용자 수',
load_type varchar(40) not null comment '부하 타입',
load_count varchar(40) not null comment '부하 수치',
tps varchar(40) not null comment 'TPS 지수'
)
comment '성능 테스트 정보';
create table chmm_perform_test_case_his
(
chmm_perform_his_id varchar(40) not null comment 'CHMM_PERFORM_HIS_ID 아이디',
label varchar(40) not null comment 'test case url',
average int not null comment '평균 데이터량',
min int not null comment '최소 속도',
max int not null comment '최대 속도',
throughput decimal not null comment '실행 샘플 갯수',
recvkb decimal not null comment '평균 속도',
sentkb decimal not null comment '중간 속도',
avgbytes decimal not null comment 'LINE 90.0 속도',
stddev decimal not null comment '에러 발생률',
error decimal not null comment '총 데이터량',
samples int not null,
ORDER_NUMBER int not null comment '테스트케이스 순서'
)
comment '성능 테스트 케이스 기록';
create table chmm_perform_tree_info
(
service_id varchar(40) not null comment '서비스아이디',
service_name varchar(255) not null comment '서비스명',
service_icon varchar(20) not null comment '서비스아이콘',
upper_folder_id varchar(40) not null comment '상위폴더 아이디',
upper_folder_ids varchar(120) not null comment '상위폴더들',
use_yn char null comment '사용여부',
sys_insert_dtm datetime null comment '입력시간',
sys_insert_user_id varchar(255) null comment '입력자 아이디',
sys_update_dtm datetime null comment '수정시간',
sys_update_user_id varchar(255) null comment '수정자 아이디'
)
comment '성능 테스트 트리 정보';
Admin 어플리케이션 설정 적용
성능 테스트 기능 추가 및 관련 라이브러리와 실행파일이 추가가 되었다.
아래는 설정파일에 추가된 항목이며, 패치시에는 기존 설정파일에 내용을 신규로 설치하는 어플리케이션에 추가하여 적용한다.
##PERFORMANCE
chmm.performance.jmeter.outputPath=${chmm.file.dir}/performance
chmm.performance.jmeter.executeMode=BLOCKING
2.1.0에서 2.2.0 버전으로 업데이트
2.2.0 버전 업데이트
- 라이선스 적용
v2.2 이후 부터 캐모마일을 사용하고자 하는 경우 라이선스가 필요하다. 담당자를 통해 라이선스를 발급받아 적용하도록 한다. 라이선스 적용에 대한 상세 내용은
온라인개발가이드 # 라이선스 적용
을 참고한다.
2.2.0에서 2.3.0 버전으로 업데이트
2.3.0 버전 업데이트
- 캐모마일 부트 – chamomile boot autoconfigure 동작 방식 및 코드 변경.
chamomile boot autoconfigure 내부에 Conditinal 기능이 추가되어 기존 @EnableAutoConfiguration의 exclude 옵션을 이용하여 자동 설정을 명시적으로 제외하지 않아도 된다. 자동 시작 설정을 담당하는 AutoConfiguration 클래스들과 실제 설정을 담당하는 Configuration 클래스를 분리하여 케모마일 부트 기능을 수정하여야 할떄 Configuration 클래스를 상속받아 개발하도록 수정. 기존 코드가 net.lotte.chamomile.autoconfigure.XXXAutoConfiguration 상속 받아 구현하였다면, 2.3.0 부터는 net.lotte.chamomile.configure.XXXConfiguration를 상속받아 구현하도록 변경해야 함.
- 기존 2.2.0 케모마일 부트 코드 예시
package net.lotte.sample;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration;
import net.lotte.chamomile.autoconfigure.security.SecurityAutoConfiguration;
import net.lotte.chamomile.autoconfiguration.ChamomileApplication;
import net.lotte.chamomile.autoconfiguration.ChamomileBootApplication;
@ChamomileBootApplication
// 기존 2.2.0의 경우 @EnableAutoConfiguration에서 AutoConfiguration 충돌 방지를 위해 명시적으로 코드를 입력함.
@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class, SessionAutoConfiguration.class,
SecurityFilterAutoConfiguration.class, SecurityAutoConfiguration.class,
net.lotte.chamomile.autoconfiguration.SecurityAutoConfiguration.class })
public class ChamomileSampleApplication {
public static void main(String[] args) {
ChamomileApplication.run(ChamomileSampleApplication.class, args);
}
//기존 2.2.0의 경우 net.lotte.chamomile.autoconfiguration 패키지에서 SecurityAutoConfiguration를 상속 받아서 구현.
@Configuration
protected static class CustomizingSuccessAndFailureHandlerConfiguration
extends net.lotte.chamomile.autoconfiguration.SecurityAutoConfiguration {
@Bean
@Override
public AuthenticationSuccessHandler authenticationSuccessHandler() {
return new SampleLoginSuccessHandler();
}
@Bean
@Override
public AuthenticationFailureHandler authenticationFailureHandler() {
return new SampleLoginFailureHandler();
}
}
}
- 변경된 2.3.0 케모마일 부트 코드 예시
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import net.lotte.chamomile.autoconfigure.core.ChamomileApplication;
import net.lotte.chamomile.autoconfigure.core.ChamomileBootApplication;
import net.lotte.sample.handler.SampleLoginFailureHandler;
import net.lotte.sample.handler.SampleLoginSuccessHandler;
@ChamomileBootApplication
// 변경된 2.3.0의 경우 @EnableAutoConfiguration 필요없음.
public class ChamomileSampleApplication {
public static void main(String[] args) {
ChamomileApplication.run(ChamomileSampleApplication.class, args);
}
//변경된 2.3.0의 경우 net.lotte.chamomile.configure 패키지에서 SecurityConfiguration 상속 받아서 구현.
@Configuration
protected static class CustomizingSuccessAndFailureHandlerConfiguration
extends net.lotte.chamomile.configure.security.SecurityConfiguration {
@Bean
@Override
public AuthenticationSuccessHandler authenticationSuccessHandler() {
return new SampleLoginSuccessHandler();
}
@Bean
@Override
public AuthenticationFailureHandler authenticationFailureHandler() {
return new SampleLoginFailureHandler();
}
}
}
- 모바일 보안 설정 변경 (동시 로그인 설정, 세션 관리 설정)
기존 모바일 프로젝트에서 동시 로그인 방지를 위해 사용된
net.lotte.chamomile.mobile.security.MobileConcurrentSessionControlAuthenticationStrategy
net.lotte.chamomile.mobile.security.MobileConcurrentSessionFilter
가 deprecated 되었습니다. 관련해서 애플리케이션 설정(application.properties
)에서chmm.security.duplicationLoginPreventEnable
가 deprecated 되었습니다.
해당 기능은 스프링에서 기본으로 제공하는 구성으로 대체되었으며, 각각
org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy org.springframework.security.web.session.ConcurrentSessionFilter
을 사용합니다.
권장되는 설정 방법은
[웹 프로젝트]
- 기존 세션 전략
<!-- context-security 파일 내용 중 -->
<!-- SESSION MANAGEMENT -->
<beans:bean id="sas" class="org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy">
<beans:constructor-arg>
<beans:list>
<beans:bean class="net.lotte.chamomile.mobile.security.MobileConcurrentSessionControlAuthenticationStrategy"
c:sessionRegistry-ref="sessionRegistry"
p:duplicationLoginPreventEnable="${chmm.security.duplicationLoginPreventEnable}"/>
<beans:bean class="org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy"
p:migrateSessionAttributes="false"/>
<beans:bean class="org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy"
c:sessionRegistry-ref="sessionRegistry"/>
</beans:list>
</beans:constructor-arg>
</beans:bean>
- 변경 세션 전략 (2.3.0)
<!-- context-security 파일 내용 중 -->
<!-- SESSION MANAGEMENT -->
<beans:bean id="sas" class="org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy">
<beans:constructor-arg>
<beans:list>
<!-- 스프링 시큐리티에서 기본으로 사용하는 동시세션전략 -->
<beans:bean class="org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy"
c:sessionRegistry-ref="sessionRegistry"
p:maximumSessions="1"
p:exceptionIfMaximumExceeded="false"/>
<beans:bean class="org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy"
p:migrateSessionAttributes="false"/>
<beans:bean class="org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy"
c:sessionRegistry-ref="sessionRegistry"/>
</beans:list>
</beans:constructor-arg>
</beans:bean>
- 기존 동시 세션 필터
<!-- context-security 파일 내용 중 -->
<beans:bean id="concurrentSessionFilter" class="net.lotte.chamomile.mobile.security.MobileConcurrentSessionFilter">
<beans:constructor-arg name="sessionRegistry" ref="sessionRegistry"/>
<beans:constructor-arg name="sessionInformationExpiredStrategy" ref="mobileSessionInformationExpiredStrategy"/>
<beans:property name="loginProcessingUrl" value="${chmm.security.loginProcessingUrl}" />
<beans:property name="logoutProcessingUrl" value="${chmm.security.logoutProcessingUrl}" />
<!-- 세션이 만료된 경우 로그아웃 처리한다. -->
<beans:property name="logoutHandlers">
<beans:array>
<beans:ref bean="securityContextLogoutHandler" />
<beans:ref bean="cookieClearingLogoutHandler"/>
</beans:array>
</beans:property>
</beans:bean>
- 변경 동시 세션 필터 (2.3.0)
<!-- context-security 파일 내용 중 -->
<beans:bean id="concurrentSessionFilter" class="org.springframework.security.web.session.ConcurrentSessionFilter"
c:sessionRegistry-ref="sessionRegistry"
c:sessionInformationExpiredStrategy-ref="mobileSessionInformationExpiredStrategy"/>
[부트 프로젝트]
부트 프로젝트는 자동 구성됨. 위에서 작성된 부트 동작 및 코드 예시 참조.
변경된 캐모마일 모바일(부트) 기본 구성 “`java @Configuration @ConditionalOnClass(MobileConstants.class) public class MobileSecurityConfiguration extends SecurityConfiguration {</p> <p> @Override protected void configure(final HttpSecurity http) throws Exception { super.configure(http); http.addFilterAt(mobileUsernamePasswordAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class) .addFilterAt(logoutFilter(), LogoutFilter.class); http.sessionManagement() // .maximumSessions(1) // 유저 최대 허용 가능 세션 수, -1 인 경우 무제한 세션 허용 .maxSessionsPreventsLogin(false) // 동시 로그인 차단, false 인 경우 기존 세션 만료(default) .expiredSessionStrategy(mobileSessionInformationExpiredStrategy()); }</p> <p> // … 생략 …</p> </li></ul> <!– /wp:list –> <!– wp:paragraph –> <p>}</p> <!– /wp:paragraph –> <!– wp:code –> <pre class="wp-block-code"><code> – 동시 로그인 관련 구성 변경 (동시 로그인 허용) “`java @Configuration protected static class CustomizingSuccessAndFailureHandlerConfiguration extends MobileSecurityConfiguration { @Autowired protected SecurityProperties securityProperties; @Override protected void configure(final HttpSecurity http) throws Exception { super.configure(http); http.sessionManagement() // .maximumSessions(-1) // 유저 최대 허용 가능 세션 수, -1 인 경우 무제한 세션 허용 .maxSessionsPreventsLogin(false) // 동시 로그인 차단, false 인 경우 기존 세션 만료(default) .expiredSessionStrategy(mobileSessionInformationExpiredStrategy()); } @Bean @Override public AuthenticationSuccessHandler authenticationSuccessHandler() { return new SampleLoginSuccessHandler(); } @Bean @Override public AuthenticationFailureHandler authenticationFailureHandler() { return new SampleLoginFailureHandler(); } }
프레임워크 변경 사항
src/main/resources
| +- application.properties
# 내장 레디스 활성화 여부 (기본값 true) chmm.redis.embedded.enabled=true
END