A boilerplate Spring MVC project with Swagger intergration and es6/pug frontend built with npm
- Spring MVC
- Springfox and Swagger-ui for automated JSON API documentation
- NPM as a package manager
- swagger-client as a REST API consumer
- Pug as HTML template engine
- Browserify (with babelify plugin) to build and bundle Javascript
- Pug-cli to render HTML from templates
- Bash script as a build tasks runner
- Ant target executes build bash script during WAR artifact pre-processing
- Built frontend app is into WAR root folder
- Watchify to rebuild and hot-swap Javascript on-the-fly
- Pug-cli with
--watch
flag - Bash as a watch tasks runner and watcher for static HTML files
- Watch tasks replaces files directly in the WAR artifact
- IDEA Ultimate
- Spring 4.x
- Node.JS and NPM
git clone
cd frontend
npm install
- Open project in IDEA, run
spring-npm-frontend-boilerplate:war exploded
artifact in your favourite web container - To enable watching and hot-swapping, run
watch.sh
bash script
- http://localhost:8080/ - started application (you have have another port)
- http://localhost:8080/v2/api-docs - Swagger OpenAPI config
- http://localhost:8080/swagger-ui.html - Swagger UI with API documentation