Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Minsu/umc10th/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UB_USER=your_user_name
DB_PW=your_password
DB_URL=jdbc:mysql://localhost:3306/umc10th
3 changes: 3 additions & 0 deletions Minsu/umc10th/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/gradlew text eol=lf
*.bat text eol=crlf
*.jar binary
44 changes: 44 additions & 0 deletions Minsu/umc10th/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### 보안 ###
.env
application.yml

### mac ###
.DS_Store
40 changes: 40 additions & 0 deletions Minsu/umc10th/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
plugins {
id 'java'
id 'org.springframework.boot' version '4.0.5'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
description = 'umc10th'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
Comment on lines +22 to +25
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge JPA 의존성 추가 시 datasource 설정을 함께 넣으세요

JPA와 MySQL 드라이버를 추가했는데 프로젝트에 datasource 설정 파일이 없어 애플리케이션(또는 @SpringBootTest) 시작 시 DataSource 자동구성 단계에서 실패할 가능성이 매우 높습니다. 스프링 부트는 JPA starter가 있으면 DB 연결 구성을 먼저 검증하므로, 학습용 프로젝트라도 실행 가능한 최소 설정이 필요합니다. application.yml(또는 profile별 설정)에 URL/계정 정보를 명시하고, 테스트는 H2나 별도 test profile로 분리해 주세요. 다음으로는 Spring Boot 자동구성 조건과 profile 기반 설정 분리를 학습하면 도움이 됩니다.

Useful? React with 👍 / 👎.

annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testCompileOnly 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testAnnotationProcessor 'org.projectlombok:lombok'

// Swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.1'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-api:3.0.1'
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file added Minsu/umc10th/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions Minsu/umc10th/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
248 changes: 248 additions & 0 deletions Minsu/umc10th/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading