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
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
db/
docker/db/
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ out/
.vscode/
.idea
.env
/db
/docker/db
!/resources/db/*.sql
mongodb

Expand Down
15 changes: 1 addition & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ 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-web'
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
implementation 'co.elastic.clients:elasticsearch-java:8.14.0'
implementation 'jakarta.json:jakarta.json-api:2.1.3'
implementation 'org.eclipse.parsson:parsson:1.1.5'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
Expand All @@ -47,6 +45,7 @@ dependencies {
implementation 'io.github.resilience4j:resilience4j-reactor:2.2.0'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'
implementation 'io.github.cdimascio:java-dotenv:5.2.2'
implementation 'org.modelmapper:modelmapper:3.1.1'

implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9'

Expand Down Expand Up @@ -82,15 +81,3 @@ tasks.named('test') {
clean {
delete file('src/main/generated')
}


// bootRun 자동 컴파일 설정 (핫 리로딩)
tasks.named('bootRun') {
dependsOn 'classes'

doFirst {
println "starting bootRun with auto-compile..."
}
}


50 changes: 0 additions & 50 deletions docker-compose.yml

This file was deleted.

29 changes: 0 additions & 29 deletions docker/Dockerfile

This file was deleted.

30 changes: 30 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: "3.8"

services:
db:
image: mysql:8.4
container_name: db
platform: linux/amd64
environment:
MYSQL_USER: artrip
MYSQL_ROOT_PASSWORD: artrip1!
MYSQL_DATABASE: artrip
MYSQL_PASSWORD: artrip1!
ports:
- "33069:3306"
volumes:
- ./db/data:/var/lib/mysql
- ./db/conf:/etc/mysql/conf.d

redis:
image: redis:7.2
container_name: redis
restart: always
ports:
- "63799:6379"
volumes:
- redis-data:/data


volumes:
redis-data:
37 changes: 0 additions & 37 deletions src/main/java/org/atdev/artrip/config/ElasticsearchConfig.java

This file was deleted.

This file was deleted.

15 changes: 15 additions & 0 deletions src/main/java/org/atdev/artrip/config/WebConfig.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
package org.atdev.artrip.config;

import lombok.RequiredArgsConstructor;
import org.atdev.artrip.global.resolver.LoginUserIdArgumentResolver;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

@Configuration
@RequiredArgsConstructor
public class WebConfig implements WebMvcConfigurer {

private final LoginUserIdArgumentResolver userIdArgumentResolver;

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:3000", "http://localhost:8080", "https://dev.coffit.today")
.allowedMethods("OPTIONS","GET", "POST", "PUT", "PATCH", "DELETE")
.allowCredentials(true);
}

@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
resolvers.add(userIdArgumentResolver);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
@RestController
@RequiredArgsConstructor
@RequestMapping("/admin/exhibits")
@Slf4j
@Tag(name = "Admin - Exhibit", description = "관리자 전시 관리 API")
public class AdminExhibitController {

Expand All @@ -37,7 +36,6 @@ public class AdminExhibitController {
)
@GetMapping
public CommonResponse<PagingResponseDTO<AdminExhibitListResponse>> getExhibitList(Criteria cri) {

Choose a reason for hiding this comment

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

응답 스펙 관련해서 정해진 내용이 있다면 그걸로 변경해주세요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

log.info("Admin getting exhibit list: {}", cri);

PagingResponseDTO<AdminExhibitListResponse> result = adminExhibitService.getExhibitList(cri);

Expand All @@ -47,7 +45,6 @@ public CommonResponse<PagingResponseDTO<AdminExhibitListResponse>> getExhibitLis
@Operation(summary = "전시 상세 조회", description = "특정 전시의 상세 정보를 조회합니다.")

Choose a reason for hiding this comment

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

문서화 어노테이션 분리 필요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

우경님이 분리된 내용 공유 해줘서 그 내용기반으로 수정하도록 하겠습니다.

@GetMapping("/{exhibitId}")
public CommonResponse<AdminExhibitResponse> getExhibit(@PathVariable Long exhibitId) {
log.info("Admin getting exhibit : {}", exhibitId);

AdminExhibitResponse result = adminExhibitService.getExhibit(exhibitId);

Expand All @@ -57,7 +54,6 @@ public CommonResponse<AdminExhibitResponse> getExhibit(@PathVariable Long exhibi
@Operation(summary = "전시 등록", description = "새로운 전시를 등록합니다.")
@PostMapping
public CommonResponse<Long> createExhibit(@RequestBody CreateExhibitRequest request) {
log.info("Admin creating exhibit: title = {}", request.getTitle());

Long exhibitId = adminExhibitService.createExhibit(request);

Expand All @@ -67,7 +63,6 @@ public CommonResponse<Long> createExhibit(@RequestBody CreateExhibitRequest requ
@Operation(summary = "전시 수정", description = "특정 전시를 수정합니다.")
@PutMapping("/{exhibitId}")
public CommonResponse<Long> updateExhibit(@PathVariable Long exhibitId, @RequestBody UpdateExhibitRequest request){
log.info("Admin updating exhibit: {}", request.getTitle());

Long updatedId = adminExhibitService.updateExhibit(exhibitId, request);

Expand All @@ -77,7 +72,6 @@ public CommonResponse<Long> updateExhibit(@PathVariable Long exhibitId, @Request
@Operation(summary = "전시 삭제", description = "특정 전시를 삭제합니다.")
@DeleteMapping("/{exhibitId}")
public CommonResponse<Void> deleteExhibit(@PathVariable Long exhibitId) {
log.info("Admin deleting exhibit: {}", exhibitId);

adminExhibitService.deleteExhibit(exhibitId);
return CommonResponse.onSuccess(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
@RestController
@RequestMapping("/admin/exhibit-halls")
@RequiredArgsConstructor
@Slf4j
@Tag(name = "Admin - ExhibitHall", description = "관리자 전시관 관리 API")
public class AdminExhibitHallController {

Expand All @@ -37,7 +36,6 @@ public class AdminExhibitHallController {
)
@GetMapping
public CommonResponse<PagingResponseDTO<ExhibitHallListResponse>> getExhibitHallList(Criteria cri) {
log.info("Admin getting exhibit hall : {}" , cri);

PagingResponseDTO<ExhibitHallListResponse> result = adminExhibitHallService.getExhibitHallList(cri);

Expand All @@ -47,7 +45,6 @@ public CommonResponse<PagingResponseDTO<ExhibitHallListResponse>> getExhibitHall
@Operation(summary = "전시관 상세 조회", description = "전시관 ID로 전시관 상세 조회")
@GetMapping("/{exhibitHallId}")
public CommonResponse<ExhibitHallResponse> getExhibitHall(@PathVariable Long exhibitHallId) {
log.info("Admin getting exhibit hall : {}" , exhibitHallId);

ExhibitHallResponse result = adminExhibitHallService.getExhibitHall(exhibitHallId);

Expand All @@ -57,7 +54,6 @@ public CommonResponse<ExhibitHallResponse> getExhibitHall(@PathVariable Long exh
@Operation(summary = "전시관 등록" )
@PostMapping
public CommonResponse<Long> createExhibitHall(@RequestBody CreateExhibitHallRequest request) {
log.info("Admin creating exhibit hall : {}" , request);

Long result = adminExhibitHallService.createExhibitHall(request);

Expand All @@ -67,7 +63,6 @@ public CommonResponse<Long> createExhibitHall(@RequestBody CreateExhibitHallRequ
@Operation(summary = "전시관 수정" )
@PutMapping("/{exhibitHallId}")
public CommonResponse<Long> updateExhibitHall(@PathVariable Long exhibitHallId, @RequestBody UpdateExhibitHallRequest request) {
log.info("Admin updating exhibit hall : {}, {}", exhibitHallId, request);

Long result = adminExhibitHallService.updateExhibitHall(exhibitHallId, request);

Expand All @@ -77,7 +72,6 @@ public CommonResponse<Long> updateExhibitHall(@PathVariable Long exhibitHallId,
@Operation(summary = "전시관 삭제" )
@DeleteMapping("/{exhibitHallId}")
public CommonResponse<Void> deleteExhibitHall(@PathVariable Long exhibitHallId) {
log.info("Admin deleting exhibit hall : {}" , exhibitHallId);

adminExhibitHallService.deleteExhibitHall(exhibitHallId);

Expand Down
7 changes: 2 additions & 5 deletions src/main/java/org/atdev/artrip/controller/AuthController.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
import lombok.RequiredArgsConstructor;
import org.atdev.artrip.controller.dto.request.ReissueRequest;
import org.atdev.artrip.global.apipayload.code.status.UserErrorCode;
import org.atdev.artrip.global.resolver.LoginUser;
import org.atdev.artrip.service.AuthService;
import org.atdev.artrip.controller.dto.request.SocialLoginRequest;
import org.atdev.artrip.controller.dto.response.SocialLoginResponse;
import org.atdev.artrip.global.apipayload.CommonResponse;
import org.atdev.artrip.global.apipayload.code.status.CommonErrorCode;
import org.atdev.artrip.global.swagger.ApiErrorResponses;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.*;

@RestController
Expand Down Expand Up @@ -110,9 +109,7 @@ public ResponseEntity<CommonResponse<SocialLoginResponse>> socialLogin(@RequestB
@Operation(summary = "isFirstLogin값 반전 api")
@PostMapping("/complete")
public ResponseEntity<String> completeOnboarding(
@AuthenticationPrincipal UserDetails userDetails) {

long userId = Long.parseLong(userDetails.getUsername());
@LoginUser Long userId) {

authService.completeOnboarding(userId);

Expand Down
Loading