Posts

Showing posts from June, 2022

Building a Spring Boot MVC Application with MariaDB and Native JDBC

In this blog post, we will guide you through the process of building a Spring Boot MVC application that integrates with the MariaDB database using native JDBC for data access. We will cover essential steps, including configuring the database connection, defining entities, creating repositories, building controllers, and setting up Thymeleaf templates. By the end of this blog, you'll have a fully functional Spring Boot MVC application for managing products in a MariaDB database. Prerequisites Before we start, make sure you have the following prerequisites in place: Java Development Kit (JDK) installed on your machine. An Integrated Development Environment (IDE) like IntelliJ IDEA or Eclipse. Apache Maven for managing project dependencies. A running MariaDB database instance. Step 1: Create a Spring Boot Project Spring Initializr : Visit the Spring Initializr website ( https://start.spring.io/) to create a new Spring Boot project. Configure the project settings as follows: Project:

Building a Spring Boot MVC Application with Database Integration

In this blog, we'll take the previous Spring Boot MVC application a step further by integrating a database. We'll create a simple web application that allows users to add, list, and view items stored in a relational database (H2 in-memory database in this case). Follow along to learn how to build a Spring Boot MVC application with database integration. Prerequisites Before we begin, ensure you have the following installed: Java Development Kit (JDK) Integrated Development Environment (IDE) like IntelliJ IDEA or Eclipse Apache Maven (for managing dependencies) Step 1: Create a Spring Boot Project Visit the Spring Initializr website ( https://start.spring.io/). Configure your project as follows: Project: Maven Project Language: Java Spring Boot: Choose the latest stable version. Project Metadata: Fill in your project's Group, Artifact, and Package information. Dependencies: Select "Spring Web" and "Spring Data JPA." Click "Generate" to download t