This guide walks you through everything required to get a working Restorante instance running on your local machine — from installing prerequisites and creating the MySQL database, to booting the application and querying the menu API for the first time. By the end you will have a fully seeded database and a live REST API responding onDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/NicolasMPP/restorante-springboot/llms.txt
Use this file to discover all available pages before exploring further.
localhost:8080.
Prerequisites
Ensure you have the following installed before proceeding:You should see output indicating
- Java 21 or later — Restorante’s
build.gradletargetsJavaLanguageVersion.of(21). - MySQL 8 or later — the application connects to a local MySQL instance.
- Gradle — or use the included
gradlewwrapper (no separate installation required).
21 or a higher version, for example:Clone the Repository
Clone the project from GitHub and enter the project directory:The project uses the Gradle wrapper, so no separate Gradle installation is needed — all subsequent commands use
./gradlew (macOS/Linux) or gradlew.bat (Windows).Create the MySQL Database
Restorante does not create the database schema itself — you must create the database first. Connect to your MySQL instance and run:Once the database exists, Hibernate will automatically create and migrate all required tables on first startup thanks to the
spring.jpa.hibernate.ddl-auto=update setting.Configure application.properties
Open The
src/main/resources/application.properties and supply your MySQL credentials. The file ships with the following defaults:spring.datasource.password is empty by default, which works when MySQL is running locally without a root password. If your MySQL instance requires a password, set it here (or configure a dedicated application user). The ddl-auto=update setting instructs Hibernate to inspect the schema on startup and apply any missing table or column definitions automatically — no manual SQL migrations are needed in development.If MySQL is running on a non-standard port or a remote host, update the
spring.datasource.url accordingly. The serverTimeZone=UTC parameter avoids timezone mismatch errors between the JVM and MySQL.Run the Application
Start the application using the Gradle wrapper:On first run, the On subsequent startups,
InicializadorBD component executes automatically and seeds the database with a complete set of sample data. You will see output similar to:InicializadorBD detects that the personas table is non-empty and skips seeding. The server starts on port 8080 by default.The Thymeleaf web interface is also available once the server is running:
- Menu view — http://localhost:8080/menu
- Pantry view — http://localhost:8080/despensa
/menu.Next Steps
Configuration
Deep-dive into every application.properties setting, database seeding behavior, and CORS configuration.
Data Model
Understand the Persona and Alimento inheritance hierarchies and how entities relate to one another.
Menu API
Browse all REST endpoints for creating, reading, and managing menus and food items.