본문 바로가기
Infra System

Application Dependency Declaration

by kellis 2020. 10. 14.

아래는 Application Dependency Declaration입니다. 

 

1. Starter - 0 depth

 

0 depth dependencies를 의존하고 있는 프로젝트로, 아키텍처의 최상위 부모 프로젝트. 하위 Eureka-Client Starter와 MongoDB Starter, MariaDB Starter를 모듈로 가지고 있습니다. spring-boot-starter-parent를 부모로 의존하고 있으며, 

해당 프로젝트를 maven install 후 pom에서 아래와 같이 parent로 지정하여 사용할 수 있습니다. 

<parent>
        <groupId>kr.kellis.air</groupId>
        <artifactId>air-starter</artifactId>
        <version>{latest version}</version>
        <relativePath/>
</parent>

2. Eureka-Server - 1 depth

 

1 depth dependencies에서 Eureka Server와 관련된 Dependency를 의존하고 있습니다. 단순히 의존성을 제공하기 위한 용도로써 Starter로 만들어진 다른 프로젝트와 달리, 이 프로젝트를 Eureka 서버로 사용합니다. 

air-starter를 부모로 의존하고 있으며, 아래와 같이 메인클래스에 @EnableEurekaServer가 달려 있습니다.

@EnableEurekaServer
@SpringBootApplication
class AirEurekaServerApplication
 
fun main(args: Array<String>) {
    runApplication<AirEurekaServerApplication>(*args)
}

3. Eureka-Client Starter - 1 depth

 

1 depth dependencies에서 Eureka Client와 관련된 Dependency를 의존하고 있습니다. 데이터베이스를 사용하지 않는 비즈니스 프로젝트의 경우 air-eureka-client-starter를 부모로 의존하여 사용합니다. 


4. MongoDB Starter - 2 depth

 

2 depth dependencies에서 MongoDB와 관련된 Dependency를 의존하고 있습니다. 몽고디비를 사용하는 비즈니스 프로젝트의 경우 air-mongodb-starter를 부모로 의존하여 사용합니다. 


5. MariaDB Starter - 2 depth

 

1 depth dependencies에서 MariaDB와 관련된 Dependency를 의존하고 있습니다. 퍼시스턴스 프레임워크로 Mybatis를 사용하며, 쿼리 관련 로그를 출력하기 위해 log4jdbc를 의존하고 있습니다. 이에 따라 이들 디펜던시에 대한 버전 정보를 properties에서 별도로 지정해야 합니다. 

<properties>
        <mybatis.version>2.1.1</mybatis.version>
        <log4jdbc.version>1.16</log4jdbc.version>
        <mariadb.version>2.3.0</mariadb.version>
</properties>

'Infra System' 카테고리의 다른 글

MariaDB based Prototype - Inner Architecture  (0) 2020.10.14
Common Lib Stub - Inner Architecture  (0) 2020.10.14
nexus install on kubernetes  (0) 2020.10.13
nexus install on ec2  (0) 2020.10.13
mongodb install on kubernetes  (0) 2020.10.13

댓글