baeldung

How to Turn Off Swagger-ui in Production

1. Overview The Swagger user interface allows us to view information about our REST services. This can be very convenient for development. However, owing to security concerns, we might not want to allow this behavior in our public environments. In this short tutorial, we'll look at how to turn Swagger off in production. 2. Swagger Configuration To set up Swagger with Spring, we define it in a configuration bean. Let's create a...