Basic Spring Boot Project

This sample project contains the basics configurations of a Spring Boot

Requirements

  • Preferably Java 1.8.
  • Spring STS or EClipse (preferably any early version as Neon or Luna).
  • MySql, choose your OS related version.
  • Download this project or just clone it as looks below.
git clone https://github.com/alberpeb/basicspring.git
  • Or you could just import it following this instructions.

Installation

Don't forget to update maven using your IDE. You can right-click on your project then Maven > Update Project. Or you can do it by console:

mvn update

Configuration

Edit the following lines in "application.properties" file:

spring.datasource.url=jdbc:mysql://localhost:3306/exampledb
spring.datasource.username=[your_username]
spring.datasource.password=[your_password]
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
  • Run src/main/resources/script-database.sql in your console.

  • Run application as Java Application.

API RESTful