기본 콘텐츠로 건너뛰기

Spring Data Custom Implementation Default naming convention

When I tried to make custom implementations for Spring Data Repository, It was not working. My custom implementation code is like this. {code} public class BankRepositoryCustomImpl implements BankRepositoryCustom { ... } {code} Problem is that there is the naming convention for custom implementation class. See Referenece. So ClassName should be BankRepositoryImpl. Referenece - https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#_configuration

Docker 정리

도커 이미지 - 컨테이너를 생성할 때 필요한 요소, 이미지는 여러 개의 계층으로 된 바이너리 파일 (스냅샷, iso 파일과 비슷) 도커 컨테이너 - 도커 이미지로 컨테이너를 생성하면 해당 이미지 목적에 맞는 파일 시스템, 시스템 자원과 네트워크를 사용할 수 있게 생성되는 독립적인 공간 Dockerfile - 이미지를 생성하기 위한 배치 파일, build 명령어는 Dockerfile을 읽어 이미지를 생성 docker build -t conductor:server ./server -t option : 생성될 이미지의 이름 docker run 명령어는 컨테이너를 생성하고 실행하는 역할 docker run -p 8080:8080 -d -t conductor:server -p option : 컨테이너의 포트를 호스트의 포트와 바인 딩해 연결할 수 있게 설정 docker-compose build docker-compose up docker compose 명령어는 여러 개의 컨테이너 옵션과 환경 파일을 읽어 컨테이너를 순차적으로 생성 docker-compose.yml 읽어 도커 엔진을 통해 컨테이너 생성

프로세스 vs 스레드

프로세스는 운영체제부터 자원을 할당받는 작업 단위 스레드는 프로세스가 할당받은 자원을 이용하는 실행 단위 하나의 프로세스가 생성되면 하나의 프로세스가 같이 생성되며 이를 메인스레드라고 한다 . 프로세스는 자신만의 고유 공간과 자원을 할당 받아 사용하지만 스레드는 다른 스레드와 한 프로세스 내에 주소공간이나 자원들을 공유하며 실행 된다 . 이 때문에 멀티 프로세스를 이용하여 처리하던 일을 멀티 스레드로 구현하면 프로세스를 생성하여 1) 자원을 할당 하는 시스템 콜이 줄어들게 되며 2) 프로세스 간의 통신보다 스레드 간의 통신 비용이 적어 공간과 자원 소모가 훨씬 줄어든다 .

MSA Project Stricture

Project Stricture MSA Based - Layer Controller - (Facade) - Service - Delegator / Repository Controller : Spring MVC, convert message, input validation Facade : Service layer interface, integrate multi biz Service : Domain layer interface Delegator: Wrapper class for API logic Repository : JPA Repository interface - DTO Condition : parameter from client DTO : dto Entity : entity Form : Request form for biz Utils : Utility Class, stateless