What Is New in Spring Boot 1.1
This release introduces significant enhancements across templating, metrics, and developer tooling. The focus was on expanding support for various view technologies and providing deeper insights into application runtime behavior.
| Category | Key Changes |
|---|---|
| New Features | Support for Groovy Templates, Mustache, and Apache Tiles. Integration with Dropwizard Metrics. |
| Improvements | Enhanced developer tools with automatic restart, LiveReload, and global settings. Better template caching configuration. |
| Bug Fixes | Various fixes for embedded container support and auto-configuration logic. |
| Deprecations | No major deprecations announced in this release. |
How did templating support improve?
Spring Boot 1.1 added auto-configuration for three new templating engines. This expands options beyond the existing support for Thymeleaf, FreeMarker, and Velocity.
You now get automatic setup for Groovy Templates, Mustache, and Apache Tiles. In practice, dropping the relevant dependency into your project is all you need to start using these view technologies. The auto-configuration handles the view resolver setup and default configuration, which drastically reduces the boilerplate code you have to write.
What metrics capabilities were introduced?
This version integrated the Dropwizard Metrics library directly into the framework. This provides a powerful way to collect and expose metrics about your application's JVM and runtime performance.
You can automatically gather data on memory usage, garbage collection, thread states, and more. The metrics are exposed via a new /metrics endpoint on the actuator, giving you a clear window into your app's health. This matters because it moves application monitoring from a manual setup task to a zero-configuration feature.
How did developer tools get better?
The developer tools module received major upgrades, most notably with automatic application restart. When you change a classpath file, the app can now restart automatically, significantly speeding up the development feedback loop.
It also includes LiveReload integration to automatically trigger browser refreshes on static resource changes. A global configuration file allows you to set properties that apply to all your Spring Boot projects, which is great for standardizing settings across your development environment.
Were there any template caching changes?
Yes, the behavior for template caching was made more consistent and configurable. Previously, template caching was disabled in development but enabled in production, which could lead to unexpected behavior.
Now, you have explicit control over this setting. The spring.thymeleaf.cache property (and similar properties for other templating engines) dictates the caching behavior regardless of the environment. This gives developers more predictable control over how templates are handled during development and deployment.
FAQ
How do I add Mustache support to my existing Spring Boot 1.1 application?
Simply add the Mustache dependency to your project. For Maven, include <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-mustache</artifactId></dependency>. Spring Boot's auto-configuration will automatically set up the necessary view resolvers.
Can I disable the new /metrics endpoint?
Yes, you can control the actuator endpoints through configuration. Set endpoints.metrics.enabled=false in your application.properties to disable the metrics endpoint entirely.
Does the automatic restart work with any IDE?
The automatic restart feature is part of the spring-boot-devtools module and works by monitoring the classpath for changes. It's IDE-agnostic and will function with any development environment that updates the classpath output directory when files are saved.
What is the global configuration file for developer tools?
It's a file named spring-boot-devtools.properties that you place in your $HOME directory. Any properties defined in this file will apply to all Spring Boot applications on your machine that use devtools, which is useful for setting personal defaults.
How do I control template caching in development now?
You must explicitly set the cache property for your chosen templating engine. For example, to disable Thymeleaf caching, add spring.thymeleaf.cache=false to your application.properties file. The old environment-based automatic behavior has been removed.