-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#6] 싱글모듈>멀티모듈 #7
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a2f138f
Test commit
kimsuyeondev 9f8ac8f
- 싱글모듈에서 멀티모듈로 변경
kimsuyeondev c506323
#6 싱글모듈에서 멀티모듈로 변경
kimsuyeondev 0dcc7d7
#6 싱글모듈에서 멀티모듈로 변경
kimsuyeondev 4a89a95
#6 싱글모듈에서 멀티모듈로 변경
kimsuyeondev 8b069f1
Merge remote-tracking branch 'refs/remotes/upstream/main' into feature/6
kimsuyeondev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# cosmetics-delivery | ||
선착순 타임딜 톡톡 라인업, 화장품 구매 배달 서비스 | ||
|
||
## 멀티 모듈 프로젝트 구성 | ||
- module-core | ||
- module-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
plugins { | ||
} | ||
|
||
dependencies { | ||
implementation project(path: ':module-core') | ||
} | ||
|
||
//어플리케이션 실행에 필요한 모든 의존성을 포함하지 않고 클래스파일과 리소스 파일만 포함 | ||
//web 모듈을 추가하면서 bootJar를 사용하지 않는다. | ||
tasks.jar { enabled = true } | ||
tasks.bootJar { enabled = false } | ||
5 changes: 2 additions & 3 deletions
5
...hello/cosmetics/CosmeticsApplication.java → ...a/com/cosmetics/CosmeticsApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
module-api/src/main/java/com/cosmetics/sample/controller/SampleController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.cosmetics.sample.controller; | ||
|
||
import com.cosmetics.Sample; | ||
import com.cosmetics.sample.service.SampleService; | ||
import com.fasterxml.jackson.core.JsonProcessingException; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
@RestController | ||
public class SampleController { | ||
|
||
@Autowired | ||
private SampleService sampleService; | ||
@GetMapping("/hello") | ||
public Sample getHelloCosmetics() { | ||
Sample say = sampleService.getSample(); | ||
return say; | ||
} | ||
@PostMapping("/hello") | ||
public Sample postHelloCosmetics(@RequestBody Sample sampleParam) { | ||
return sampleParam; | ||
} | ||
|
||
@GetMapping("/helloObj") | ||
public String getHelloObjectMapper() throws JsonProcessingException { | ||
ObjectMapper mapper = new ObjectMapper(); | ||
String str = mapper.writeValueAsString("{\"say\": \"hello\" }"); | ||
return str; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
module-api/src/main/java/com/cosmetics/sample/service/SampleService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.cosmetics.sample.service; | ||
|
||
import com.cosmetics.Sample; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class SampleService { | ||
|
||
public Sample getSample() { | ||
Sample sample = new Sample(); | ||
sample.setSay("hello cosmetics"); | ||
return sample; | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아무내용도 없으면 지우는 게 더 좋지 않을까 싶습니다. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello Cosmetics! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
plugins { | ||
} | ||
|
||
dependencies { | ||
} | ||
//어플리케이션 실행에 필요한 모든 의존성을 포함하지 않고 클래스파일과 리소스 파일만 포함 | ||
tasks.jar { enabled = true } | ||
tasks.bootJar { enabled = false } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.cosmetics; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class Sample { | ||
private String say; | ||
} |
12 changes: 12 additions & 0 deletions
12
module-core/src/test/java/com/cosmetics/example/ModuleCoreApplicationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.cosmetics.example; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class ModuleCoreApplicationTest { | ||
@Test | ||
public void sysout(){ | ||
System.out.println("core도 테스트가 됩니다."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
rootProject.name = 'cosmetics' | ||
include 'module-api' | ||
include 'module-core' | ||
include 'module-web' | ||
|
13 changes: 0 additions & 13 deletions
13
src/main/java/com/hello/cosmetics/main/MainController.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/test/java/com/hello/cosmetics/CosmeticsApplicationTests.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 설정을 넣어야하는거라면, springboot plugin을 빼는게 더 좋지 않을까요?