Clone the project
git clone https://github.com/iceant/demo-rocker-spring-boot-starter
check out rocker-spring-boot-starter
cd demo-rocker-spring-boot-starter
git submodule init
git submodule update
build jar package
execute the following command from project root
mvn package
run jar
java -jar path/to/your/demo-rocker-spring-boot-starter-0.0.1-SNAPSHOT.jar
open browser visit http://localhost:8080/
- The template will be compiled automatically.
- Compile the template will take time, maybe some exception will be thrown, just refresh the browser to check the result
- Modify the template in demo-rocker-spring-boot-starter/src/main/resources/templates/index.rocker.html and refresh the browser to check the result.
- Dynamic load template is only happed at develop phase. At runtime, the class will be load instead of parse the template files.