Why You Should Avoid Using Exceptions as the Control Flow in Java

Learn more about using exceptions as control flow in Java.

Java is a general-purpose programming language with many alternatives to solving a certain problem. However, there are best practices that need to be followed, and there are some bad practices out there as well that are still commonly used.

One of these common bad practices is using exceptions as the control flow. This should be avoided for two reasons: It reduces the performance of your code as a response per unit time, and it makes your code less readable.

Creating a Spring Boot Configuration Server Using a Database

You can find many articles on the internet about creating a Spring Boot configuration server using either a file system or git repository, but this is not true for a configuration server based on a database. In this article, I am going to discuss reasons to use a database as a configuration server and demonstrate how to create it using Spring Boot.

Storing configurations on a database seems to be a better idea than storing it on either a file system or git. Because it is less trackable, it is less secure. I admit that git has security and tracking options, but they seem to be complicated for a developer. However, tracking a database table is just creating a trigger for updates, and securing a database is not an issue for a developer. Again, changing a value in a database table is just so simple and easy to commit; however, it can be a cumbersome task to make a change in a git repository.