When mutil-module project set up, some issues comes up like this. Let's show example.
We have three module like Entity, Cloud Server and Wep API. Cloud Server imports Entity module and also Web API module import that.
MonaEvCloudServer
group = 'kr.ksmartech.ev'
version = '1.0-SNAPSHOT'
dependencies {
...
implementation project(":MonaEvEntity")
...
}
MonaEvEntity - it was only imported role.
group = 'kr.ksmartech.ev.entity'
version = 'unspecified'
MonaEvApi - Non-Fixed version
group = 'kr.ksmartech.ev.web.api'
version = "1.0-API-SNAPSHOT"
dependencies {
...
implementation project(":MonaEvEntity")
...
}
EvCloudServer and EvEntity would not be a collision issue. but API will have a trouble when group would set "kr.ksmartech.ev.web.api". Let's see below e.g
We want to implement like below, but group is different structure, so that make a collision.
MonaEvCloudServer("kr.ksmartech.ev") MonaEvApi ("kr.ksmartech.ev.web.api")
|___________ MonaEvEntity__________|
MonaEvApi will require to point Component Scan. it was still be issue, althogh ComponentScan was set.
This issue is based on diffrent structure. Let's fix correct structure like this
MonaEvApi - Fixed version
group = 'kr.ksmartech.ev'
version = "1.0-API-SNAPSHOT"
dependencies {
...
implementation project(":MonaEvEntity")
...
}
MonaEvCloudServer("kr.ksmartech.ev") MonaEvApi ("kr.ksmartech.ev")
|___________ MonaEvEntity__________|
https://oingdaddy.tistory.com/254
'Java' 카테고리의 다른 글
Java - Json 과 Gson 이란? (0) | 2024.09.23 |
---|---|
[Spring Security] HTTP Basic Auth (0) | 2024.09.23 |
Improved Java Logging with Mapped Diagnostic Context (MDC) (1) | 2024.09.12 |
[Spring] ST_intersects method (1) | 2024.09.09 |
[Pageable] withSort (0) | 2024.08.30 |