{"id":15472,"date":"2023-05-02T04:01:00","date_gmt":"2023-05-02T04:01:00","guid":{"rendered":"https:\/\/www.ebhor.com\/?p=15472"},"modified":"2023-05-02T07:33:27","modified_gmt":"2023-05-02T07:33:27","slug":"spring-boot-crud-example-with-mysql","status":"publish","type":"post","link":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/","title":{"rendered":"Spring boot crud example with MySQL and Postman"},"content":{"rendered":"\n

Here we are discussing the Spring boot crud example with MySQL that will include all basic operations few queries for JPA and check responsesProject using Postman.<\/p>\n\n\n\n

Project Explorer for Spring boot crud example with MySQL<\/h2>\n\n\n
\n
\"Project
Project Explorer: Spring Boot CRUD Project<\/figcaption><\/figure><\/div>\n\n\n

Starting Spring boot Project with Spring Initializer<\/h2>\n\n\n\n

Open Spring Initializer<\/a><\/p>\n\n\n\n

\"Spring
Fig: Spring Initializer creates starting spring boot project<\/figcaption><\/figure>\n\n\n\n

Click on Generate it will download file.<\/p>\n\n\n\n

Open Eclipse IDE -> File-> import->Existing Maven Project<\/code>.<\/p>\n\n\n\n

Then import the project from a specific directory.<\/p>\n\n\n\n

Open Java Resources-> src\/main\/java<\/p>\n\n\n\n

then create packages<\/p>\n\n\n\n

com.univ.app.controller
com.univ.app.dao
com.univ.app.entity
com.univ.app.service<\/p>\n\n\n\n

Creating MySql Database<\/h2>\n\n\n\n

We have created a user and password and given all privileges to that account. created a database and created a table student.<\/p>\n\n\n\n

CREATE USER 'sspu_userx25'@'localhost' IDENTIFIED BY 'MV7GG5TV2312';\nGRANT ALL ON *.* TO 'sspu_userx25'@'localhost';\ncreate database sspu;\nuse sspu;\ncreate table student(\nid bigint(20) unsigned NOT NULL AUTO_INCREMENT,\nroll_no bigint(20) unsigned NOT NULL,\nfname varchar(100),\nmname varchar(100),\nlname varchar(30),\ndob date,\nadmission_date date,\nmail_id varchar(100),\nmobile_no varchar(100),\nsemester varchar(100),\ncourse varchar(100),\nadd_date timestamp DEFAULT CURRENT_TIMESTAMP,\nprimary key(id),\nunique key(mobile_no),\nunique key(mail_id)\n)ENGINE=InnoDB DEFAULT CHARSET=utf8; \n<\/pre>\n\n\n\n

To connect with the database all properties are at application.properties<\/code> available in src\/main\/resources<\/code><\/p>\n\n\n\n

spring.jpa.hibernate.ddl-auto=update\nspring.datasource.url=jdbc:mysql:\/\/localhost:3306\/sspu\nspring.datasource.username=sspu_userx25\nspring.datasource.password=MV7GG5TV2312\nspring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\nspring.jpa.show-sql: true\n<\/pre>\n\n\n\n

Creating Files in Spring Boot Project<\/h2>\n\n\n\n

Entity Class<\/h3>\n\n\n\n

inside the com.univ.app.entity create a Student class (Student.java)<\/p>\n\n\n\n

This class contains all filed that are available in the database and also its mapping.<\/p>\n\n\n\n

package com.univ.app.entity;\n\nimport java.sql.Date;\nimport java.sql.Timestamp;\nimport java.util.Objects;\n\nimport jakarta.persistence.Column;\nimport jakarta.persistence.Entity;\nimport jakarta.persistence.GeneratedValue;\nimport jakarta.persistence.GenerationType;\nimport jakarta.persistence.Id;\nimport jakarta.persistence.Table;\n\n@Entity\n@Table(name = \"student\")\npublic class Student {\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.AUTO)\n\t@Column(name = \"id\")\n\tprivate Long id;\n\t@Column(name = \"roll_no\", nullable = false)\n\tprivate long rollNo;\n\t@Column(name = \"fname\", nullable = false)\n\tprivate String firstName;\n\t@Column(name = \"mname\", nullable = false)\n\tprivate String middleName;\n\t@Column(name = \"lname\", nullable = false)\n\tprivate String lastName;\n\t@Column(name = \"dob\", nullable = false)\n\tprivate Date dob;\n\t@Column(name = \"admission_date\", nullable = false)\n\tprivate Date admissionDate;\n\t@Column(name = \"mail_id\", nullable = false)\n\tprivate String mailId;\n\t@Column(name = \"mobile_no\", nullable = false)\n\tprivate String mobileNo;\n\t@Column(name = \"semester\", nullable = false)\n\tprivate String semester;\n\t@Column(name = \"course\", nullable = false)\n\tprivate String course;\n\t@Column(name = \"add_date\")\n\tprivate Timestamp addDate;\n\n\tpublic Student() {\n\n\t}\n\n\tpublic Student(Long id, long rollNo, String firstName, String middleName, String lastName, Date dob,\n\t\t\tDate admissionDate, String mailId, String mobileNo, String semester, String course, Timestamp addDate) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.rollNo = rollNo;\n\t\tthis.firstName = firstName;\n\t\tthis.middleName = middleName;\n\t\tthis.lastName = lastName;\n\t\tthis.dob = dob;\n\t\tthis.admissionDate = admissionDate;\n\t\tthis.mailId = mailId;\n\t\tthis.mobileNo = mobileNo;\n\t\tthis.semester = semester;\n\t\tthis.course = course;\n\t\tthis.addDate = addDate;\n\t}\n\n\t@Override\n\tpublic int hashCode() {\n\t\treturn Objects.hash(addDate, admissionDate, course, dob, firstName, id, lastName, mailId, middleName, mobileNo,\n\t\t\t\trollNo, semester);\n\t}\n\n\t@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tStudent other = (Student) obj;\n\t\treturn Objects.equals(addDate, other.addDate) && Objects.equals(admissionDate, other.admissionDate)\n\t\t\t\t&& Objects.equals(course, other.course) && Objects.equals(dob, other.dob)\n\t\t\t\t&& Objects.equals(firstName, other.firstName) && Objects.equals(id, other.id)\n\t\t\t\t&& Objects.equals(lastName, other.lastName) && Objects.equals(mailId, other.mailId)\n\t\t\t\t&& Objects.equals(middleName, other.middleName) && Objects.equals(mobileNo, other.mobileNo)\n\t\t\t\t&& rollNo == other.rollNo && Objects.equals(semester, other.semester);\n\t}\n\n\t@Override\n\tpublic String toString() {\n\t\treturn \"Student [id=\" + id + \", rollNo=\" + rollNo + \", firstName=\" + firstName + \", middleName=\" + middleName\n\t\t\t\t+ \", lastName=\" + lastName + \", dob=\" + dob + \", admissionDate=\" + admissionDate + \", mailId=\" + mailId\n\t\t\t\t+ \", mobileNo=\" + mobileNo + \", semester=\" + semester + \", course=\" + course + \", addDate=\" + addDate\n\t\t\t\t+ \"]\";\n\t}\n\n\tpublic Long getId() {\n\t\treturn id;\n\t}\n\n\tpublic void setId(Long id) {\n\t\tthis.id = id;\n\t}\n\n\tpublic long getRollNo() {\n\t\treturn rollNo;\n\t}\n\n\tpublic void setRollNo(long rollNo) {\n\t\tthis.rollNo = rollNo;\n\t}\n\n\tpublic String getFirstName() {\n\t\treturn firstName;\n\t}\n\n\tpublic void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}\n\n\tpublic String getMiddleName() {\n\t\treturn middleName;\n\t}\n\n\tpublic void setMiddleName(String middleName) {\n\t\tthis.middleName = middleName;\n\t}\n\n\tpublic String getLastName() {\n\t\treturn lastName;\n\t}\n\n\tpublic void setLastName(String lastName) {\n\t\tthis.lastName = lastName;\n\t}\n\n\tpublic Date getDob() {\n\t\treturn dob;\n\t}\n\n\tpublic void setDob(Date dob) {\n\t\tthis.dob = dob;\n\t}\n\n\tpublic Date getAdmissionDate() {\n\t\treturn admissionDate;\n\t}\n\n\tpublic void setAdmissionDate(Date admissionDate) {\n\t\tthis.admissionDate = admissionDate;\n\t}\n\n\tpublic String getMailId() {\n\t\treturn mailId;\n\t}\n\n\tpublic void setMailId(String mailId) {\n\t\tthis.mailId = mailId;\n\t}\n\n\tpublic String getMobileNo() {\n\t\treturn mobileNo;\n\t}\n\n\tpublic void setMobileNo(String mobileNo) {\n\t\tthis.mobileNo = mobileNo;\n\t}\n\n\tpublic String getSemester() {\n\t\treturn semester;\n\t}\n\n\tpublic void setSemester(String semester) {\n\t\tthis.semester = semester;\n\t}\n\n\tpublic String getCourse() {\n\t\treturn course;\n\t}\n\n\tpublic void setCourse(String course) {\n\t\tthis.course = course;\n\t}\n\n\tpublic Timestamp getAddDate() {\n\t\treturn addDate;\n\t}\n\n\tpublic void setAddDate(Timestamp addDate) {\n\t\tthis.addDate = addDate;\n\t}\n\n}\n\n<\/pre>\n\n\n\n

Controller Class<\/h3>\n\n\n\n

Create StudentController inside com.univ.app.controller as below<\/p>\n\n\n\n

We have created basic methods to add, update, delete, and fetch the record, also included methods to fetch records based on semester and course and the user can also update few fields separately like mail id and mobileNo.<\/p>\n\n\n\n

The rest controller is used to access the data with different mapping styles like GetMapping, PostMapping, PutMapping etc.<\/p>\n\n\n\n

\npackage com.univ.app.controller;\nimport java.util.Optional;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.DeleteMapping;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springframework.web.bind.annotation.PutMapping;\nimport org.springframework.web.bind.annotation.RequestBody;\nimport org.springframework.web.bind.annotation.RestController;\nimport com.univ.app.entity.Student;\nimport com.univ.app.service.StudentService;\n@RestController\npublic class StudentController {\n\t@Autowired\n\tStudentService service;\n\t@PostMapping(\"\/add-student\")\n\tpublic Student saveStudent(@RequestBody Student student) {\n\t\treturn service.saveStudent(student);\n\t}\n\t@PostMapping(\"\/add-students\")\n\tpublic Iterable saveStudent(@RequestBody Iterable students) {\n\t\treturn service.saveStudent(students);\n\t}\n\t@PutMapping(\"\/update-student\")\n\tpublic Student updateStudent(@RequestBody Student student) {\n\t\treturn service.saveorUpdateStudent(student);\n\t}\n\t@GetMapping(\"\/students\")\n\tpublic Iterable getStudents() {\n\t\treturn service.getStudents();\n\t}\n\t@GetMapping(\"\/student\/{id}\")\n\tpublic Optional getStudent(@PathVariable(\"id\") long id) {\n\t\treturn service.getStudent(id);\n\t}\n\t@GetMapping(\"\/student-fname\/{firstname}\")\n\tpublic Iterable getStudentbyFirstName(@PathVariable(\"firstname\") String firstName) {\n\t\treturn service.getStudentByFirstName(firstName);\n\t}\n\t@GetMapping(\"\/student-course\/{course}\")\n\tpublic Iterable getStudentByCourse(@PathVariable(\"course\") String course) {\n\t\treturn service.getStudentByCourse(course);\n\t}\n\t@GetMapping(\"\/student-semester\/{semester}\")\n\tpublic Iterable getStudentBySemester(@PathVariable(\"semester\") String semester) {\n\t\treturn service.getStudentBySemester(semester);\n\t}\n\t@GetMapping(\"\/student-update-mail\/{id}\/{emailId}\")\n\tpublic int updateStudentMail(@PathVariable(\"emailId\") String emailId, @PathVariable(\"id\") Long id) {\n\t\treturn service.UpdateEmailId(emailId, id);\n\t}\n\t@GetMapping(\"\/student-update-mobile\/{id}\/{mobileNo}\")\n\tpublic int updateStudentMobile(@PathVariable(\"mobileNo\") String mobileNo, @PathVariable(\"id\") Long id) {\n\t\treturn service.updateMobileNo(mobileNo, id);\n\t}\n\t@DeleteMapping(\"\/remove-student\/{id}\")\n\tpublic void deleteById(@PathVariable(\"id\") long id) {\n\t\tservice.deleteById(id);\n\t}\n}\n<\/pre>\n\n\n\n

Service class<\/h3>\n\n\n\n

StudentService.java inside com.univ.app.service<\/p>\n\n\n\n

@Service annotation is used to make it a service class and dao is autowired to interact with StudentDAO.<\/p>\n\n\n\n

\npackage com.univ.app.service;\nimport java.util.Optional;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport com.univ.app.dao.StudentDAO;\nimport com.univ.app.entity.Student;\n@Service\npublic class StudentService {\n\t@Autowired\n\tStudentDAO dao;\n\tpublic Student saveStudent(Student student) {\n\t\treturn dao.save(student);\n\t}\n\tpublic Iterable saveStudent(Iterable students) {\n\t\treturn dao.saveAll(students);\n\t}\n\tpublic Student saveorUpdateStudent(Student student) {\n\t\tOptional fetched = dao.findById(student.getId());\n\t\tStudent s = fetched.get();\n\t\ts.setFirstName(student.getFirstName());\n\t\ts.setMiddleName(student.getMiddleName());\n\t\ts.setLastName(student.getLastName());\n\t\ts.setDob(student.getDob());\n\t\ts.setAdmissionDate(student.getAdmissionDate());\n\t\ts.setMailId(student.getMailId());\n\t\ts.setMobileNo(student.getMobileNo());\n\t\ts.setSemester(student.getSemester());\n\t\ts.setCourse(student.getCourse());\n\t\ts.setSemester(student.getSemester());\n\t\treturn dao.save(s);\n\t}\n\tpublic Iterable getStudents() {\n\t\treturn dao.findAll();\n\t}\n\tpublic Optional getStudent(long id) {\n\t\treturn dao.findById(id);\n\t}\n\tpublic Iterable getStudentByFirstName(String firstName) {\n\t\treturn dao.findStudentByFisrtName(firstName);\n\t}\n\tpublic Iterable getStudentByCourse(String course) {\n\t\treturn dao.findStudentByCourse(course);\n\t}\n\tpublic Iterable getStudentBySemester(String semester) {\n\t\treturn dao.findStudentBySemester(semester);\n\t}\n\tpublic void deleteById(long id) {\n\t\tdao.deleteById(id);\n\t}\n\tpublic int UpdateEmailId(String emailId, Long id) {\n\t\treturn dao.updateEmailid(emailId, id);\n\t}\n\tpublic int updateMobileNo(String mobileNo, Long id) {\n\t\treturn dao.updateMobileNo(mobileNo, id);\n\t}\n}\n<\/pre>\n\n\n\n

DAO class<\/h3>\n\n\n\n

@Repository annotation is used to access data from a database.<\/p>\n\n\n\n

StudentDAO extends JPARepositiiry.<\/p>\n\n\n\n

Created Query for finding students by first name, course, and semester also created query for updating email and mobileNo.<\/p>\n\n\n\n

\npackage com.univ.app.dao;\nimport org.springframework.data.jpa.repository.JpaRepository;\nimport org.springframework.data.jpa.repository.Modifying;\nimport org.springframework.data.jpa.repository.Query;\nimport org.springframework.stereotype.Repository;\nimport com.univ.app.entity.Student;\nimport jakarta.transaction.Transactional;\n@Repository\npublic interface StudentDAO extends JpaRepository {\n\t@Query(\"SELECT s FROM Student s WHERE s.firstName = ?1\")\n\tIterable findStudentByFisrtName(String firstName);\n\t@Query(\"SELECT s FROM Student s WHERE s.course = ?1\")\n\tIterable findStudentByCourse(String course);\n\t@Query(\"SELECT s FROM Student s WHERE s.semester = ?1\")\n\tIterable findStudentBySemester(String semester);\n\t@Transactional\n\t@Modifying\n\t@Query(\"UPDATE Student s set s.mailId = ?1 where s.id=?2\")\n\tint updateEmailid(String emailId, long id);\n\t@Transactional\n\t@Modifying\n\t@Query(\"UPDATE Student s set s.mobileNo = ?1 where s.id=?2\")\n\tint updateMobileNo(String mobileNo, long id);\n}\n<\/pre>\n\n\n\n

Checking Rest API with Postman<\/h2>\n\n\n\n

open postman<\/a> and call APIs created in the controller. We called a few APIs as below.<\/p>\n\n\n\n

Add Student API call <\/h3>\n\n\n\n
\"Spring
Spring boot Postman add API test<\/figcaption><\/figure>\n\n\n\n

Get a Student with id<\/h3>\n\n\n\n
\"\"<\/figure>\n\n\n\n

Update User Details<\/h3>\n\n\n\n
\"\"<\/figure>\n\n\n\n

Similar way you can test all other APIs<\/p>\n\n\n\n

Read More<\/p>\n\n\n\n

Angular Spring Boot showing data in table<\/a><\/p>\n\n\n\n

SpringBoot JPA @OneToMany Mapping : Fetch data from tables<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

Here we are discussing the Spring boot crud example with MySQL that will include all basic operations few queries for JPA and check responsesProject using Postman. Project Explorer for Spring boot crud example with MySQL Starting Spring boot Project with Spring Initializer Open Spring Initializer Click on Generate it will download file. Open Eclipse IDE … Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[386],"tags":[],"yoast_head":"\nSpring boot crud example with MySQL and Postman - Ebhor.com<\/title>\n<meta name=\"description\" content=\"Spring boot crud example with MySQL and Postman Project Explorer MySql Database entity Service Controller DAO and JPA Query Postman API test\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring boot crud example with MySQL and Postman - Ebhor.com\" \/>\n<meta property=\"og:description\" content=\"Spring boot crud example with MySQL and Postman Project Explorer MySql Database entity Service Controller DAO and JPA Query Postman API test\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"Ebhor.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ebhorcom\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-02T04:01:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-02T07:33:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png\" \/>\n<meta name=\"author\" content=\"manish\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"manish\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/\"},\"author\":{\"name\":\"manish\",\"@id\":\"https:\/\/www.ebhor.com\/#\/schema\/person\/6a63908fdbbb27289970569ebd2e709b\"},\"headline\":\"Spring boot crud example with MySQL and Postman\",\"datePublished\":\"2023-05-02T04:01:00+00:00\",\"dateModified\":\"2023-05-02T07:33:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/\"},\"wordCount\":368,\"publisher\":{\"@id\":\"https:\/\/www.ebhor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png\",\"articleSection\":[\"spring boot\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/\",\"url\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/\",\"name\":\"Spring boot crud example with MySQL and Postman - Ebhor.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.ebhor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png\",\"datePublished\":\"2023-05-02T04:01:00+00:00\",\"dateModified\":\"2023-05-02T07:33:27+00:00\",\"description\":\"Spring boot crud example with MySQL and Postman Project Explorer MySql Database entity Service Controller DAO and JPA Query Postman API test\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#primaryimage\",\"url\":\"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png\",\"contentUrl\":\"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png\",\"width\":471,\"height\":687,\"caption\":\"Project Explorer: Spring Boot Crud Example With MySQL\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ebhor.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring boot crud example with MySQL and Postman\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ebhor.com\/#website\",\"url\":\"https:\/\/www.ebhor.com\/\",\"name\":\"Ebhor.com\",\"description\":\"Read The Latest Post Java, Css, Html, Php learning articles\",\"publisher\":{\"@id\":\"https:\/\/www.ebhor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ebhor.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.ebhor.com\/#organization\",\"name\":\"Ebhor.com\",\"url\":\"https:\/\/www.ebhor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ebhor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.ebhor.com\/wp-content\/uploads\/2021\/05\/cropped-cropped-cropped-ebhor_logo_100x.jpg\",\"contentUrl\":\"https:\/\/www.ebhor.com\/wp-content\/uploads\/2021\/05\/cropped-cropped-cropped-ebhor_logo_100x.jpg\",\"width\":100,\"height\":100,\"caption\":\"Ebhor.com\"},\"image\":{\"@id\":\"https:\/\/www.ebhor.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ebhorcom\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.ebhor.com\/#\/schema\/person\/6a63908fdbbb27289970569ebd2e709b\",\"name\":\"manish\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ebhor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/def43b1d916cff76638fa6c47604a2bb?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/def43b1d916cff76638fa6c47604a2bb?s=96&r=g\",\"caption\":\"manish\"},\"description\":\"A Learner and Teacher\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring boot crud example with MySQL and Postman - Ebhor.com","description":"Spring boot crud example with MySQL and Postman Project Explorer MySql Database entity Service Controller DAO and JPA Query Postman API test","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/","og_locale":"en_US","og_type":"article","og_title":"Spring boot crud example with MySQL and Postman - Ebhor.com","og_description":"Spring boot crud example with MySQL and Postman Project Explorer MySql Database entity Service Controller DAO and JPA Query Postman API test","og_url":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/","og_site_name":"Ebhor.com","article_publisher":"https:\/\/www.facebook.com\/ebhorcom\/","article_published_time":"2023-05-02T04:01:00+00:00","article_modified_time":"2023-05-02T07:33:27+00:00","og_image":[{"url":"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png"}],"author":"manish","twitter_card":"summary_large_image","twitter_misc":{"Written by":"manish","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#article","isPartOf":{"@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/"},"author":{"name":"manish","@id":"https:\/\/www.ebhor.com\/#\/schema\/person\/6a63908fdbbb27289970569ebd2e709b"},"headline":"Spring boot crud example with MySQL and Postman","datePublished":"2023-05-02T04:01:00+00:00","dateModified":"2023-05-02T07:33:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/"},"wordCount":368,"publisher":{"@id":"https:\/\/www.ebhor.com\/#organization"},"image":{"@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png","articleSection":["spring boot"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/","url":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/","name":"Spring boot crud example with MySQL and Postman - Ebhor.com","isPartOf":{"@id":"https:\/\/www.ebhor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#primaryimage"},"image":{"@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png","datePublished":"2023-05-02T04:01:00+00:00","dateModified":"2023-05-02T07:33:27+00:00","description":"Spring boot crud example with MySQL and Postman Project Explorer MySql Database entity Service Controller DAO and JPA Query Postman API test","breadcrumb":{"@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#primaryimage","url":"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png","contentUrl":"https:\/\/www.ebhor.com\/wp-content\/uploads\/2023\/04\/image-1.png","width":471,"height":687,"caption":"Project Explorer: Spring Boot Crud Example With MySQL"},{"@type":"BreadcrumbList","@id":"https:\/\/www.ebhor.com\/spring-boot-crud-example-with-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ebhor.com\/"},{"@type":"ListItem","position":2,"name":"Spring boot crud example with MySQL and Postman"}]},{"@type":"WebSite","@id":"https:\/\/www.ebhor.com\/#website","url":"https:\/\/www.ebhor.com\/","name":"Ebhor.com","description":"Read The Latest Post Java, Css, Html, Php learning articles","publisher":{"@id":"https:\/\/www.ebhor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ebhor.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.ebhor.com\/#organization","name":"Ebhor.com","url":"https:\/\/www.ebhor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ebhor.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.ebhor.com\/wp-content\/uploads\/2021\/05\/cropped-cropped-cropped-ebhor_logo_100x.jpg","contentUrl":"https:\/\/www.ebhor.com\/wp-content\/uploads\/2021\/05\/cropped-cropped-cropped-ebhor_logo_100x.jpg","width":100,"height":100,"caption":"Ebhor.com"},"image":{"@id":"https:\/\/www.ebhor.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ebhorcom\/"]},{"@type":"Person","@id":"https:\/\/www.ebhor.com\/#\/schema\/person\/6a63908fdbbb27289970569ebd2e709b","name":"manish","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ebhor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/def43b1d916cff76638fa6c47604a2bb?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/def43b1d916cff76638fa6c47604a2bb?s=96&r=g","caption":"manish"},"description":"A Learner and Teacher"}]}},"_links":{"self":[{"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/posts\/15472"}],"collection":[{"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/comments?post=15472"}],"version-history":[{"count":30,"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/posts\/15472\/revisions"}],"predecessor-version":[{"id":15531,"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/posts\/15472\/revisions\/15531"}],"wp:attachment":[{"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/media?parent=15472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/categories?post=15472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ebhor.com\/wp-json\/wp\/v2\/tags?post=15472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}