Skip to content

Commit fbc2e58

Browse files
committed
Refactor code structure for improved readability and maintainability
1 parent 71368f8 commit fbc2e58

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

docs/03-java.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Spring Boot Initializr를 이용하면 Spring Boot 앱을 쉽게 생성할 수
5757
* Lombok
5858

5959
초기 Spring Boot 앱 프로젝트가 생성되었으면 우측 하단에의 "Open new project"를 클릭하여 방금 생성한 프로젝트를 오픈합니다.
60+
![그림](images/java01.png)
6061

6162
#### 빌드 및 앱 구동
6263
최초 생성된 앱이 에러가 없는지 빌드 후 앱 구동을 통해 확인해 봅니다.
@@ -65,9 +66,7 @@ Spring Boot Initializr를 이용하면 Spring Boot 앱을 쉽게 생성할 수
6566
```
6667

6768
터미널에 다음과 같은 로그가 출력되면 앱이 정상적으로 구동된 것입니다.
68-
69-
![그림](http://127.0.0.1:8000/docs)
70-
69+
![그림](images/java02.png)
7170

7271
#### Rest API 추가 및 확인
7372
디펜던시가 에러 없이 잘 추가되었는지 확인하기 위해 RestController를 추가해 봅니다. 기본 호출할 Rest API로 /hello 를 생성해 보겠습니다. GitHub Copilot을 Agent 모드로 변경하고, 모델을 "Claude 3.7 Sonnet"으로 변경한 후 다음과 같이 프롬프트를 입력합니다.
@@ -104,16 +103,16 @@ GitHub Copilot에 다음과 같이 프롬프트를 입력합니다.
104103
#### Database URL 변경
105104
이제 기존 Python에서 사용하던 데이타베이스를 참조하도록 환경을 변경해 봅니다. 해당 파일은 다음 위치에 존재합니다.
106105
```
107-
/python/sns.db
106+
/workspaces/github-copilot-bootcamp-2025/python/sns.db
108107
```
109108

110109
Spring Boot 프로젝트의 다음 파일을 오픈해서 파일 주소를 변경합니다.
111-
```
112-
파일 명: <project_root>/src/main/resources/application.properties
113-
```
110+
* project_root: /workspaces/github-copilot-bootcamp-2025/java/demo
111+
* 파일 명: <project_root>/src/main/resources/application.properties
112+
114113
변경할 내용은 다음과 같습니다.
115114
```
116-
spring.datasource.url=jdbc:sqlite:../../python/sns.db
115+
spring.datasource.url=jdbc:sqlite:/workspaces/github-copilot-bootcamp-2025/python/sns.db
117116
```
118117
다시 앱을 빌드해서 데이타베이스가 제대로 참조되었는지 확인합니다.
119118

docs/images/java01.png

50.1 KB
Loading

docs/images/java02.png

222 KB
Loading

0 commit comments

Comments
 (0)