Add dependency:
@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 Book saveBook(Book book) return bookRepo.save(book)
java -jar target/myapp-0.0.1-SNAPSHOT.jar Spring Boot In Action
public interface BookRepository extends JpaRepository<Book, Long> List<Book> findByAuthor(String author);
application-dev.properties , application-prod.properties Activate: spring.profiles.active=dev 5. Data Persistence (JPA + Repository) Entity: