Spring-boot Spring-loaded java 8 example

This super simple example application shows how to use spring-boot together with spring-loaded, spring-security, Maven and Java 8 to develop standalone application with hot-reloading of changes done to classes and resource files during development.

This makes it as easy and fast to develop in plain java as with grails or Ruby on Rails.

Quickstart

  1. Clone this git repo
  2. Open two terminal windows and change to the cloned directory
  3. In terminal window 1 run: mvn spring-boot:run
  4. Open http://localhost:8080/greeting in a browser window. Login with user/password
  5. Make changes in the GreetingController class and/or the greeting.html template file
  6. In terminal window 2 run: mvn compile
  7. Reload the web page in the browser to see the changes

Instead of manually running mvn compile you can make the compilation from within your favorite IDE as long as:

  1. The version of the java compiler is the same
  2. The IDE puts the compiled classes in the target/classes directory

You can even enable auto-compilation if your IDE supports that, for totally seamless development.

Technologies