Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
684a026
Docs/README 작성
LEEMINGU03 Jun 12, 2026
a7008d3
Docs/postman
LEEMINGU03 Jun 12, 2026
89717d4
Setting/ 세팅
LEEMINGU03 Jun 12, 2026
2f542a3
Feat/회원가입 controller
LEEMINGU03 Jun 12, 2026
035fc74
Feat/ 생성시간
LEEMINGU03 Jun 12, 2026
6ee84f3
Feat/ CustomUserDetails(UserDetails 상속)
LEEMINGU03 Jun 12, 2026
ba68a37
Feat/ CustomUserDetailsService(UserDetailsService상속)
LEEMINGU03 Jun 12, 2026
a2478cf
Feat/ 예외처리
LEEMINGU03 Jun 12, 2026
915f135
Feat/ 회원가입 dto
LEEMINGU03 Jun 12, 2026
6a977b5
Feat/ 회원가입 dto
LEEMINGU03 Jun 12, 2026
79f7673
Feat/ 회원가입 service
LEEMINGU03 Jun 12, 2026
d6341c4
Feat/ JWT 토큰을 검증
LEEMINGU03 Jun 12, 2026
02d992f
Feat/ login dto
LEEMINGU03 Jun 12, 2026
18649f5
Feat/ login fillter
LEEMINGU03 Jun 12, 2026
9e53be2
Feat/ 게시판 entity
LEEMINGU03 Jun 12, 2026
e2891a5
Feat/ 게시판 controller
LEEMINGU03 Jun 12, 2026
d3d1dd6
Feat/ 게시판 생성 요청 dto
LEEMINGU03 Jun 12, 2026
44f3757
Feat/ 게시판 레파지토리
LEEMINGU03 Jun 12, 2026
e272daf
Feat/ 게시판 응답 dto
LEEMINGU03 Jun 12, 2026
bff9c0c
Feat/ 게시판 service
LEEMINGU03 Jun 12, 2026
708dc24
Feat/ 게시판 수정 dto
LEEMINGU03 Jun 12, 2026
8ab851c
Feat/ Rsdata
LEEMINGU03 Jun 12, 2026
a292b6b
Feat/ Spring Security 설정
LEEMINGU03 Jun 12, 2026
b739d9f
Feat/ 실행
LEEMINGU03 Jun 12, 2026
253f602
Feat/ user entity
LEEMINGU03 Jun 12, 2026
46aaf0c
Feat/ user 레포
LEEMINGU03 Jun 12, 2026
d9a718c
Feat/ test
LEEMINGU03 Jun 12, 2026
c5fb006
Docs/ 스크린샷
LEEMINGU03 Jun 12, 2026
06601d5
Refactor/ 수정
LEEMINGU03 Jun 12, 2026
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
3 changes: 3 additions & 0 deletions springsecurity/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/gradlew text eol=lf
*.bat text eol=crlf
*.jar binary
40 changes: 40 additions & 0 deletions springsecurity/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

.env
.idea/
Binary file added springsecurity/Docs/Post/404NotFound.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added springsecurity/Docs/Post/deletePost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added springsecurity/Docs/Post/newPost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added springsecurity/Docs/Post/updatePost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added springsecurity/Docs/UserDB.png

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

password 값을 encoder 사용해서 암호화 걸어주신 부분 잘 처리해주셨네요! 😊

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added springsecurity/Docs/User_already_exist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added springsecurity/Docs/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added springsecurity/Docs/register.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added springsecurity/Docs/token.png

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미지 파일명은 token인데 테스트 결과 화면은 조회 결과 완료된 이미지 내용인 부분을 확인했습니다. 혹시 파일 명을 token으로 지정해주신 이유에 대해서 설명해주실 수 있을까요?

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions springsecurity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 과제명
JWT 인증 서버

## ⚙️ 실행 방법
1. mysql 생성 후 SCHEMAS 생성
2. .env 에 DB정보 입력
3. SpringsecurityApplication 실행

## 💡 작업 내용
- 회원가입 - POST /auth/register
- 로그인 - POST /auth/login → JWT 토큰 수령
- GET /posts (protected) → Authorization: Bearer {token}

# API 명세

| Method | URI | 설명 |
|--------|---------------|------|
| POST | /post | 게시글 생성 |
| GET | /post | 게시글 목록 조회 |
| GET | /post/{id} | 게시글 단건 조회 |
| PUT | /post/{id} | 게시글 수정 |
| DELETE | /post/{id} | 게시글 삭제 |
| POST | auth/register | 회원가입|
| POST | auth/login | JWT 토큰 수령 |





# API 성공 세부 사항
- 200-1: 게시물 등록 성공
- 200-2: 게시물 단건 조회 선공
- 200-3: 게시물 수정 조회 선공
- 200-4: 게시물 삭제 선공
- 200-5: 게시물 전체 조회 선공
- 200-6 : 로그인 성공

## 🤔 느낀 점 / 어려웠던 점
- 전체적인 회원가입과 로그인의 구조에 대해 알게 되었습니다..
- 하지만 refresh 토큰과 access 토큰을 사용해서 보안을 강화 하는법과 예외처리하는 법을 더욱 자세히 작성해야할거같습니다(시험끝나고 보안하겠습니다)
- spring security 가 Dispatcher Servlet 앞단에 어떻게 작동하는지에 대해 집중하여 학습해보았습니다.
- 헷갈리는 것도 많고 했지만 많은 자료들을 찾아보며 작성하였습니다.
- 예외처리가 많이 부족하게 되어있습니다...
44 changes: 44 additions & 0 deletions springsecurity/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id 'java'
id 'org.springframework.boot' version '4.0.6'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.project'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
testImplementation 'org.springframework.boot:spring-boot-starter-security-test'
testImplementation 'org.springframework.boot:spring-boot-starter-thymeleaf-test'
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
testCompileOnly 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testAnnotationProcessor 'org.projectlombok:lombok'
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3'
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file added springsecurity/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
9 changes: 9 additions & 0 deletions springsecurity/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
248 changes: 248 additions & 0 deletions springsecurity/gradlew

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

Loading