Skip to content
Merged
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
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ dependencies {
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

// postgreSql
runtimeOnly 'org.postgresql:postgresql'
implementation 'org.postgresql:postgresql:42.7.3'
// mysql
runtimeOnly 'com.mysql:mysql-connector-j'

// jwt
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
Expand Down
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
services:
db:
image: postgres:15
image: mysql:8.0
restart: unless-stopped
container_name: runners_db
env_file: .env
ports:
- "5432:5432"
- "3306:3306"
volumes:
- runners_db:/var/lib/postgresql/data
- runners_db:/var/lib/mysql

app:
image: openjdk:17-slim
Expand All @@ -25,4 +25,3 @@ services:

volumes:
runners_db:

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package run.backend.domain.auth.controller;

import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
Expand All @@ -24,6 +25,7 @@ public class AuthController {

private final AuthService authService;

@Operation(summary = "소셜 로그인", description = "소셜 로그인 요청 API 입니다.")
@PostMapping("/{provider}")
public ResponseEntity<CommonResponse<SignupResponse>> socialLogin(
@PathVariable String provider, @RequestBody CodeRequest codeRequest) {
Expand All @@ -33,6 +35,7 @@ public ResponseEntity<CommonResponse<SignupResponse>> socialLogin(
return ResponseEntity.ok(new CommonResponse<>("소셜 로그인 요청에 성공했습니다.", response));
}

@Operation(summary = "온보딩 유저 정보 입력", description = "온보딩 유저 정보를 입력하는 API 입니다.")
@PostMapping("/signup")
public ResponseEntity<CommonResponse<TokenResponse>> signup(
@RequestPart("signupRequest") SignupRequest signupRequest,
Expand All @@ -43,6 +46,7 @@ public ResponseEntity<CommonResponse<TokenResponse>> signup(
return ResponseEntity.ok(new CommonResponse<>("회원가입이 완료되었습니다.", response));
}

@Operation(summary = "토큰 재발급", description = "액세스 토큰 재발급 API 입니다.")
@PostMapping("/refresh")
public ResponseEntity<CommonResponse<TokenResponse>> refresh(
@RequestHeader("Authorization") String authorizationHeader) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package run.backend.domain.file.controller;

import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.io.Resource;
Expand All @@ -23,6 +24,7 @@ public class FileController {

private final FileService fileService;

@Operation(summary = "프로필 이미지 조회", description = "유저 프로필 이미지를 조회하는 API 입니다.")
@GetMapping("/profiles/{filename}")
public ResponseEntity<Resource> getProfileImage(@PathVariable String filename) {
Resource resource = fileService.getFileResource(filename);
Expand Down
15 changes: 10 additions & 5 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ spring:
import: optional:file:.env[.properties]

datasource:
url: jdbc:postgresql://${POSTGRES_HOST}:5432/${POSTGRES_DB}
username: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
driver-class-name: org.postgresql.Driver
url: jdbc:mysql://${MYSQL_HOST}:3306/${MYSQL_DB}?useSSL=false&serverTimezone=Asia/Seoul&characterEncoding=UTF-8&allowPublicKeyRetrieval=true
username: ${MYSQL_USER}
password: ${MYSQL_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver

web:
resources:
Expand All @@ -15,9 +15,14 @@ spring:
- file:${file.upload.dir}/

jpa:
database: postgresql
database: mysql
hibernate:
ddl-auto: create
properties:
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
format_sql: true
show-sql: true

servlet:
multipart:
Expand Down