diff --git a/build.gradle b/build.gradle index bfb5143..8845843 100644 --- a/build.gradle +++ b/build.gradle @@ -23,13 +23,27 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-web' + compileOnly 'org.projectlombok:lombok' - runtimeOnly 'com.mysql:mysql-connector-j' + runtimeOnly 'com.h2database:h2' + +// runtimeOnly 'com.mysql:mysql-connector-j' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' + +// // swagger +// implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' +// +// //implementation 'org.springframework.boot:spring-boot-starter-security' +// implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' } tasks.named('test') { useJUnitPlatform() } + +jar { + enabled = false +} \ No newline at end of file diff --git a/src/main/java/aromanticcat/umcproject/web/controller/RootController.java b/src/main/java/aromanticcat/umcproject/web/controller/RootController.java new file mode 100644 index 0000000..1a9dae4 --- /dev/null +++ b/src/main/java/aromanticcat/umcproject/web/controller/RootController.java @@ -0,0 +1,13 @@ +package aromanticcat.umcproject.web.controller; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class RootController { + + @GetMapping("/health") + public String healthCheck(){ + return "I'm healthy!"; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 8b13789..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..70cab0d --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,38 @@ +spring: + datasource: + url: jdbc:h2:tcp://localhost/~/cat + username: sa + password: + driver-class-name: org.h2.Driver + + jpa: + hibernate: + ddl-auto: create + properties: + hibernate: + # show_sql: true + format_sql: true +logging.level: + org.hibernate.SQL: debug +#spring: +# datasource: +## url: jdbc:mysql://umc-db.clum6u48wd0b.ap-northeast-2.rds.amazonaws.com/umc +## username: root +## password: umcteame +## driver-class-name: com.mysql.cj.jdbc.Driver +# jpa: +# properties: +# hibernate: +# dialect: org.hibernate.dialect.MySQL8Dialect +# show_sql: true +# format_sql: true +# use_sql_comments: true +# hbm2ddl: +# auto: update +# default_batch_fetch_size: 1000 +# +# servlet: +# multipart: +# enabled: true +# max-file-size: 200MB +# max-request-size: 300MB \ No newline at end of file diff --git a/umc-project b/umc-project deleted file mode 160000 index a4a3c7d..0000000 --- a/umc-project +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a4a3c7d2d8c86d6e3837a1e8f403f263836a8c68