Merge pull request #18 from codej99/feature/board
게시판 업데이트 수정 - 변경감지 기능 이용
This commit is contained in:
@@ -5,22 +5,22 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
public class ParamsPost {
|
||||
@NotEmpty
|
||||
@Max(50)
|
||||
@Size(min = 2, max = 50)
|
||||
@ApiModelProperty(value = "작성자명", required = true)
|
||||
private String author;
|
||||
@NotEmpty
|
||||
@Max(100)
|
||||
@Size(min = 2, max = 100)
|
||||
@ApiModelProperty(value = "제목", required = true)
|
||||
private String title;
|
||||
@Max(500)
|
||||
@Size(min = 2, max = 500)
|
||||
@ApiModelProperty(value = "내용", required = true)
|
||||
private String content;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class BoardService {
|
||||
throw new CNotOwnerException();
|
||||
|
||||
post.setUpdate(paramsPost.getAuthor(), paramsPost.getTitle(), paramsPost.getContent());
|
||||
return postJpaRepo.save(post);
|
||||
return post;
|
||||
}
|
||||
|
||||
// 게시물을 삭제합니다. 게시물 등록자와 로그인 회원정보가 틀리면 CNotOwnerException 처리합니다.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.rest.api.controller.v1.board;
|
||||
|
||||
public class BoardControllerTest {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user