Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
c4ec1fe
[#58] chore: AWS 개발을 위한 build.gradle, .gitignore 업데이트
tpgus1221 Sep 2, 2025
34dc247
Merge branch 'dev' of https://github.com/tpgus1221/IssueDive into dev
tpgus1221 Sep 2, 2025
2a4eb36
fix: application-test.properties가 포함된 문제 해결
tpgus1221 Sep 3, 2025
0cc5688
Merge pull request #66 from tpgus1221/chore/AWS
tpgus1221 Sep 3, 2025
bcfceb5
[#56] chore: CD 구축
meraki6512 Sep 4, 2025
14b7e8d
Merge branch 'IssueDiver:dev' into dev
meraki6512 Sep 4, 2025
2b2b9d3
Merge branch 'dev' of https://github.com/meraki6512/IssueDive into fe…
meraki6512 Sep 4, 2025
202a373
[#67] chore: branch 머지 실수 복구용 커밋
meraki6512 Sep 4, 2025
fe19e7d
Merge branch 'feat/67-issue-filter' of https://github.com/meraki6512/…
meraki6512 Sep 4, 2025
5112439
Merge pull request #70 from meraki6512/feat/67-issue-filter
meraki6512 Sep 4, 2025
a0c82dd
[#68] feat: 이슈 '작업중' 상태 추가
meraki6512 Sep 4, 2025
359753a
[#68] feat: 이슈 '작업중' 상태 추가에 따른 테스트 코드 수정
meraki6512 Sep 4, 2025
5fce436
Merge pull request #71 from meraki6512/feat/68-issue-state
meraki6512 Sep 4, 2025
a1a2dfb
[#73] feat: issue-comment 관계추가
sungchaelee Sep 5, 2025
cd6aa4a
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Sep 5, 2025
a689c70
[#73] feat: issue-comment 관계추가
sungchaelee Sep 5, 2025
121451a
[#72] fix: 이슈 라벨 조회 및 수정 기능 버그 해결
meraki6512 Sep 5, 2025
b51c272
[#72] test: IssueService 리팩토링에 따른 테스트 코드 수정
meraki6512 Sep 5, 2025
6d2c5ce
Merge pull request #76 from meraki6512/feat/72-issue-label
meraki6512 Sep 5, 2025
27894f8
fix: AWS 배포 테스트 중 발견한 버그 수정
tpgus1221 Sep 5, 2025
0216792
Merge branch 'dev' into bugfix
tpgus1221 Sep 5, 2025
c14c747
Merge pull request #77 from tpgus1221/bugfix
tpgus1221 Sep 5, 2025
5fb2768
fix: 팀원 PR과의 중복 작업으로 발생한 라벨 매핑 및 DB 마이그레이션 충돌 보완
tpgus1221 Sep 5, 2025
7d1bb96
Merge pull request #78 from tpgus1221/dev
tpgus1221 Sep 5, 2025
9bdbd3a
[#79] fix: 댓글 API 응답 데이터 및 정렬 로직 수정
meraki6512 Sep 5, 2025
c5baa2c
Merge pull request #80 from meraki6512/fix/72-comment-logic
meraki6512 Sep 5, 2025
5d239af
[#81] feat: 이슈 담당자 다중 지정 기능 구현
meraki6512 Sep 5, 2025
f57bed7
Merge pull request #82 from meraki6512/feat/81-issue-users
meraki6512 Sep 5, 2025
b1cd679
[#81] fix: 이슈 담당자 다중 지정 기능 구현 - JPA 영속성 및 지연 로딩 관련 오류 수정
meraki6512 Sep 5, 2025
227cb26
[#81] test: 이슈 담당자 다중 지정 기능 구현 - JPA 영속성 및 지연 로딩 관련 오류 수정 후 테스트 코드 반영
meraki6512 Sep 5, 2025
0949c6c
Merge pull request #83 from meraki6512/feat/81-issue-users
meraki6512 Sep 5, 2025
66d073f
[#84] feat: 이슈 상세 페이지 탐색 기능 추가
meraki6512 Sep 7, 2025
774b3c2
Merge pull request #85 from meraki6512/feat/84-issue-nav
meraki6512 Sep 7, 2025
bfb1f5b
[#86] fix: 사용 중인 라벨 삭제 시 외래 키 제약 조건 오류 발생 문제 해결
meraki6512 Sep 7, 2025
7f8114c
Merge pull request #87 from meraki6512/fix/86-label-delete-constraint
meraki6512 Sep 7, 2025
1118683
[#67] fix: 이슈 검색 시 라벨 및 담당자 이름 포함
meraki6512 Sep 7, 2025
735411f
Merge pull request #88 from meraki6512/fix/query-builder
meraki6512 Sep 7, 2025
13bdcf4
[#89] ffeat: ì성능개선을 위한 íŒ설정, issue에 캐싱
sungchaelee Sep 8, 2025
f87c661
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Sep 8, 2025
55c6470
[#90] feat: label 통계 기능 구현 - openCount 필드 추가
tpgus1221 Sep 8, 2025
dab595c
Merge pull request #92 from tpgus1221/feature/label-stats
tpgus1221 Sep 8, 2025
ef6f52c
[#56] chore: .gitignore application-test.properties 제거
meraki6512 Sep 8, 2025
a7348bf
Merge branch 'dev' of https://github.com/meraki6512/IssueDive into ch…
meraki6512 Sep 8, 2025
ac41721
[#93]refactor: 라벨 관련 리팩토링
tpgus1221 Sep 8, 2025
0512fe8
Merge pull request #94 from tpgus1221/refactor/label
tpgus1221 Sep 8, 2025
6173b84
[#56] refactor: 테스트 환경 리팩토링 및 CI 빌드 오류 해결
meraki6512 Sep 8, 2025
0efcfdf
Merge remote-tracking branch 'upstream/dev' into chore/56-setup-cd
meraki6512 Sep 8, 2025
f07c4f2
[#56, #93] Merge: 93번 브랜치 병합 충돌 해결 중 테스트 코드 수정
meraki6512 Sep 8, 2025
d434a3a
Merge pull request #96 from meraki6512/chore/56-setup-cd
meraki6512 Sep 8, 2025
80577ab
[#89] refactor: 캐싱으로 인한 직렬화 적용
sungchaelee Sep 8, 2025
0b12015
[#89] feat: 캐싱 추가
sungchaelee Sep 8, 2025
bd9e983
[#89] docs: 머지를 위한 문서 삭제
sungchaelee Sep 9, 2025
00626a5
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Sep 9, 2025
2c1d19e
[#89] docs: 인덱스 추가
sungchaelee Sep 9, 2025
eeb5892
[#91] feat:Redis 블랙리스트 기반 JWT 토큰 무효화 및 로그아웃 기능 구현
project36bys Sep 9, 2025
dcf4dfc
[#91] feat: 로그 메세지 영어로 변경
project36bys Sep 9, 2025
b485c0e
Merge pull request #97 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 9, 2025
b3ea58f
Revert "Feature/91 logout"
soyeonkim8888 Sep 9, 2025
8529b33
Merge pull request #99 from IssueDiver/revert-97-feature/91-logout
soyeonkim8888 Sep 9, 2025
9edea7b
[#89] do,#57cs: docker설정, prometheus수정
sungchaelee Sep 9, 2025
45f26c9
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Sep 9, 2025
34fbf3a
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Sep 9, 2025
dc8b857
Merge pull request #102 from sungchaelee/feature/1-comment-api
sungchaelee Sep 9, 2025
448298a
[#91] feat: 로그아웃 기능 추가에 따른 authControllerTest/JwtAuthenicationFilterT…
project36bys Sep 9, 2025
83f6b09
[#100] chore: XSS 방어 및 DTO 유효성 검증 추가
meraki6512 Sep 9, 2025
f3d53fd
Merge remote-tracking branch 'upstream/dev' into chore/100-enhance-in…
meraki6512 Sep 9, 2025
f0d490a
Merge pull request #103 from meraki6512/chore/100-enhance-input-security
meraki6512 Sep 9, 2025
a6dae5c
[#91] test: 컨트롤러 테스트에 TestWebMvcConfig 추가하여 TokenBlackListService 의존성 해결
project36bys Sep 9, 2025
946b5d4
Merge branch 'dev' into feature/91-logout
soyeonkim8888 Sep 9, 2025
b76777c
Merge pull request #104 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 9, 2025
75927a3
Revert "Feature/91 logout"
soyeonkim8888 Sep 9, 2025
1a37c79
Merge pull request #105 from IssueDiver/revert-104-feature/91-logout
soyeonkim8888 Sep 9, 2025
3379ca1
[#100] fix: XSS 필터의 이메일/비밀번호 처리 버그 수정
meraki6512 Sep 9, 2025
3864a5a
Merge remote-tracking branch 'upstream/dev' into fix/100-xss-filter-e…
meraki6512 Sep 9, 2025
2438075
Merge pull request #107 from meraki6512/fix/100-xss-filter-email-bug
meraki6512 Sep 9, 2025
21c45a5
[#108] fix: DTO 유효성 검증 실패 시 전체 에러 메시지가 노출되는 문제 해결
meraki6512 Sep 10, 2025
5f7cf19
Merge pull request #109 from meraki6512/fix/108-improve-validation-er…
meraki6512 Sep 10, 2025
683a989
[#91]feat: RedisConfig.java conflict수정 완료
project36bys Sep 9, 2025
2bb3ae9
[#91] feat:logout + refresh token feature added
project36bys Sep 10, 2025
c0a99b7
[#101] test: LabelService, IssueLabelService 테스트 코드 작성
tpgus1221 Sep 10, 2025
42ecaca
Merge pull request #111 from tpgus1221/test/label
tpgus1221 Sep 10, 2025
7a01e35
[#112] feat: 회원가입 성공 시 JWT 토큰을 함께 반환하여 자동 로그인 지원
meraki6512 Sep 10, 2025
d1a4741
Merge pull request #113 from meraki6512/feat/112-auto-login
meraki6512 Sep 10, 2025
7a58d1a
[#91]feat:토큰갱신 오류 수정
project36bys Sep 10, 2025
56d3f3b
Merge branch 'dev' into feature/91-logout
soyeonkim8888 Sep 10, 2025
be66237
[#110] chore: Docker 실행권한 추가, 모니터링 도구 도커에서 삭제
sungchaelee Sep 10, 2025
4abe37e
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Sep 10, 2025
0b2438d
Merge pull request #106 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 10, 2025
af7579d
Revert "[#91] feat:redisConfig수정"
soyeonkim8888 Sep 10, 2025
00e6db7
Merge pull request #114 from IssueDiver/revert-106-feature/91-logout
soyeonkim8888 Sep 10, 2025
7a6989c
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Sep 10, 2025
291896c
Merge pull request #115 from sungchaelee/feature/1-comment-api
sungchaelee Sep 10, 2025
6bb8849
[#116] feat: '댓글 많은 순' 정렬 기능 추가
meraki6512 Sep 10, 2025
8d35b24
Merge remote-tracking branch 'origin/dev' into feat/116-add-most-comm…
meraki6512 Sep 10, 2025
2c15524
Merge pull request #117 from meraki6512/feat/116-add-most-commented-sort
meraki6512 Sep 10, 2025
fb6f934
fix: created_at, updated_at 값이 null로 입력되는 오류 수정
tpgus1221 Sep 10, 2025
56acbac
[#91]feat: feat: 로그아웃 기능 구현 및 토큰 블랙리스트 추가
project36bys Sep 10, 2025
a815a76
Merge pull request #118 from tpgus1221/fix/label
tpgus1221 Sep 10, 2025
c3c6b8d
Merge branch 'dev' of https://github.com/meraki6512/IssueDive into fe…
meraki6512 Sep 10, 2025
7a302f3
[#No-Issue] chore: .gitignore에 .DS_Store 파일 추가
meraki6512 Sep 10, 2025
cbd23ad
Merge branch 'feat/116-add-most-commented-sort' into dev
meraki6512 Sep 10, 2025
7e425ee
[#No-Issue] chore: .gitignore에 .DS_Store 파일 추가
meraki6512 Sep 10, 2025
f04db6e
Merge pull request #119 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 10, 2025
f3bfc45
[#91]feat: SecurityConfig/Test 파일 수정
project36bys Sep 10, 2025
7ac9570
Merge pull request #121 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 10, 2025
5611519
[#120] refactor: N+1 문제 해결 및 DB 인덱싱을 통한 쿼리 성능 최적화
meraki6512 Sep 10, 2025
5830d82
[#120] refactor: 쿼리 성능 최적화에 따른 LabelServiceTest 테스트코드 수정
meraki6512 Sep 10, 2025
b80c681
[#91]feat: securityConfigTest 수정
project36bys Sep 10, 2025
35262cf
Merge pull request #122 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 10, 2025
ae3541b
Revert "[#91]feat: 로그아웃 기능 구현 및 토큰 블랙리스트 추가"
soyeonkim8888 Sep 10, 2025
64a9887
Merge pull request #123 from IssueDiver/revert-119-feature/91-logout
soyeonkim8888 Sep 10, 2025
6dbd863
Revert "Merge pull request #121 from soyeonkim8888/feature/91-logout"
project36bys Sep 10, 2025
10fcb81
Merge pull request #124 from soyeonkim8888/revert-121
soyeonkim8888 Sep 10, 2025
d79c511
[91] feat
project36bys Sep 11, 2025
127e8bd
Merge pull request #125 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 11, 2025
9fa4ee9
[#91]feat:TokenBlackListService 클래스를 찾을 수 없어서 빌드 실패
project36bys Sep 11, 2025
4ff9fec
[#91] feat: PR 위해 주석변경
project36bys Sep 11, 2025
05b6e44
Merge pull request #126 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 11, 2025
afae944
[#91]:feat:테스트시에 redis연결을 시도해서 Redis 비활성화
project36bys Sep 11, 2025
9f56244
Merge pull request #127 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 11, 2025
cd48dfa
[#91]feat: cache 삭제 후 푸쉬
project36bys Sep 11, 2025
4623ac2
Merge pull request #128 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 11, 2025
749689e
[#91]feat: 원본dev에 없는 파일들 다시 add 후 PR 시도
project36bys Sep 11, 2025
67f90a2
[#91]feat: Add Redis dependency
project36bys Sep 11, 2025
7b3c789
Merge pull request #129 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 11, 2025
510a0d7
[#91] feat:securityConfig/Tes수정
project36bys Sep 11, 2025
ed9e42a
Merge pull request #130 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 11, 2025
4561e21
Merge remote-tracking branch 'upstream/dev' into refactor/120-enhance…
meraki6512 Sep 11, 2025
2ee95b4
Merge pull request #131 from meraki6512/refactor/120-enhance-performance
meraki6512 Sep 11, 2025
a677a0e
[#91]feat:DB기반 주석 해제/ InMemoryUserDetailsManager삭제
project36bys Sep 11, 2025
a35e4fc
Merge pull request #132 from soyeonkim8888/feature/91-logout
soyeonkim8888 Sep 11, 2025
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
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: IssueDive Deploy to Production Server

# main 브랜치에 푸시(보통 dev -> main으로 PR이 merge될 때)될 때 실행됩니다.
on:
push:
branches: [ "main" ]

jobs:
deploy:
name: Deploy to EC2
runs-on: ubuntu-latest
steps:
- name: Deploy to Server
# SSH를 통해 서버에 원격 접속하여 명령어를 실행해주는 Action
uses: appleboy/ssh-action@master
with:
# GitHub Secrets에 등록할 정보들
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}

# 서버에 접속해서 실행할 스크립트
script: |
# 1. Docker Hub에 로그인
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}

# 2. 최신 Docker 이미지 받아오기
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/issuedive:latest

# 3. 기존에 실행 중인 앱 컨테이너가 있다면 중지하고 삭제 (최초 실행 시 오류가 나지 않도록 || true 추가)
docker stop issuedive-app || true
docker rm issuedive-app || true

# 4. 최신 이미지로 새로운 앱 컨테이너 실행
# 이전에 생성한 Docker 네트워크와 .env 파일을 사용합니다.
docker run -d --name issuedive-app \
-p 8080:8080 \
--network issue-dive-net \
--env-file /home/ec2-user/.env \
${{ secrets.DOCKERHUB_USERNAME }}/issuedive:latest
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
HELP.md
.gradle
.gradle/
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
Expand Down Expand Up @@ -38,8 +39,8 @@ out/

# Application Properties
application.properties
application-test.properties
application-dev.properties
application-prod.yml

.secrets
.env
Expand All @@ -52,4 +53,12 @@ gradle.properties
# JWT 시크릿 키나 API 키가 포함된 파일
**/secrets.properties
**/*.secret
**/jwt.properties
**/jwt.properties

#성능 테스트 파일
**/DataLoader.java
test.js

# macOS 시스템 파일
.DS_Store
**/*.DS_Store
Empty file removed Docker
Empty file.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ WORKDIR /app
COPY build.gradle settings.gradle gradlew ./
COPY gradle ./gradle

# gradlew 파일에 실행 권한 부여
RUN chmod +x gradlew && sed -i 's/\r$//' gradlew

# 의존성 다운로드 (네트워크를 사용하는 단계이므로 먼저 실행)
RUN ./gradlew --no-daemon dependencies

Expand Down
41 changes: 25 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,25 @@ repositories {
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-mysql'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'

// --- Flyway ---
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-mysql' // flywayClean 같은 명령어 직접 사용 시 필요. 라이브러리 지정.

// --- 테스트 의존성 ---
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:mysql'
testImplementation 'com.h2database:h2'
// flywayPlugin 'org.flywaydb:flyway-mysql' // flywayClean 같은 명령어 직접 사용 시 필요. 라이브러리 지정.
runtimeOnly 'com.h2database:h2'

// QueryDsl
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
Expand All @@ -69,21 +71,23 @@ dependencies {
// API docs
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.11'

runtimeOnly 'com.h2database:h2'

// JWT 의존성 추가
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// @MockitoBean 지원을 위한 의존성
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.mockito:mockito-core:5.11.0'
// --- 로깅 및 모니터링 ---
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-actuator' // Spring Boot Actuator
implementation 'io.micrometer:micrometer-registry-prometheus' // Micrometer (Prometheus 연동을 위함)

// XSS 방어를 위한 HTML Sanitizer 라이브러리
implementation 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20220608.1'

// Spring Boot Actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// Micrometer (Prometheus 연동을 위함)
implementation 'io.micrometer:micrometer-registry-prometheus'
// implementation이 맞는지 확인 (compile이나 runtimeOnly가 아닌)
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'io.lettuce:lettuce-core'
}

// Query DSL 설정
Expand All @@ -93,6 +97,7 @@ clean{

tasks.named('test') {
useJUnitPlatform()
systemProperties(System.getProperties())
jvmArgs '-Xshare:off'
}

Expand All @@ -110,4 +115,8 @@ flyway {
locations = ['filesystem:src/main/resources/db/migration']
// cleanDisabled는 DB 연결 정보와 무관하므로 바깥에 두어도 안전합니다.
cleanDisabled = false
}
// 테스트 프로퍼티 파일을 참조하도록 설정
// configFiles = ['src/test/resources/application-test.properties']
}

bootJar { archiveFileName = 'app.jar' }
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ services:
timeout: 5s
retries: 5

redis:
image: redis:8.2.1
container_name: my-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: [ "redis-server", "--appendonly", "yes" ]

app:
build:
context: .
Expand All @@ -28,14 +37,19 @@ services:
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
environment:
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
REDIS_HOST: redis
REDIS_PORT: 6379
ports:
- "8080:8080"
command: ./gradlew bootRun
tty: true

volumes:
mysql-data:
redis-data:
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions gradlew

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

4 changes: 2 additions & 2 deletions gradlew.bat

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

2 changes: 2 additions & 0 deletions src/main/java/com/issueDive/IssueDiveApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;

@SpringBootApplication
@EnableCaching
public class IssueDiveApplication {

public static void main(String[] args) {
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/issueDive/config/NoXss.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.issueDive.config;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* 이 어노테이션이 선언된 DTO의 필드는
* XSS 방지 필터링(Sanitization)을 적용하지 않습니다.
* (이메일, 비밀번호 등 특수문자가 필요한 필드에 사용)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface NoXss {
}
58 changes: 58 additions & 0 deletions src/main/java/com/issueDive/config/RedisConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.issueDive.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;

/**
* 9월 10일 최종 - Redis 설정 클래스
* JWT 토큰 블랙리스트 관리를 위한 Redis 설정
*/
@Configuration
public class RedisConfig {
@Value("${spring.redis.host:localhost}")
private String redisHost;

@Value("${spring.redis.port:6379}")
private int redisPort;

/**
* 9월 10일 최종 - Redis Connection Factory 설정
*/
@Bean
public RedisConnectionFactory redisConnectionFactory() {
return new LettuceConnectionFactory(redisHost, redisPort);
}

/**
* 9월 10일 최종 - RedisTemplate 설정
* 일반적인 Redis 작업을 위한 템플릿
*
*/
@Bean
public RedisTemplate<String, Object> redisTemplate() {
RedisTemplate<String, Object> template = new RedisTemplate<>();
template.setConnectionFactory(redisConnectionFactory());
template.setKeySerializer(new StringRedisSerializer());
template.setValueSerializer(new StringRedisSerializer());
template.setHashKeySerializer(new StringRedisSerializer());
template.setHashValueSerializer(new StringRedisSerializer());
return template;
}

/**
* 9월 10일 최종 - StringRedisTemplate 설정
* 문자열 전용 Redis 작업을 위한 템플릿
*/
@Bean
public StringRedisTemplate stringRedisTemplate() {
StringRedisTemplate template = new StringRedisTemplate();
template.setConnectionFactory(redisConnectionFactory());
return template;
}
}
8 changes: 5 additions & 3 deletions src/main/java/com/issueDive/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public class SecurityConfig {


// 공개적으로 접근 가능한 URL 목록
//
private static final String[] PUBLIC_URLS = {
"/swagger-ui/**",
"/v3/api-docs/**",
"/swagger-resources/**",
"/auth/**",
"/actuator/**"
};

Expand All @@ -53,7 +53,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(authorize -> authorize
.requestMatchers(PUBLIC_URLS).permitAll() // 공개 URL은 모두 허용
.requestMatchers("/auth/**", "/login").permitAll() // 1. 로그인/인증 관련 경로는 모두 허용
.requestMatchers("/auth/signup", "/auth/login").permitAll() // 1. 로그인/인증 관련 경로는 모두 허용
.requestMatchers(HttpMethod.GET, "/issues", "/issues/**").permitAll() // 2. 이슈 조회(GET)는 모두 허용
.requestMatchers(HttpMethod.GET, "/labels", "/labels/**").permitAll() // 3. 라벨 조회(GET)도 모두 허용
.anyRequest().authenticated() // 나머지는 인증 필요
Expand All @@ -70,7 +70,6 @@ public CorsConfigurationSource corsConfigurationSource() {

// 프론트엔드 서버 주소 허용
configuration.setAllowedOrigins(Arrays.asList("http://localhost:5173", "http://localhost:5174"));
// configuration.setAllowedOrigins(Arrays.asList("http://localhost:5174"));
// 모든 HTTP 메서드 허용
configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"));
// 모든 헤더 허용
Expand All @@ -90,6 +89,7 @@ public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}

/*
@Bean
public UserDetailsService userDetailsService(PasswordEncoder passwordEncoder) {
UserDetails user = User.withUsername("test")
Expand All @@ -99,6 +99,8 @@ public UserDetailsService userDetailsService(PasswordEncoder passwordEncoder) {
return new InMemoryUserDetailsManager(user);
}

*/

@Bean
public AuthenticationManager authenticationManager(AuthenticationConfiguration config) throws Exception {
return config.getAuthenticationManager();
Expand Down
Loading