Skip to content

Commit 632b875

Browse files
committed
Dto Via JDK14 Records And JdbcTemplate
1 parent e54c10a commit 632b875

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

HibernateSpringBootDtoRecordJbcTemplate/src/main/java/com/bookstore/jdbcTemplate/dto/AuthorDto.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.bookstore.jdbcTemplate.dto;
22

33
import java.util.List;
4-
import java.io.Serializable;
54

6-
public record AuthorDto(Long id, String name, int age, List books) implements Serializable {
5+
public record AuthorDto(Long id, String name, int age, List books) {
76

87
public void addBook(BookDto book) {
98
books().add(book);
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
package com.bookstore.jdbcTemplate.dto;
22

3-
import java.io.Serializable;
4-
5-
public record BookDto(Long id, String title) implements Serializable {}
3+
public record BookDto(Long id, String title) {}

0 commit comments

Comments
 (0)