Skip to content

gregswindle/mvn-spring-boot-thymeleaf-nodejs

Repository files navigation

spring-boot-starter-thymeleaf

License Known Vulnerabilities Java Dependency Status Node.js Dependency Status Node.js DevDependency Status Greenkeeper badge
Appveyor Status Build Status Coveralls Status

Starter project for designing HTML templates with Spring Boot, Thymeleaf, and Node.js tooling.

Table of contents

1. Overview

spring-boot-starter-thymeleaf uses the Spring Project spring-boot-starter-thymeleaf with the exec-maven-plugin in order to execute npm-run-scripts during Maven's build lifecycle.

2. Getting started

2.1. Prerequisite software

spring-boot-starter-thymeleaf is written in Java and JavaScript, both of which must be installed prior to use. Java and JavaScript require npm and Maven respectively, which are used for installing dependencies and executing build, test, and deploy tasks.

Dependency Required OS Notes
Java JDK 8 (or greater) Yes. All Required for all software products that depend on the Spring Framework.
Maven No. This product is bundled with mvnw. All A Java build, test, and deploy management framework. Maven also manages dependencies.
Node.js (includes npm) Yes. If you cannot install nvm, install Node.js. All Required for JavaScript build, test, and deploy automation.
nvm No, but highly recommended. macOS and Linux Node Version Manager allows you to install and switch among multiple versions of Node.js (and npm) via the CLI. Most cloud-based CI services (e.g., Travis CI) use nvm.

2.2. Installation

Open a Terminal and run:

$ git clone https://github.com/gregswindle/spring-boot-starter-thymeleaf.git

Go into the installation directory:

$ cd spring-boot-starter-thymeleaf

Install all Java and JavaScript dependencies:

$ ./mvnw clean install -DskipTests

3. Configuration

spring-boot-starter-thymeleaf uses several CI-services to automate build and test execution. All are optional, but if you choose to use them, you'll need to modify your pom.xml and package.json manifest files.

Service Category Required Notes
Appveyor CI No Build and test on Windows servers.
Coveralls Test No Tracks test coverage over time.
DependencyCI Dependency drift No Tracks Java and JavaScript dependencies for updates.
SonarCloud Code quality No "All-in-one" code quality inspection service. We use SonarCloud's measure badges in our PULL_REQUEST_TEMPLATE to quickly assess the quality of PRs.
Snyk Security No This is enabled by default. To disable, use the flag --DskipSnykScan. To use Snyk, you'll need to follow these Snyk installation instructions.
Travis CI CI No Build and test on Linux and macOS.

4. Usage

4.1. Launch the site (locally)

$ ./mvnw spring-boot:run

💡 TIP: Open http://localhost:8080/hello?name=Thymeleaf%20professional in a web browser to view the web site.

4.2. Build the site

$ ./mvnw package

4.3. Execute Java and JavaScript unit tests

$ ./mvnw test

4.4. List all build dependencies

$ ./mvnw dependency:tree

4.5. Generate Javadocs

$ ./mvnw javadoc:javadoc

💡 Tip: Open ./target/apidocs/index.html in a web browser to view the Javadocs.

4.6. Generate project reports

$ ./mvnw site

💡 Tip: Open ./target/site/index.html in a web browser to view the Project Information reports.

5. Semantic version and CHANGELOG

The latest version of spring-boot-starter-thymeleaf is 0.0.1-SNAPSHOT. View the CHANGELOG for details.

6. Contributing

Learn how to make a Pull Request with free training

We welcome contributors with Pull Requests!

Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:

  1. Read the Code of Conduct.
  2. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
  3. Follow Contributing to spring-boot-starter-thymeleaf's coding conventions and Git workflow if you're willing and able to program (or want to learn how).

7. License

MIT © Greg Swindle.