Search results for: Open API

In this tutorial, you will learn how to use Asymmetric Encryption(RSA key pair) to encrypt sensitive information in configuration properties served by Spring Cloud Config Server.  Asymmetric Encryption is a stronger encryption type than symmetric encryption(shared key), but it requires a little bit more effort to set up because we need to generate an encryption key. We…

Read More Spring Cloud Config – Asymmetric Encryption and Decryption

In this tutorial, you will learn how to configure your Spring Cloud Config Server to use a native file system as a backend. For a step-by-step series of video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Create Spring Cloud Config Server Please read this tutorial: Spring Cloud Config Server and Config Client,…

Read More Spring Cloud Config Server – File System as a Backend

In this Spring Boot tutorial, you will learn how to implement User Authentication(User Login) functionality for your RESTful Web Service application. There is also a step-by-step video demonstration on how to do User Authentication available here. The user authentication functionality we are going to implement in this tutorial will work the following way: A user…

Read More User Authentication – Spring Boot, Spring Security, JWT

In this short tutorial, you will learn how to use SearchPaths to configure your Spring Cloud Config Server to discover properties files in remote Git repository subdirectories. To learn how to configure Spring Cloud Config Server and also Spring Cloud Config Client, please read this tutorial: Learn to use Spring Cloud Config Server and Spring Cloud…

Read More Spring Cloud Config Server – SearchPaths

In this tutorial, you will learn how to use Spring Boot Profiles. You can use Spring Boot Profile functionality when providing application configuration for a specific environment. For example, when your application runs in a development environment, then your application will use a specific for that environment application.properties file. And when you are ready to…

Read More Spring Boot Profiles Tutorial

In this tutorial, you will learn how to use Zuul API Gateway to enable the load balancing of your RESTful Web Services registered with Eureka Discovery Service. For a step by step series of video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Because Zuul API Gateway internally uses Ribbon Load Balancer…

Read More Zuul and Eureka – Load Balancing Example

In this tutorial, you will learn how to create a Web Service or a Microservice and how to make it register with Eureka Discovery Server. For a step-by-step series of video lessons, please check this page: Spring Boot Microservices and Spring Cloud. Start Eureka Discovery Server To be able to follow this tutorial, you will…

Read More Register Microservice(Eureka Client) with Eureka Server

Spring Boot has a nice feature that enables the application to automatically restart when you change your Java code. This automatic restart of your application is often called Hot Swap. Spring Boot Dev Tools Dependency To enable your Spring Boot application to automatically restart when you make a change to your Java code, add the…

Read More Spring Boot Hot Swap or Automatic Restart

In this blog post, I am going to list commonly used POM.XML dependencies for building RESTful Web services with Spring Boot and Spring MVC. The list of below dependencies is not complete and will depend on the functionality you need your RESTful Web Services to support. But if you are building a simple REST API…

Read More Common POM.XML Dependencies for RESTful Web Services

In this tutorial on Rest Assured, I am going to share with you how to create a test case which sends HTTP Get Request and includes two Query String Request Parameters. Let’s assume we need to test a RESTful Web Service Endpoint which returns a list of users. The URL to our RESTful Web Service…

Read More Rest Assured HTTP Request with Query Parameters

In this tutorial, you will learn how to make a method in your Rest Controller class return a custom HTTP status code. To return a specific HTTP status code from a Spring Controller method in your application, you can use the ResponseEntity class. ResponseEntity with HTTP Status Code Let’s assume we have a simple web…

Read More Return Custom HTTP Status from Spring Controller

In this short tutorial, I am going to share with you how to enable CrossOrigin in a RESTful Web Service API built with Spring Boot that also has Spring Security enabled. Enable CrossOrigin for Specific Endpoint  To enable cross-origin AJAX HTTP requests to a specific RESTful Web Service endpoint in our Rest Controller class we can use…

Read More CrossOrigin and CORS in RESTful Web Service

This tutorial will teach you how to build a Spring Boot application and access data in a MongoDB database using the MongoTemplate APIs.   For MongoDB, we will use mLab, which provides MongoDB Database as a Service platform so that you don’t even have to install a MongoDB database on your computer.  Also, at the end…

Read More Spring Boot and MongoTemplate Tutorial with MongoDB