Creating A New Project
Follow these steps to create a new project and add Spring Lemon to it.
1. Create a new Spring Boot project
Create a new Spring Boot project using your favorite method. If you are using Spring Tool Suite (STS), you can use the Spring Starter Project Wizard, which is available at File -> New -> Spring Starter Project.
Fill in the following data there:
- Name: The name of your application, e.g.
lemon-demo
- Type:
Maven Project
(Or gradle) - Packaging:
Jar
- Java Version:
1.8
- Group: The group name, e.g.
com.naturalprogrammer.spring
- Artifact: The artifact name, e.g.
lemon-demo
- Description: A one line description about your application
- Package Name: Could be something like
com.naturalprogrammer.spring.lemondemo
- Boot Version: Choose a version later than or equal to
1.5.0
. We have tested it with1.5.3
. - Dependencies:
- Database: Say
HSQLDB
in-memory database for this demo (but you can choosePostgreSQL
,MySQL
or whatever you want) - Core: Optionally
DevTools
- No need to include
Security
,JPA
,Mail
andWeb
; those would be transitively included by Spring Lemon.
- Database: Say
Leave other fields to defaults.
2. Add Spring Lemon Dependency
Add to your pom.xml
(or build.gradle) the following repository and dependency:
<repositories>
...
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
...
<dependency>
<groupId>com.naturalprogrammer</groupId>
<artifactId>spring-lemon</artifactId>
<version>0.12.0</version><!-- See https://github.com/naturalprogrammer/spring-lemon/releases for latest release -->
</dependency>
<dependencies>