This is a simple project that could be used as a template for Java Web application.
Technologies not used:
- No Spring Boot and other Spring Framework modules
Technologies used:
- sparkjava - a Java micro framework to create web apps
- React - a JS library for building user interface
- Material-UI - React components
- gradle - a project build tool
- npm - a JS build tool
- npm is installed (version 6.10+)
- jdk is installed (version 14+)
- To build JAR execute the command
./gradlew shadowJar
- To run JAR type
java -jar ./build/libs/app.jar
The app should be available athttp://localhost:8080
. You can change the port with the system propertyjava -Dserver.port=8082 -jar ./build/libs/app.jar
- To continuously rebuild JS run
npm run dev
- To make jar serve the latest JS use the
dev
system propertyjava -Ddev=true -jar ./build/libs/app.jar