Tutorial by Examples

Customer Model package org.bookmytickets.model; import org.springframework.data.annotation.Id; public class Customer { @Id private String id; private String firstName; private String lastName; public Customer() {} public Customer(String firstName, String la...
package org.bookmytickets.controller; import java.util.List; import org.bookmytickets.model.Customer; import org.bookmytickets.repository.CustomerRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import o...
package org.bookmytickets.repository; import java.util.List; import org.bookmytickets.model.Customer; import org.springframework.data.mongodb.repository.MongoRepository; public interface CustomerRepository extends MongoRepository<Customer, String> { public Customer findByFirstNa...
Please add below dependencies in pom.xml file: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> &l...
For testing our application, I'm using advance rest client which is chrome extension: So, here is the snapshot for inserting the data:

Page 1 of 1