Skip to content

Commit

Permalink
tomcat file size limit extend
Browse files Browse the repository at this point in the history
  • Loading branch information
songhaechan committed Nov 6, 2023
1 parent 869b4a7 commit 4dea6cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,19 @@ public CommonIdResponse saveBoard(
@DeleteMapping("/boards/{boardId}")
@BoardWriterAuth
public CommonIdResponse deleteBoard(
@PathVariable Long boardId,
@SessionAttribute Long memberId
@PathVariable Long boardId
) {
return boardService.deleteBoard(boardId, memberId);
return boardService.deleteBoard(boardId);
}

// 게시글 수정
@PatchMapping("/boards/{boardId}")
@BoardWriterAuth
public CommonIdResponse updateBoard(
@PathVariable Long boardId,
@SessionAttribute Long memberId,
@Valid @RequestBody BoardUpdateRequest boardUpdateRequest
) {
return boardService.updateBoard(boardId, memberId, boardUpdateRequest);
return boardService.updateBoard(boardId, boardUpdateRequest);
}

// 상세 게시글 조회
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/squad/board/service/BoardService.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ public BoardDetailResponse findOneBoard(Long boardId) {
return response;
}

public CommonIdResponse deleteBoard(Long boardId, Long memberId) {
public CommonIdResponse deleteBoard(Long boardId) {
String imageFileName = imageMapper.findImageFileName(boardId);
s3Service.deleteImage(imageFileName);
boardMapper.deleteById(boardId);
commentMapper.deleteByBoardId(boardId);
return new CommonIdResponse(boardId);
}

public CommonIdResponse updateBoard(Long boardId, Long memberId, BoardUpdateRequest dto) {
public CommonIdResponse updateBoard(Long boardId, BoardUpdateRequest dto) {
LocalDateTime modifiedDate = LocalDateTime.now();
boardMapper.updateById(boardId, dto, modifiedDate);
return new CommonIdResponse(boardId);
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
spring:
servlet:
multipart:
max-file-size: 5MB
max-request-size: 100MB
data:
redis:
host: redis
Expand Down

0 comments on commit 4dea6cd

Please sign in to comment.