Introduction to the Labs¶
Welcome to the lab exercises!
Before you start any of the labs, you'll need a recent version of Java 8 installed (later versions might work, but the labs have only been tested with Java 8).
Java Installation Check¶
Let's first make sure that your Java Development Kit (JDK) is installed and available.
At the command prompt/terminal, type the following
If all is well, you'll see something like:
java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
And let's make sure the Java compiler (
javac) is also working:
Should result in:
If you get a "command not found", then Java either wasn't installed properly or is not on your path. See here for installation instructions and troubleshooting.
Spring Tool Suite¶
We'll be using the Spring Tool Suite (STS), which is a development environment based on Eclipse.
Download and install the STS 3.9.5 from here: https://spring.io/tools/sts
Install Buildship for Gradle Support¶
We'll be using Gradle, so you'll also need to download the Gradle extension for use inside of STS.
Click on the
Helpmenu and choose
Search for the Buildship Gradle Integration 2.0 extension by typing
Buildshipin the find box:
If it's already installed, you'll see
Buildship Details: For more information, you can go to: http://marketplace.eclipse.org/content/buildship-gradle-integration):
Clone MealKiosk Repo¶
From your Git command line, clone the repository:
C:\training> git clone https://github.com/spiral-learning/mealkiosk.git
Import Into Spring Tool Suite¶
gradlefor the import wizard
Existing Gradle Projectand click
On the next screen, just click
Browsebutton to point to where you cloned the project
Run JUnit Tests¶
- In the Package Explorer, right-click on src/test/java
Run Asand then
All tests should pass.