public interface BookRepository extends JpaRepository<Book, Long> List<Book> findByAuthor(String author);
@Service @RequiredArgsConstructor public class BookService private final BookRepository bookRepo; public Book saveBook(Book book) return bookRepo.save(book); Spring Boot In Action
management.endpoints.web.exposure.include=health,info,metrics Build a fat JAR: public interface BookRepository extends JpaRepository<
@Entity @Data @NoArgsConstructor public class Book @Id @GeneratedValue private Long id; private String title; private String author; public Book saveBook(Book book) return bookRepo.save(book)