The Spring Boot Dashboard in STS - Part 3: Spring Boot Devtools reloaded

Engineering | Martin Lippert | October 22, 2015 | ...

Welcome back Spring community,

to this final part of our series about the new Spring Boot Dashboard in the Spring Tool Suite. In this final part we will take a deeper look at using the Spring Boot Devtools in combination with the boot dashboard. Again, this feature is new with Spring Boot 1.3, so you need to be on that version in order to use the following features.

Quickly deploy code changes

For local apps, using the Spring Boot Devtools is extremely easy and straightforward. As soon as you add the Spring Boot Devtools to your project as a dependency (there is an easy menu option for that in the Spring category of your context menu) and start your app, it will listen for local changes to configuration and class files and kick a restart of the app for you automatically. You don’t even need to restart the app yourself, the Spring Boot Devtools will do that for you automatically. Since STS/Eclipse produces and updates class files whenever you save a file, all this happens automatically for you when working within STS.

This story gets more interesting if you run your Spring Boot apps on a remote runtime like Cloud Foundry. In principle, you can use the Spring Boot Devtools in such a remote setting as well, but it requires a bit more work. The good news is that the Spring Boot Dashboard helps you with that.

As soon as you deploy or restart (and therefore update) a Spring Boot app on Cloud Foundry (using the boot dashboard) that has the Spring Boot Devtools on its classpath, the boot dashboard will configure the boot app on CF for the remote usage of the devtools automatically. This includes primarily the setting of a remote secret - to allow remote devtools access to it.

Once the devtools-enabled boot app is running on Cloud Foundry, you can easily start the boot devtools remote client application for it. This client application runs locally on your machine and connects to the remote application on Cloud Foundry. It watches for file changes, uploads them to the app on Cloud Foundry and triggers a restart of the app on Cloud Foundry.

Since the remote client app will watch for file changes within the project on your local machine, you can continue to work within your IDE as usual. Changed files are automatically updated to the Cloud Foundry version of the app by the remote client app. The counterpart on Cloud Foundry will restart the boot app once those changed files are stored to the app on Cloud Foundry. This works for newly compiled source code as well as for changed resource files.

This allows you to achieve quick turnaround cycles when working on your project even if it is deployed to a remote cloud runtime.

Debugging in the cloud

In addition to the automatic restart feature, the Spring Boot Devtools also enable full debugging of remote apps on a cloud runtime. This is supported by the Spring Boot Dashboard in STS, too. If you have the Spring Boot Devtools on the classpath of your application, you can press the (re)debug button for the Cloud Foundry instance of the app. This will restart the app on Cloud Foundry in debug mode, automatically start the corresponding remote client app on your machine, and hook up the Eclipse debugger to it.

You can debug the application that is running on the cloud runtime in the same way as local applications, including setting breakpoints, inspecting variables, or even hot-swapping code. However, the automatic restart feature is not available for apps running in debug mode (due to technical limitations of the boot devtools at the moment).

If you try the remote debugging of apps on Cloud Foundry, you will notice a significant slowdown in debugging. This is caused by the tunneling of the remote debug protocol of the JVM through a HTTP connection, something the remote debug protocol is not designed for. We are working on improving this by using a different transport mechanism. But the remote debugging of the app on Cloud Foundry should be something you rarely do. For more frequent debugging you might want to consider running and debugging the app locally and connecting it up with the rest of your application services via the ngrok tunneling feature that we described in the previous part of this blog series.

Conclusion

This concludes the blog series on the Spring Boot Dashboard, a new feature in the Spring Tool Suite since its 3.7.1 release. Let us know about your experiences using the dashboard.

This Week in Spring ( SpringOne2GX replay / Pieter Humphrey edition!) - October 21, 2015

Engineering | Josh Long | October 21, 2015 | ...

Welcome to another installation of This Week in Spring! This week is the first week (of many) where the crazy awesome [https://twitter.com/pieterhumphrey](Pieter Humphrey) has released scores of SpringOne2GX 2015 videos for our binge watching enjoyment! Most of this week's bountiful roundup is thanks to Pieter's meticulous transcoding, uploading and posting videos from SpringOne2GX 2015 - thanks Pieter! So without further ado, let's take a look at some of this week's selection including a LOT of content from SpringOne2GX, including..

Spring Boot 1.3.0.RC1 Available Now

Releases | Phil Webb | October 21, 2015 | ...

Spring Boot v1.3.0.RC1 is available now from the Spring milestone repository. This release closes almost 140 issues and merges 53 pull-requests! Thanks to everyone that has contributed.

We're not planning on having a long release candidate phase, so please do try RC1 and let us know if you find any problems.

For a complete list of changes, and upgrade instructions, see the Spring Boot 1.3 Release Notes on the wiki and the updated reference documentation.

Project Page | GitHub | Issues | Documentation

SpringOne2GX 2015 replay: Modern Java Component Design with Spring Framework 4.2

News | Pieter Humphrey | October 19, 2015 | ...

Recorded at SpringOne2GX 2015 Speakers: Juergen Holler, Stephane Nicoll Slides: http://www.slideshare.net/SpringCentral/modern-java-component-design-with-spring-framework-42 Spring's programming and configuration model has a strong design philosophy with respect to application components and configuration artifacts. Spring's annotation-based component story is fine-tuned for source code readability as well as consistency across an entire application's codebase. This session presents selected Spring Framework 4 component model highlights, with a focus on the upcoming Spring Framework 4.2 and…

SpringOne2GX 2015 replay: Spring Cloud *: Exploring Alternative Spring Cloud Implementations

News | Pieter Humphrey | October 19, 2015 | ...

Recorded at SpringOne2GX 2015 Speaker: Spencer Gibb Slides: http://www.slideshare.net/SpringCentral/spring-cloud-alternative-implementations-of-discovery-config-bus In this session we will discuss the Spring Cloud abstractions and interfaces that an implementation might choose to implement: DiscoveryClient, LoadBalancerClient, Configuration and Bus. We will compare and contrast some target technologies and discus the tradeoffs and nuances of each, such as: netflix, consul, etcd, zookeeper and lattice. We will then show and demonstrate Spring Cloud implementations of those technologies.

SpringOne2GX 2015 replay: A How to Guide to Security in the PAAS Cloud

News | Pieter Humphrey | October 19, 2015 | ...

Recorded at SpringOne2GX 2015 Speaker: John Field, Shawn McKinney Slides: http://www.slideshare.net/SpringCentral/a-how-to-guide-to-security-in-the-paas-cloud Most developers still deal with application security issues in isolation, without understanding the security of the ""full stack"". As a result, security is sometimes inconsistent, and can be seen as a barrier to moving applications to the cloud. The session will examine the security of a typical Java Web application in an enterprise deployment. We will then look at what needs to change when that secure Java application is “forklifted…

SpringOne2GX 2015 replay: Securing Microservices with Spring Cloud Security

News | Pieter Humphrey | October 19, 2015 | ...

Recorded at SpringOne2GX 2015 Speaker: Will Tran Slides: http://www.slideshare.net/SpringCentral/securing-microservices-with-spring-cloud-security-53170178 This talk will walk through the authentication and authorization scenarios that you may encounter once you start building out microservices. We'll go over OAuth2, OpenID Connect, and how to leverage those standards with Spring Cloud Security, so you can build out secure services that can be easily consumed by both Spring and non-Spring clients.

SpringOne2GX 2015 replay: Spring Boot Micro-services, Containers, and Kubernetes - How To

News | Pieter Humphrey | October 19, 2015 | ...

Recorded at SpringOne2GX 2015 Speaker: Ray Tsang, Google Slides: https://speakerdeck.com/saturnism/2015-springone-2gx-java-based-microservices-and-kubernetes-how-to Join this session to learn how to create a Java-based microservice using Spring Boot, containerize it using Maven plugins, and subsequently deploy a fleet of microservices and dependent components such as Redis using Kubernetes. Spring Boot makes creating microservices fast and easy - when it comes to running a single instance. Like most Java application, the harder part is usually the clustering and fail-over configurations…

SpringOne2GX 2015 replay: Spring Boot for DevOps

News | Pieter Humphrey | October 19, 2015 | ...

Recorded at SpringOne2GX 2015 Speaker: Nicholas Frankel Slides: http://www.slideshare.net/SpringCentral/spring-boot-for-devops Spring Boot is a product from Spring, that provides many configuration defaults for a new Spring project, so that one can set up a project in minutes. However, this is only one of the many features of Spring Boot. One of its module also provides many important Non-Functional Requirements out-of-the-box: monitoring, metrics, exposing those over HTTP, etc. In this presentation, I'll demo some of those, that will make DevOps more than a little happy. Comments: DevOps…

SpringOne2GX 2015 replay: 12 Factor, or Cloud Native Apps for Spring Developers

News | Pieter Humphrey | October 19, 2015 | ...

Recorded at SpringOne2GX 2015 Speaker: Cornelia Davis Slides: http://www.slideshare.net/SpringCentral/12-factor-cloud-native-apps-for-spring-developers The third platform, characterized by a fluid infrastructure where virtualized servers come into and out of existence, and workloads are constantly being moved about and scaled up and down to meet variable demand, calls for new design patterns, processes and even culture. One of the most well known descriptions of these new paradigms is the Twelve Factor App (12factor.net), which describes elements of cloud native applications. Many of these…

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all