diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index bde968c..0457b8b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,10 +1,3 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle - name: Java CI with Gradle on: @@ -16,6 +9,9 @@ permissions: env: S3_BUCKET_NAME: mainprojects4 + LIGHTSAIL_SSH_KEY: ${{ secrets.LIGHTSAIL_SSH_KEY }} + LIGHTSAIL_HOST: ${{ secrets.LIGHTSAIL_HOST }} + LIGHTSAIL_USERNAME: ${{ secrets.LIGHTSAIL_USERNAME }} jobs: build: @@ -39,16 +35,10 @@ jobs: - name: Build with Gradle run: ./gradlew clean build --debug working-directory: ${{ env.working-directory }} - - - - # build한 후 프로젝트를 압축합니다. - - name: Make zip file - run: zip -r ./mainproject024-deploy.zip . - shell: bash - - + - name: Check Build Files + run: ls -la + # Access Key와 Secret Access Key를 통해 권한을 확인합니다. # 아래 코드에 Access Key와 Secret Key를 직접 작성하지 않습니다. - name: Configure AWS credentials @@ -58,18 +48,32 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} # 등록한 Github Secret이 자동으로 불려옵니다. aws-region: ap-northeast-2 - # 압축한 프로젝트를 S3로 전송합니다. - - name: Upload to S3 - run: aws s3 cp --region ap-northeast-2 ./mainproject024-deploy.zip s3://$S3_BUCKET_NAME/mainproject024-deploy.zip - - - - name: deploy with AWS codeDeploy - run: > - aws deploy create-deployment - --application-name mainprojectCD - --deployment-config-name CodeDeployDefault.OneAtATime - --deployment-group-name Codedeploy-githubaction - --s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=mainproject024-deploy.zip + # AWS 인증이 완료되었는지 테스트합니다. + - name: Connect AWS Lightsail + run: aws configure list + + # 배포 자동화를 시작합니다. + - name: CD + uses: appleboy/scp-action@master + with: + host: ${{ secrets.LIGHTSAIL_HOST }} + username: ${{env.LIGHTSAIL_USERNAME}} + key: ${{ secrets.LIGHTSAIL_SSH_KEY }} + source: ${{ env.working-directory }} + target: ./ + + - name: start java process background + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.LIGHTSAIL_HOST }} + username: ${{env.LIGHTSAIL_USERNAME}} + key: ${{ secrets.LIGHTSAIL_SSH_KEY }} + script: nohup java -jar ./server/build/libs/server-0.0.1-SNAPSHOT.jar > ./output.log 2>&1 & + + # script: nohup java -jar ./server/build/libs/server-0.0.1-SNAPSHOT.jar > nohup.out 2 > nohup.err < /dev/null & + + - name: Check jar PID + run: ps -ef | grep jar diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..c3f502a --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 디폴트 무시된 파일 +/shelf/ +/workspace.xml +# 에디터 기반 HTTP 클라이언트 요청 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..07f904a --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..74a84c0 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..fdc392f --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..95381f2 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..1e0a318 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/server.main.iml b/.idea/modules/server.main.iml new file mode 100644 index 0000000..eec01e2 --- /dev/null +++ b/.idea/modules/server.main.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/seb42_main_024.iml b/.idea/seb42_main_024.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/seb42_main_024.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index b2c153f..1150fb3 100644 --- a/README.md +++ b/README.md @@ -1 +1,130 @@ -# seb42_main_024 +# Pre-007 + +스택 오버플로우 + +## 규칙 + +### @ 깃허브 커밋 컨벤션 + + 1. 기본적으로 한글로 작성하며 클래스/모듈, 함수/메서드 등은 정확히 명시하는것을 권장 (애메하면 필수는 아님) + EX) 유저컨트롤러 로그인 기능 작성 -> UserController의 postUser 메서드 작성 + + 2. 미완성된 작업 커밋 지양 + - feat 브랜치는 컴파일 에러만 나지 않는다면 일단 ok (되도록 함수단위의 완성을 지향) + - dev 브랜치는 하나의 기능 단위를 완성으로 보고 머지 허용 + - main 브랜치는 하나의 도메인(fe. 하나의 페이지) 단위를 완성으로 보고 머지 허용 + + 3. pull request 후 merge는 로컬이 아닌 원격 깃허브 페이지에서 진행하는것을 원칙으로 함 + + 4. merge 하기 전 팀원에게 알리고, 팀원은 가능하면 동참해서 코드 확인 후 문제없을시 진행 + + 5. feat 브렌치 네이밍은 "feat/(진행중인 기능 or 작업)" 형식 + + 6. 커밋 메세지는 "타입 : 내용"을 header로 필수로 작성하고, 줄바꿈 후 body에 내용을 선택적으로 작성. + + @@@ 커밋 메세지 타입 @@@ + - Feat = 새로운 기능 추가 + - Fix = 버그 수정 + - Revise = 오타, 코드 수정 + - Docs = 문서 작성 및 수정 + - Style = 웹 스타일링 + - Refactor = 코드 리팩토링 + - Chore = 빌드 업무 수정, 패키지 매니저 수정 + - Test = 테스트 코드 + + @@@ 커밋 메세지 예시 @@@ + Test : UserController 테스트케이스 작성 / *** header 작성은 필수 *** + Validation 검증, PostMember 메서드 검증, GetMember 메서드 검증 / *** body 작성은 선택 *** + +### @ BE + + 1. 주석은 코드 하단에 작성 , + + + + 3. 외부 mapper 라이브러리는 사용 X + + 4. 네이밍 규칙 + - 기본적으로 카멜 케이스 + - DB컬럼 : 스네이크 + - URI : 스켈레톤 + +### @ FE + + 1. Styled Component 사용 + + 2. 주석은 코드 상단에 줄바꿈 + + 3. global style 제작해서 사용 + + 4. prettier 규칙 + - single quote 체크 + - print width 75 + - tab width 2 + - bracket same line 체크 + +## 개발환경 + +### @ BE + + - Spring Boot 2.7.9 + - spring sercurity + - OAuth2 + - JWT + - MySql + - gson + - p6spy + - Java 11 + - SpringWeb + - SpringDataJpa + - Lombok + + ## Mapper : + - git book + - restdocs + - swagger + + + + - IntelliJ IDEA + +2023 03 09 16:19 +audit 추가 +comment entity 추가 +like entity 추가 +member entity 추가 +song entity 추가 + +### @ FE + + - React 18.2.0 + - JavaScript ES6+ + - Node.js + - Webpack + - Babel + - React + - Styledcomponents + - Axios + - Redux + + + - Visual Studio Code + +### @배포 + + - CI : github Actions + - CD : AWS lightsale +## 프로젝트 설명 + +- 작성 필요 + +## 팀원 + +- FE: 김유원, 김찬희, 하지웅, 황민혁 +- BE: 강동우, 유지건, 고한성, 문희승 + +## Project Wiki + +프로젝트 팀 정보, 기획, 아키텍쳐에 대한 자세한 안내입니다. +https://www.notion.so/codestates/688b486bbbba4d3c8c13b781e44a7a79 + diff --git a/server/appspec.yml b/server/appspec.yml index ea889af..f6c5e33 100644 --- a/server/appspec.yml +++ b/server/appspec.yml @@ -1,20 +1,18 @@ version: 0.0 os: linux files: - - source: / - destination: /home/ec2-user/build/ + - source: / + destination: /home/ubuntu/action + overwrite: yes permissions: - object: / - owner: ec2-user - group: ec2-user - mode: 755 - + pattern: "**" + owner: ubuntu + group: ubuntu + hooks: - BeforeInstall: - - location: scripts/deploy-before.sh - runas: ec2-user ApplicationStart: - - location: scripts/deploy.sh - timeout: 60 - runas: ec2-user + - location: deploy.sh + timeout: 100 + runas: ubuntu diff --git a/server/build.gradle b/server/build.gradle index 9face63..5fff53f 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -31,6 +31,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' + + // gson implementation 'com.google.code.gson:gson' @@ -50,6 +52,8 @@ dependencies { annotationProcessor 'jakarta.persistence:jakarta.persistence-api' annotationProcessor 'jakarta.annotation:jakarta.annotation-api' + runtimeOnly 'com.h2database:h2' + } tasks.named('test') { diff --git a/server/gradle/wrapper/gradle-wrapper.jar b/server/gradle/wrapper/gradle-wrapper.jar index 249e583..943f0cb 100644 Binary files a/server/gradle/wrapper/gradle-wrapper.jar and b/server/gradle/wrapper/gradle-wrapper.jar differ diff --git a/server/gradle/wrapper/gradle-wrapper.properties b/server/gradle/wrapper/gradle-wrapper.properties index 774fae8..5083229 100644 --- a/server/gradle/wrapper/gradle-wrapper.properties +++ b/server/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/server/gradlew b/server/gradlew index a69d9cb..65dcd68 100644 --- a/server/gradlew +++ b/server/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,12 +143,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac diff --git a/server/gradlew.bat b/server/gradlew.bat index f127cfd..93e3f59 100644 --- a/server/gradlew.bat +++ b/server/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% diff --git a/server/scripts/deploy-before.sh b/server/scripts/deploy-before.sh index dab1f8f..e2c72b1 100644 --- a/server/scripts/deploy-before.sh +++ b/server/scripts/deploy-before.sh @@ -1,4 +1,4 @@ -if [ -d /home/ec2-user/build ]; then - sudo rm -rf /home/ec2-user/build/ +if [ -d /home/ubuntu/build ]; then + sudo rm -rf /home/ubuntu/build/ fi -sudo mkdir -vp /home/ec2-user/build/ +sudo mkdir -vp /home/ubuntu/build/ diff --git a/server/src/main/java/com/main/server/ServerApplication.java b/server/src/main/java/com/main/server/ServerApplication.java index 95d4747..9abcb79 100644 --- a/server/src/main/java/com/main/server/ServerApplication.java +++ b/server/src/main/java/com/main/server/ServerApplication.java @@ -1,5 +1,6 @@ package com.main.server; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/server/src/main/java/com/main/server/audit/Auditable.java b/server/src/main/java/com/main/server/audit/Auditable.java new file mode 100644 index 0000000..2667d33 --- /dev/null +++ b/server/src/main/java/com/main/server/audit/Auditable.java @@ -0,0 +1,26 @@ +package com.main.server.audit; + +import lombok.Getter; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import java.time.LocalDateTime; + +@Getter +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public abstract class Auditable { + + @CreatedDate + @Column(name = "created_at", updatable = false) + private LocalDateTime createdAt = LocalDateTime.now(); + + @LastModifiedDate + @Column(name = "last_modified_at") + private LocalDateTime modifiedAt = LocalDateTime.now(); +} + diff --git a/server/src/main/java/com/main/server/comment/entity/Comment.java b/server/src/main/java/com/main/server/comment/entity/Comment.java new file mode 100644 index 0000000..6f12c0e --- /dev/null +++ b/server/src/main/java/com/main/server/comment/entity/Comment.java @@ -0,0 +1,47 @@ +package com.main.server.comment.entity; + +import com.main.server.audit.Auditable; +import com.main.server.member.entity.Member; +import com.main.server.playlist.entity.Playlist; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.persistence.*; + +@Entity +@Getter +@Setter +@NoArgsConstructor +public class Comment extends Auditable { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long commentId; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "MEMBER_ID") + private Member member; + // MEMBER_ID + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "PLAYLIST_ID") + private Playlist playlist; + // PLAYLIST_ID + + + @Column(length = 1000,nullable = false) + private String content; + //length + + private Boolean isSong; + // 구상 - 댓글 단 시점 가져와서 선착순으로 정렬, 공간 조금 할애해서 신청곡 리스트 편성. + + + public Comment(Member member, Playlist playlist, String content, Boolean isSong) { + this.member = member; + this.playlist = playlist; + this.content = content; + this.isSong = isSong; + } +} diff --git a/server/src/main/java/com/main/server/like/entity/Like.java b/server/src/main/java/com/main/server/like/entity/Like.java new file mode 100644 index 0000000..bae9201 --- /dev/null +++ b/server/src/main/java/com/main/server/like/entity/Like.java @@ -0,0 +1,37 @@ +package com.main.server.like.entity; + +import com.main.server.audit.Auditable; +import com.main.server.member.entity.Member; +import com.main.server.playlist.entity.Playlist; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.persistence.*; + +@Entity(name = "likes") +@Getter +@Setter +@NoArgsConstructor +public class Like extends Auditable { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long likeId; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "MEMBER_ID") + private Member member; + // MEMBER_ID + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "PLAYLIST_ID") + private Playlist playlist; + // PLAYLIST_ID + + + public Like(Member member, Playlist playlist) { + this.member = member; + this.playlist = playlist; + } +} diff --git a/server/src/main/java/com/main/server/member/entity/Member.java b/server/src/main/java/com/main/server/member/entity/Member.java new file mode 100644 index 0000000..229f44e --- /dev/null +++ b/server/src/main/java/com/main/server/member/entity/Member.java @@ -0,0 +1,49 @@ +package com.main.server.member.entity; + + +import com.main.server.audit.Auditable; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.persistence.*; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +@Entity +@Getter +@Setter +@NoArgsConstructor + // 주석 = 바꿔야 할 부분 +public class Member extends Auditable { + + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long memberId; + + @Column(length = 100, nullable = false, unique = true) + private String nickname; + // length + + @Column(length = 100, nullable = false, unique = true) + private String email; + // length + + @Column(length = 1000, nullable = false) + private String password; + // length + + private String memberImage; + // 타입 확인 요망 + + + public Member( String nickname, String email, String password, String memberImage) { + this.nickname = nickname; + this.email = email; + this.password = password; + this.memberImage = memberImage; + } + + +} diff --git a/server/src/main/java/com/main/server/playlist/entity/Playlist.java b/server/src/main/java/com/main/server/playlist/entity/Playlist.java new file mode 100644 index 0000000..246384f --- /dev/null +++ b/server/src/main/java/com/main/server/playlist/entity/Playlist.java @@ -0,0 +1,60 @@ +package com.main.server.playlist.entity; + + +import com.main.server.audit.Auditable; +import com.main.server.comment.entity.Comment; +import com.main.server.like.entity.Like; +import com.main.server.member.entity.Member; +import com.main.server.song.entity.Song; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.persistence.*; +import java.util.ArrayList; +import java.util.List; + +@Entity +@Getter +@Setter +@NoArgsConstructor +public class Playlist extends Auditable { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long playlistId; + + @Column(length = 100,nullable = false) + private String title; + //length + + @Column(length = 1000,nullable = false) + private String content; + //length + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "MEMBER_ID") + private Member member; + + @OneToMany(mappedBy = "playlist") + private List comments = new ArrayList<>(); + + @OneToMany(mappedBy = "playlist") + private List songs = new ArrayList<>(); + + @OneToMany(mappedBy = "playlist") + private List likes = new ArrayList<>(); + + + + + + + + + public Playlist(String title, String content, Member member) { + this.title = title; + this.content = content; + this.member = member; + } +} diff --git a/server/src/main/java/com/main/server/song/entity/Song.java b/server/src/main/java/com/main/server/song/entity/Song.java new file mode 100644 index 0000000..e30b68d --- /dev/null +++ b/server/src/main/java/com/main/server/song/entity/Song.java @@ -0,0 +1,42 @@ +package com.main.server.song.entity; + +import com.main.server.audit.Auditable; +import com.main.server.playlist.entity.Playlist; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.persistence.*; + +@Entity +@Getter +@Setter +@NoArgsConstructor +public class Song extends Auditable { + + @Id + @GeneratedValue (strategy = GenerationType.IDENTITY) + private Long songId; + // PLAYLIST_ID + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "PLAYLIST_ID") + private Playlist playlist; + //length + + @Column(length = 100, nullable = false) + private String title; + //length + + @Column(length = 1000, nullable = false) + private String url; + //length + + + public Song(Playlist playlist, Long songId, String title, String url) { + this.playlist = playlist; + this.songId = songId; + this.title = title; + this.url = url; + } +} diff --git a/server/src/main/resources/application-local.yml b/server/src/main/resources/application-local.yml new file mode 100644 index 0000000..705dae9 --- /dev/null +++ b/server/src/main/resources/application-local.yml @@ -0,0 +1,25 @@ +spring: + h2: + console: + enabled: true + path: /h2 + + datasource: + url: jdbc:h2:mem:test + + jpa: + hibernate: + ddl-auto: create # 서버가 실행될때마다 db의 테이블 초기화 및 생성 + properties: + hibernate: + format_sql: true + + +logging: + level: + org.hibernate.SQL: debug + +decorator: + datasource: + p6spy: + enable-logging: true \ No newline at end of file diff --git a/server/src/main/resources/application-server.yml b/server/src/main/resources/application-server.yml new file mode 100644 index 0000000..bc25c1f --- /dev/null +++ b/server/src/main/resources/application-server.yml @@ -0,0 +1,23 @@ +spring: + datasource: + url: ${MYSQL-URL} + username: ${MYSQL-USERNAME} + password: ${MYSQL-PASSWORD} + driver-class-name: com.mysql.cj.jdbc.Driver + + jpa: + properties: + hibernate: +# format_sql: true + database: mysql + database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + + +#logging: +# level: +# org.hibernate.SQL: debug + +decorator: + datasource: + p6spy: + enable-logging: false \ No newline at end of file diff --git a/server/src/main/resources/application.yml b/server/src/main/resources/application.yml index afe5469..12e6a4b 100644 --- a/server/src/main/resources/application.yml +++ b/server/src/main/resources/application.yml @@ -1,29 +1,19 @@ spring: - datasource: - url: jdbc:mysql://ls-666e6634dde537c7039d54e835178d57878b069f.cgw31hjdgukx.ap-northeast-2.rds.amazonaws.com/serverDB?createDatabaseIfNotExist=true - username: ${MYSQL-USERNAME} - password: ${MYSQL-PASSWORD} - driver-class-name: com.mysql.cj.jdbc.Driver - jpa: - hibernate: - ddl-auto: create # 서버가 실행될때마다 db의 테이블 초기화 및 생성 properties: hibernate: - format_sql: true - default_batch_fetch_size: 100 # 페이징 처리에 필요 - database: mysql - database-platform: org.hibernate.dialect.MySQL5InnoDBDialect + default_batch_fetch_size: 100 + open-in-view: true -logging: - level: - org.hibernate.SQL: debug +#logging: +# level: +# org.hibernate.SQL: debug -decorator: - datasource: - p6spy: - enable-logging: true +#decorator: +# datasource: +# p6spy: +# enable-logging: false # 시큐리티 jwt: @@ -31,11 +21,5 @@ jwt: access-token-expiration-minutes: 30 refresh-token-expiration-minutes: 420 -#server: -# ssl: -# key-store: classpath:localhost.p12 -# key-store-type: PKCS12 -# key-store-password: ${SSL-PASSWORD} - config: domain: "*" \ No newline at end of file