Let's start by defining a baseline for our development experience. We'll use test-driven development and run the application locally on the JVM.
Navigate to the basic
folder.
cd basic/book-service
Implement a new feature using test-driven development. You can run tests with the following command.
./gradlew test
You can run the application on the local JVM as follows.
./gradlew bootRun
The Spring Boot Developer Tools library provides live-reload capabilities when working on the application locally.
Navigate to the live-reload
folder.
cd live-reload/book-service
Run the application on the local JVM as follows.
./gradlew bootRun
Now, try making some changes to the application (for example, updating the REST API) and save. Spring Boot Developer Tools will automatically reload the application with the new classes.
If you use Visual Studio Code, the live reload functionality works without any additional configuration.
If you use IntelliJ IDEA, refer to the official documentation to enable support for Spring Boot DevTools in the IDE.