728x90

Dev/Spring.SpringBoot 15

[ehcache 2.x] 캐쉬 라이브러리 설정 관련

target: Ehcache 2.x 설정법 method: 1. pom.xml net.sf.ehcache ehcache-core 2.6.9 slf4j-api org.slf4j net.sf.ehcache ehcache 2.9.0 2. ehcache.xml *ehcache.xml 경로 > /src/main/resources/ehcache.xml 3. context-cache.xml 4. CacheManageService.java //캐쉬 관리 서비스 @Service public class CacheManageService extends BaseService { @CacheEvict(value="codeCache", allEntries=true) public void clearCodeCache() { // 코드..

[Spring] 다중 DB 연동

target: 프로젝트 내에서 다중 DB 연동 method: 1. context-datasource.xml #context-datasource.xml #globals.properties는 egovframework의 설정 파일 #globals.properties에 DB 연동 정보 존재 classpath:/egovframework/egovProps/globals.properties --> ※ egovEnvCryptoService.decrypt 서비스는 복호화 함수로 보안상 DB 비밀번호를 암호화하여 나온 문자열을 globals.properties에 설정한 경우, 해당 암호화의 복호화를 진행하고 DB 연동을 진행 2. context-mapper.xml context-datasource.xml에서 설정한 ego..

[Spring] profiles

target: 개발 시, 보통 Local/Dev/Prod 3가지 서버에 대해 동일한 소스와 각기 다른 설정이 올라가는 경우에 대해, Profiles 설정 method: 개발은 보통 로컬/개발/운영 3가지 서버에 동일한 소스를 올리지만, DB 연동이나, 서버 OS, 환경등에 따라 일부 설정 정보 변경이 필요 이에, 소스 파일을 build할 때, profiles를 설정할 수 있도록 설정 1. Maven build 시 profile 설정 - application.properties를 application-local.properties / application-dev.properties / application-prod.properties와 같이 3개로 분기처리하여 profile 정보에 맞게 설정 파일 설정 (..

728x90