Developing Java Applications with Spring and Spring Boot
by Claudio Eduardo de Oliveira, Greg L. Turnquist, Alex Antonov
How it works...
It might look like voodoo magic, but the science behind the Remote Restart functionality is pretty straightforward. Under the hood, when a DevTools module is included, the HTTP endpoint handler for /.~~spring-boot!~/restart automatically gets added. This allows the RemoteSpringApplication process to send the code change payload via an HTTP tunnel to the remote application and back.
To make sure that no malicious outside debug connection gets to connect to our remote application, the value of the spring.devtools.remote.secret property gets sent across and verified to establish the authenticity of the request.
In step 2 of the recipe, we launched the RemoteSpringApplication process with a program arguments value of http://127.0.0.1:8080 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access