M10han / mohan-spring-boot-mysql

SpringBoot JPA web application with MySQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a Spring-boot web app with JPA, MySQL, Jenkins integration.

What you'll need:

  • JDK 8+
  • Maven 3+
  • Springboot
  • MySQL

Step wise procedure:

  • Add the project dependencies to pom.xml (in this case Spring-web-starter, Thymeleaf, MySql connector)

  • We are building a simple Spring MVC web application using Thymeleaf as a view.

  • Configure MySQL database.

  • Insert a SQL script (data.sql).

  • Define Controller Template (Controller maps http requests with view)

    • @RequestMapping maps "/" to home() method.
    • Model object passes value to home view(index.html).
  • Define Thymeleaf View Template.

  • Run the project as a Spring boot App

  • Your web app will be accessible at "http://localhost:8080/"

  • Update: Integrated Jenkins.

About

SpringBoot JPA web application with MySQL


Languages

Language:Java 82.4%Language:HTML 17.6%