Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity #17

Merged
merged 12 commits into from
Mar 9, 2023
Merged
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules/server.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/seb42_main_024.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

131 changes: 130 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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

4 changes: 4 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -50,6 +52,8 @@ dependencies {
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
annotationProcessor 'jakarta.annotation:jakarta.annotation-api'

runtimeOnly 'com.h2database:h2'

}

tasks.named('test') {
Expand Down
Binary file modified server/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions server/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
12 changes: 8 additions & 4 deletions server/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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/.
Expand All @@ -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"'
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions server/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
26 changes: 26 additions & 0 deletions server/src/main/java/com/main/server/audit/Auditable.java
Original file line number Diff line number Diff line change
@@ -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();
}

Loading