Replace the enum provider by a more general purpose provider that can
substitute the type of the property for the purpose of auto-completing
the values.
"handle-as" can be used for enums but for any type that the IDE
understands such as locale, charset, mime-type and Spring's resource
abstraction.
Closes gh-3457
Add ApplicationArguments interface which allows SpringApplication.run
arguments to be injected into any bean. The interface provides access
to both the raw String[] arguments and also provides some convenience
methods to access the parsed 'option' and 'non-option' arguments.
A new ApplicationRunner interface has also been added which is
similar to the existing CommandLineRunner.
Fixes gh-1990
Add support for the following server properties which can be used to
configure the session:
server.session.tracking-modes
server.session.cookie.name
server.session.cookie.domain
server.session.cookie.path
server.session.cookie.comment
server.session.cookie.http-only
server.session.cookie.secure
server.session.cookie.max-age
In addition `server.session-timeout` is now deprecated and has been
replaced with `server.session.timeout`.
Fixes gh-3240
Unfortunately, we have no other choice to flip the ignoreUnknownFields
attribute of `SecurityProperties` has many different target are now set
for that namespace outside the class. See gh-3445 for a potential way
to improve that.
Closes gh-3327
Use AbstractTemplateViewResolverProperties as the base class for
GroovyTemplateProperties since the Spring GroovyMarkupViewResolver is
an AbstractTemplateViewResolver.
The auto-configuration for Groovy is now more aligned with the existing
Freemarker and Velocity auto-configuration, with a `resourceLoaderPath`
property being used instead of `prefix`.
Fixes gh-3365
Closes gh-3374
Previously, all attempts to log a configuration file were logged at DEBUG
level which lead to a lot of noise as Spring Boot looks in many places by
default.
We now only log the files that are effectively found at DEBUG level and
all failed attempts at TRACE level.
Closes gh-3129
If a `JavaMailSenderImpl` is available, check that the underlying mail
server is available on startup. Add a `spring.mail.test-connection`
property to control this behaviour.
Closes gh-3408
If spring-hateoas is on the classpath and an MvcEndpoint returns a
@ResponseBody it will be extended and wrapped into a Resource with links.
All the existing endpoints that return sensible JSON data can be extended
this way (i.e. not /logfile). The HAL browser will also be added as an
endpoint if available on the classpath. Finally, asciidocs for the
Actuator endpoints are available as a separate jar file, which if
included in an app will also generate a new (HTTP) endpoint.
Fixes gh-1390
There is a new spring.factories entry for
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcConfiguration
which loads extra beans into the MVC config for the Actuator.
If the management context is a child context all the beans go in the
child (except the Spring Security filter still). A big bonus is that
you can add WebConfigurerAdapters to configure static resources etc.
A new component called ManagementContextResolver can be used to
locate the ApplicationContext for the MVC endpoints.
Fixes gh-3345
This commit improves support of the Resource Handling features
introduced in Spring Framework 4.1. Those features add new ways to
resolve and transform static resources in applications.
See [this blog
post](https://spring.io/blog/2014/07/24/spring-framework-4-1-handling-static-web-resources)
for more details.
The `ResourceUrlEncodinFilter` is added for compatible template engines:
Velocity and Thymeleaf. It assists them with rewriting the URLs of
static resources when rendering templates.
New keys are added in the `ResourceProperties` in order to configure
the Resource Handling chain. `ResourceResolvers` and
`ResourceTransformers` are registered accordingly in
`WebMvcAutoConfiguration`.
Here is an example of enabling a `ContentVersionStrategy` on all
static resources, meaning their names will be changed for cache
busting purposes by adding a content hash at the end of the file name.
Like "/js/jquery.js -> /js/jquery-872ca6a9fdda9e2c1516a84cff5c3bc6.js".
```
spring.resources.chain.enabled:true
spring.resources.chain.strategy.content.enabled:true
spring.resources.chain.strategy.content.paths:/**
```
Closes gh-1604
Closes gh-3123
Improve the "hints" section of the metadata so that each hint can provide
the reference to a value provider.
A value provider defines how a tool can discover the potential values of
a property based on the context. The provider is identifed by a name and
may have an arbitrary number of parameters.
Closes gh-3303
Update documentation section that discusses uber jars since it conflates
the concepts of the uber jar and the shading of dependencies into jars
(which may or may not be true uber jars).
Fixes gh-3321