diff --git a/build.gradle b/build.gradle index da0c48e..eaa53f8 100644 --- a/build.gradle +++ b/build.gradle @@ -43,6 +43,10 @@ dependencies { //AWS Parameter Store implementation platform("io.awspring.cloud:spring-cloud-aws-dependencies:3.1.0") implementation 'io.awspring.cloud:spring-cloud-aws-starter-parameter-store' + + //DB + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + runtimeOnly 'com.mysql:mysql-connector-j' } tasks.named('test') { diff --git a/src/main/java/ai/softeer/caecae/S3Controller.java b/src/main/java/ai/softeer/caecae/S3Controller.java index 6fccada..a424d50 100644 --- a/src/main/java/ai/softeer/caecae/S3Controller.java +++ b/src/main/java/ai/softeer/caecae/S3Controller.java @@ -16,7 +16,7 @@ public class S3Controller { @PostMapping("/api/s3") public String upload(@RequestParam("file") MultipartFile file) { String filePath = s3Service.uploadFile(file); - return filePath +"created!"; + return filePath + "created!"; //TODO : ResponseEntity 생성하기 } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 864549c..03f0e6c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,4 +1,20 @@ spring: + datasource: + url: jdbc:mysql://${DB_HOST}:${DB_PORT}/${DB_DATABASE} + username: ${DB_USERNAME} + password: ${DB_PASSWORD} + driver-class-name: com.mysql.cj.jdbc.Driver + + jpa: + hibernate: + ddl-auto: create + properties: + hibernate: + show_sql: true + format_sql: true + database-platform: org.hibernate.dialect.MySQLDialect + open-in-view: false + s3: bucket: ${S3_BUCKET} region: