MySQL and ExceptionControllerAdvice Integration

Learn how to integrate MySQL for the persistent data saving and use @ControllerAdvice annotation for global exception handling.

Configure MySQL

We’ll configure MySQL for our project. Install MySQL in your local machine if you do not have it installed already.

Create a database

We’ll start by creating a database. Open a terminal and execute the following command to create a new database:

Get hands-on with 1200+ tech skills courses.