Posts

Showing posts with the label Java Framework

Spring Boot + Jersey + Spring Data JPA Build REST CRUD APIs Example

Image
Hello everyone, today  we will learn how to develop CRUD REST APIs using the integration of Jersey with Spring boot, JPA/Hibernate, and H2DB as a database. The spring-boot-starter-jersey is a starter for building RESTful web applications using JAX-RS and Jersey. It is an alternative to spring-boot-starter-web. Jersey RESTful Web Services framework is an open source, production quality, framework for developing RESTful Web Services in Java. It provides support for JAX-RS APIs and serves as a JAX-RS Reference Implementation. What we’ll build? We are developing CRUD REST APIs using the integration of Jersey with Spring boot, JPA/Hibernate, and H2DB as a database. /api/v1/employees - GET /api/v1/employees - POST /api/v1/employees/{id} - PUT /api/v1/employees/{id} - DELETE /api/v1/employees/{id} - GET Application Directory Structure Maven[pom.xml]  A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and co

Spring Boot + JPA/Hibernate Many to Many mapping example

Image
Hello everyone, In this tutorial, we will learn how to implement many-to-many entity mapping using JPA/Hibernate with Spring Boot, Spring Data JPA, and the H2DB database. Project Structure  See the final project structure of this tutorial. Maven[pom.xml]  A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details utilized by Maven to build the project. It contains default values for most projects. Some of the configurations that can be designated in the POM is the project dependencies, the plugins or goals that can be executed, the build profiles, and so on. Other information such as the project version, description, developers, mailing lists, and such can withal be designated. <?xml version = "1.0" encoding = "UTF-8" ?> <project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"