도서관에 책을 등록할 수 있다.
HTTP Method : POST
HTTP Path : /book
HTTP Body (JSON)
{
"name": String // 책이름
}
결과 반환 X (HTTP 상태 200 OK이면 충분하다)
book 테이블
id와 책 이름을 가지고 있는 book 테이블 생성

@Entity
public class Book {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id = null;
@Column(nullable = false)
private String name;
}
public interface BookRepository extends JpaRepository<Book, Long> {
}
public class BookCreateRequest {
private String name;
public String getName() {
return name;
}
}