SalesPoint sample application
  • Java 75.7%
  • HTML 23.9%
  • CSS 0.4%
Find a file
Oliver Drotbohm 1987d61ae0 #151 - Move away from JSR-303 internationalization.
We now use Spring's resource bundle message resolution mechanism only to avoid mixing two different ways of resolving error texts. Refactored RegistrationForm accordingly and describe the message resolution mechanism in its Javadoc. Removed obsolete JSR-303 resource bundles.
2021-10-26 22:32:24 +02:00
.github/workflows #136 - Use ./mvnw and the 'ci' profile during builds. 2020-11-03 14:54:18 +01:00
.mvn/wrapper #143 - Bump maven wrapper from 3.6.3 to 3.8.3. 2021-10-05 18:25:25 +02:00
src #151 - Move away from JSR-303 internationalization. 2021-10-26 22:32:24 +02:00
.gitignore #117 - Reference UniqueInventory in UML models and docs. 2019-10-24 15:43:14 +02:00
.gitpod.yml #133 - Added setup for GitPod. 2020-10-24 23:51:03 +02:00
.sonarcloud.properties #128 - Set up SonarCloud. 2020-02-05 15:30:12 +01:00
mvnw #131 - Upgrade to Maven Wrapper 0.5.6 (Maven 3.6.3). 2020-10-24 21:55:21 +02:00
mvnw.cmd #131 - Upgrade to Maven Wrapper 0.5.6 (Maven 3.6.3). 2020-10-24 21:55:21 +02:00
pom.xml #150 - Switch to use Thymeleaf layout dialect. 2021-10-06 16:56:39 +02:00
readme.adoc #149 - Update IntelliJ instructions. 2021-10-06 16:34:48 +02:00

= VideoShop - A Salespoint example project
:experimental:

image:https://github.com/st-tu-dresden/videoshop/workflows/Build%20Maven%20artifacts/badge.svg["Build Status", link="https://github.com/st-tu-dresden/videoshop/actions"]

Purpose of this sample project is to make students familiar with basic technologies they're going to use during the Software Engineering Lab at Technical University of Dresden.

## Quickstart

NOTE: The Quickstart requires Java 11 and a recent Git (2.20 or newer preferred) to be available on your machine. If you miss any of those go through the steps described in <<prerequisites>>.
Also, note that you have to run `mvnw.cmd` instead of `./mvnw` if you run Windows by accident.

[source, shell]
----
$ git clone https://github.com/st-tu-dresden/videoshop
$ cd videoshop
$ ./mvnw clean package
$ ./mvnw spring-boot:run
----

After that point your browser to `http://localhost:8080`.

Note that the standard admin user is named `boss` and has the password `123`.

## Prerequisites

### Java 11

https://adoptium.net/?variant=openjdk11&jvmVariant=hotspot[Download] the binaries, install. Make sure the console shows something like this:

[source, bash]
----
$ java -version
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)
----

Make sure that the wrapped Maven picks up the same JDK version and that the following command shows similar output:

[source, bash]
----
$ ./mvnw --version
Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
Maven home: /Users/JavaJoe/.m2/wrapper/dists/apache-maven-3.8.3-bin/5a6n1u8or3307vo2u2jgmkhm0t/apache-maven-3.8.3
Java version: 11.0.12, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "11.6", arch: "x86_64", family: "mac"
----

### Git

https://git-scm.com/download[Download] the binaries, run the installer. Verify the command line shows something like this after install:

[source, bash]
----
$ git --version
git version 2.33.0
----

## IDE Setup

### Eclipse

Grab the latest https://spring.io/tools[Spring Tool Suite] (plain Eclipse should work as well), run installer or unzip and run it.

Select menu:File[Import], select menu:Maven[Existing Maven Projects], select the folder you checked the project out into and hit btn:[Finish]. This will import the project into your workspace.

In the Console view you might wanna click the btn:[Open Console] button and select Maven Console to see that Maven is downloading dependencies, sources and Javadocs.

### IntelliJ

Grab the latest https://www.jetbrains.com/idea/download/[IntelliJ IDEA IDE] (both Community Edition and Ultimate Edition will work), install it according to the instructions on their website and run it.

From the Welcome Screen, select btn:[Open]. Otherwise, if you've already opened another project, you'll need to select menu:File[Open…].
Now, navigate to the folder you checked the project out into (it should contain `pom.xml`), select it and hit btn:[Open].
When asked whether to trust and open the Maven project, proceed with btn:[Trust Project].

Now you have to wait a bit while IntelliJ and Maven work on importing the project, which includes downloading all required dependencies from the internet.
All IDE activities are displayed in the status bar.

## Technology stack

This sample application is build on top of the following technologies:

### Spring Boot

Rapid application development framework based on Spring (see below).

- https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle[Reference documentation]
- https://spring.io/guides[Getting started guides]
- https://projects.spring.io/spring-boot[Project home]

### Spring 5

The de-facto standard Java application framework.

- https://spring.io/guides[Getting started guides]
- https://projects.spring.io/spring-framework[Project home]

### Spring Data JPA

Spring module to easily build data access layers using JPA 2.1 (Java Persistence API).

- https://spring.io/guides?filter=jpa[Getting started guides]
- https://projects.spring.io/spring-data-jpa[Project home]

### Thymeleaf

Library to build HTML web views using natural templating.

- https://spring.io/guides/gs/serving-web-content[Getting started guide]
- https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html[Tutorial]