Skip to content

Setting Backend Spring Boot

nelsonortfan edited this page Feb 14, 2026 · 4 revisions

Setting the Backend

In this section we will set up the backend with the DB and the Spring Boot Application. For the moment we will disable the security and later with the Front End it will be enabled again.

Database Maria DB

We can create our database using Docker with the following command:

docker run --name mariadb-container -e MYSQL_ROOT_PASSWORD=1234 -e MYSQL_DATABASE=cardb -p 3306:3306 -d mariadb:latest

It will create the container and it will run automatically as you can see:

imagen

Then you can enter data inside the database using a client and see it:

imagen

Spring Boot Application

In this case we will use a Backend that is already built with the only configuration that is to disable the security in the endpoints. In that way, open the SecurityConfig class and do the following changes in the method filterChain:

imagen

The project used works with JDK 17 and Gradle. This is the configuration used in Intellij:

imagen

Start the Application, you will see the Window with the message of running:

imagen

Now, to validate that the backend is running access to the endpoint using Get Method:

http://localhost:8080/api/cars

You will see the following output:

imagen

Clone this wiki locally