Modify Post를 Note로 수정

This commit is contained in:
Daeil Choi
2023-02-06 13:55:02 +09:00
parent b7d58486ac
commit f6d702da7f
16 changed files with 173 additions and 173 deletions

View File

@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.example.springsecuritystudy.post.PostDto;
import com.example.springsecuritystudy.note.NoteDto;
import lombok.RequiredArgsConstructor;
@@ -33,8 +33,8 @@ public class NoticeController {
}
@PostMapping
public String savePost(@ModelAttribute PostDto postDto) {
noticeService.saveNotice(postDto.getTitle(), postDto.getContent());
public String savePost(@ModelAttribute NoteDto noteDto) {
noticeService.saveNotice(noteDto.getTitle(), noteDto.getContent());
return "redirect:notice";
}