Skip to content

Commit

Permalink
health check 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoon-Jemin committed Jan 11, 2024
1 parent cfb9271 commit cb9696e
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 3 deletions.
16 changes: 15 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
@@ -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!";
}
}
1 change: 0 additions & 1 deletion src/main/resources/application.properties

This file was deleted.

38 changes: 38 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion umc-project
Submodule umc-project deleted from a4a3c7

0 comments on commit cb9696e

Please sign in to comment.