Posts

Showing posts with the label Spring Boot projects

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 + Spring Security + JWT Authentication and Authorization Example

Image
Hello everyone, Hope you are doing well, Today we will learn how to handle authentication and authorization on RESTful APIs written with Spring Boot. The  GitHub repository link is provided at the end of this tutorial. You can download the source code. A little bit of Background Spring Boot Spring Boot makes it easy to create stand-alone, production-grade Spring-based Applications that you can "just run".  More Info -  https://spring.io/projects/spring-boot Spring Security Spring Security is a framework that provides authentication, authorization, and protection against common attacks. With first-class support for securing both imperative and reactive applications, it is the de-facto standard for securing Spring-based applications. More Info -  https://docs.spring.io/spring-security/reference/index.html JSON Web Token(JWT) JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as