Skip to content

josdem/spring-boot-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Workshop

This repository show you how to create a basic project using Spring Boot and this topics:

  • Building a basic MVC Spring Boot project
  • Adding Spring Data JPA
  • Model validation with Hibernate Validator
  • Adding Thymeleaf
  • Adding Bootstrap

Create Project

In order to create a basic Spring Boot project you need to install SDKMAN if you are using Linux or Mac, or posh-gvm if you are using Windows. After that you can easily install:

  • Spring Boot
  • Groovy
  • Gradle

Then execute this command in your terminal.

spring init --dependencies=web --language=groovy --build=gradle spring-boot-workshop

Setup

Create a MySQL database and create an user and password that owns that database, then update the application.properties with your credentials

spring.datasource.url=jdbc:mysql://localhost/springboot_workshop
spring.datasource.username=user
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

spring.jpa.generate-ddl=true

spring.messages.basename=i18n/messages

To Run the Project

gradle bootRun

Read this as Reference

About

Create a basic Spring Boot MVC application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published