Having a sufficient sample of lifelike data greatly improves the application development process. In most cases, when we start working on a project, we don’t have the luxury of having a well-stocked database we could use in development and testing. However, we can easily create such a database using a random data generator.
Entering a credit card number is prone to random errors and typos. As a matter of fact, it’s easy to make a mistake in a long chain of digits. Fortunately, we can apply the widely used Luhn algorithm to prevent data corruption.
Learn how to generate documentation for your Spring Boot application using Springfox Boot Starter. This article extends the Spring Boot API documentation with Swagger post.
If a project needs the JAVA_HOME variable pointing to a particular value and this requirement is not met on our environment, we will get errors while trying to build that project, e.g. the “Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set” error. Instead of exporting the JAVA_HOME value manually we can easily set the variable permanently with a custom script.
Prometheus is an open-source platform used to collect metrics from applications. You can easily apply it to monitor your Spring Boot project and scrape the Actuator /prometheus endpoint.
For development purposes, you can easily run Spring Boot apps with Docker Compose.
Shipping an application to the production requires reliable mechanisms responsible for auditing, health checks, and metrics collection. Fortunately, with Spring Boot we can apply those features effortlessly and monitor an app with Actuator.
We don’t want to allocate too much space for our log files. Let’s see how we can manage their livespan.
Apart from having logs displayed directly in the console, we can configure our Spring Boot project to write log entries into files. It not only allows us to easily store and share logs for debugging, but also can be the first step towards browsing them in Kibana.
Having automated database migrations will significantly ease managing schema development. With Spring Boot support we can effortlessly handle versioned SQL scripts.