Home > Spring > Spring Boot (page 2)

Spring Boot

Hide an End-points from Swagger Documentation in Spring Boot REST API

swagger

In this article, we will learn how to hide any end-points or entire controller for swagger documentation. While integrating Swagger with our Spring Boot REST API application we often require to hide some of the endpoints from the end-user, sometimes an entire Class of implementation is to be hidden from the end-user because these are some private types of endpoints. ... Read More »

Spring Boot REST API – Log Incoming HTTP Requests

spring

For our spring boot RESTFul API application, it becomes essential to log all the API requests and responses to our debugging purpose. We came across lots of different approaches to solve the logging problem. We will discuss here CommonsRequestLoggingFilter which is a spring built-in request logging solution, which we can configure by just adding one bean and enabling some of ... Read More »

How to document Controller and Model class using Swagger2 in Spring Boot REST project

swagger

In our article Integrate Swagger2 with Spring Boot REST API, we learned to integrate Swagger2 in our Spring Boot REST application. Here in this article, we will learn how to document the Controller and Model class of our Spring Boot project using annotations provided by Springfox Swagger 2. Controller Class Documentation To document our controller class we will use @Api, ... Read More »

Integrate Swagger2 with Spring Boot REST API

swagger

Swagger 2 makes the Spring Boot REST API much easier to describe and document. And Swagger2 is very easy to integrate with the Spring Boot application. Here we will learn this step by step and use Swagger 2 to generate Spring Boot REST API project documentation. Adding the Maven Dependencies My pom.xml, where I added the below dependencies to integrate ... Read More »

How to Disabled Swagger-UI in Production in Spring Boot Project

swagger

I have a Spring Boot REST API application and I integrated Swagger for documentation and also using it to test API with Swagger-UI. Now my task was to disable the Swagger-UI on our production environment (public domain) and enable it in our dev environment which was on private IP. APPROACH – 1 With Swagger vr-3.0.0 we can add springfox.documentation.enabled=false/true in ... Read More »