This commit introduces a dedicated hook point for InfluxDB's http client
builder and retains backward compatibility, in a deprecated fashion, for
looking up a OkHttpClient.Builder bean.
Closes gh-14709
Previously, if WebFlux and Jersey were on the classpath, but there was
no Servlet API (and no embedded container) on the classpath, the web
application type would be prevented from being reactive. The absence
of the Servlet API would then prevent the web application type from
being servlet so it would be none.
By contrast, if Spring MVC was on the classpath in place of Jersey
the absence of the Servlet API would allow the web application type to
be reactive. This happened because the Spring MVC indicator class is
DispatcherServlet which requires the Servlet API.
This commit updates the Jersey indicator class to be ServletContainer.
This class is both an HttpServlet and a Filter so it too requires the
Servlet API and, therefore, further aligns the deduction behaviour for
Jersey and Spring MVC.
Closes gh-14701
Rework Prometheus push gateway support so that the central class can
be used outside of auto-configuration. The shutdown flags have also
been replaced with a single "shutdown-operation" property since it's
unlikely that both "push" and "delete" will be required.
It's also possible now to supply a `TaskScheduler` to the manager.
See gh-14353
Update `DevToolsPropertyDefaultsPostProcessor` to automatically set
the recently introduced `spring.messages.reloadable` property to
`true`.
Closes gh-14699
Previously, the JSON-B auto-configuration would be enabled when the JSON-B API was
on the classpath. This led to a failure if there was no implementation available.
The JSON-B API loads an implementation using the service loader. This commit updates
the auto-configuration to be conditional on the presence of a
META-INF/services/javax.json.bind.spi.JsonbProvider file on the classpath.
Closes gh-14675
Add a `spring.messages.reloadable` configuration property which can be
used to auto-configure a `ReloadableResourceBundleMessageSource` rather
than a `ResourceBundleMessageSource`.
Closes gh-13377
This commit removes the need for the Kotlin plugin tests to continue
to set the plugin classpath in each test build script. This is
achieved by adding the jars files containing the Kotlin plugin and
its dependencies to the runner's plugin classpath in the same way as
was already done for the dependency management plugin.
Closes gh-14680
Previously, each test build script used a property to configure its
classpath. This commit simplifies the tests by setting the classpath
once on the GradleRunner, thereby removing the need for it to be set in
each test script. It also allows, and, in fact, requires, the use of
the plugins block to apply the Boot plugin under test.
Unfortunately, this doesn't work for the tests for the reaction to the
Kotlin plugin. See the comments in the GradleBuild class and in each
KotlingPluginActionIntegrationTests build script.
See gh-14680
Refactor `ReactiveWebServerApplicationContext` to improve thread safety
by using a single manager object rather than then trying to synchronize
the `WebServer` and `HttpHandler`.
Closes gh-14666
Previously, only the permissions for the scripts in bin/ were set. The
permissions for the files in lib/ were not explicity set, leaving them
with the same permissions as the source files in Gradle's cache. This
has proven to be a little brittle when building in certain
environments, leading to test failures. It also assumes that the
file permissions in Gradle's cache will be appropriate for entries in
a distribution archive. That may not always be a reasonable assumption
to make.
To avoid the above-described problems, this commit updates the copy
spec that's used to add files to lib/ in the archive so that each
file uses 0644 for its permissions.
Closes gh-14158
This commit fixes missing descriptions and default values when
applicable for `management.server.ssl`, `server.compression`,
`server.http2`, `server.servlet.jsp`, `server.servlet.session` and
`server.ssl`.
Those nested namespace are managed by a POJO that is declared outside
of the module of the target @ConfigurationProperties type using it. As
a result, the annotation processor has no access to the source model and
can't extract the description and the default value, if any.
This commit migrates the misleading field-level Javadoc to manual meta
data for the time being.
Closes gh-14669
Previously, when an EntityManagerFactory was being initialized
synchronously, the DataSourceSchemaCreatedEvent would be published
during its initialization. This meant that an application listener that
depends on the EntityManagerFactory would create a dependency cycle if
it was a potential recipient of the event.
For the synchronous case, this commit moves the publication of the
event so that it occurs after the initialisation of the entity manager
factory. This allows an application listener that is a potential
recipient of the DataSourceSchemaCreatedEvent to depend on the
EntityManagerFactory without creating a cycle.
Closes gh-14651
Update `ReactiveWebServerApplicationContext` so that the `HttpHandler`
bean is not longer created from `onRefresh`, but is instead created
only when the server starts.
Prior to this commit, the WebFlux hander would cause early
initialization of several beans, including Jackson Modules.
Closes gh-14666
Add `Neo4jBookmarkManagementConfiguration` which provides an instance
of `BookmarkManager` if necessary and Caffeine cache is on the
classpath. Depending on the kind of application, the `BookmarkManager`
will be request scoped or singleton, as recommended by Spring Data
Neo4j.
See gh-14568
Update `Assertable*ApplicationContext` interfaces so that they also
extend the appropriate `Configurable*ApplicationContext` interface.
Closes gh-14650
The SpringBootContextLoader still checked if tests were annotated with
@IntegrationTest or @WebIntegrationTest. Those classes have been
removed in Spring Boot 1.5 and been deprecated since 1.4.
This commit removes the check on the annotations as well as the static
list of names.
See gh-14592
While MongoDB 3.6.7 has been released, 3.6.5 is the latest version that's supported
by the version of Embedded Mongo that we're currently using.
Closes gh-14476
Add `FilteringSpringBootCondition` base class and refactor the existing
`OnClassCondition` to use it. Also update the `match` method so that
the `autoConfigurationClasses` array may include `null` elements.
See gh-13328
Rework `DevToolsPropertyDefaultsPostProcessor` so that web logging no
longer defaults to `DEBUG`. The post processor now logs an info hint
to suggest the user configure the logging themselves.
Closes gh-14575
Fix description for `prefetch`; remove reference to transactions since
the direct container does not support transactionSize.
Also fix `transactionSize` to just reference acks; autoConfiguration
doesn't support enabling transactions.
Closes gh-14569
Update the JAR `Hander` so that URL `startsWith` checks produce less
garbage. Comparisons are now performed first on the `path` rather than
the full `toString`. URL `toString` operations produce quite a lot of
garbage since a `StringBuilder` is always used.
In addition, we now also cache the JarFile URL toString to save repeated
calculation.
Closes gh-14561
Rewrite `ConfigurationPropertyName` in an attempt to consume less memory
and to reduce GC pressure from `toString()`.
Prior to this commit the `toString()` method would always construct a
new value from the name elements. This is sub-optimal since on on many
occasions the `ConfigurationPropertyName` is created from an already
well-formed String. The updated code now attempts to directly use the
original value for both `toString` and `equals` whenever possible.
Further refinements have also been made to the way that elements are
stored. Rather than a list or objects, we now use arrays that contains
the split points and types. This helps to reduce the amount of memory
required to store the name.
Closes gh-13414
Update `SpringConfigurationPropertySource` so that the
`DelegatingPropertyMapper` accepts a maximum of two values and does
not need to wrap arguments in an array. Also optimize the merge
operation to return a single result directly rather than always using
a new `List`.
Closes gh-14563
Generally speaking, methods on configuration classes will only be called once
and, therefore, it should be safe to hold a reference to a Stream for later
one-time usage. However, there are some scenarios in Spring Fu where functional
registration results in an attempt being made to use a Stream more than use.
This commit protects against multiple use by storing the ObjectProvider and
getting a new ordered Stream each time it's needed.
Closes gh-14467
This commit makes sure that "org.quartz.scheduler.instanceName" is
honoured if set. Previously, "spring.quartz.scheduler-name" had a
default value and was always set. As a result, `SchedulerFactoryBean`
did not take the quartz property into account.
Closes gh-14243
Previously, if a class was added and then changed, a restart would be triggered
and things would behave as if the class had been deleted. This occurred
because, when looking for additional classes that were not on the original
classpath, only files that had been added were considered. The subsequent
change to the class was noticed as a modified rather than an addition,
resulting in the class being skipped.
This commit updates the resource resolver to only ignore deleted files and
consider both added files and modified files when looking for additional
resources.
Closes gh-14205
While MongoDB 3.6.7 has been released, 3.6.5 is the latest version that's supported
by the version of Embedded Mongo that we're currently using.
Closes gh-14476
Spring Framework now requires that all nested configuration classes
are contained within a `@Component` class (see SPR-16839). This means
that our abstract `JpaBaseConfiguration` class should have a
`@Configuration` annotation.
Closes gh-14480
This commit changes @SpringBootTest(randomPort = true) to
generate a random port for the actuator endpoints if the
management server runs on a different port from the main
server.
Closes gh-4424
Reinstate `web` logging when devtools is in use, making use of the new
logging groups support. Devtools now also logs an `INFO` message
informing that properties defaults are offers an easy way to disable
them.
Closes gh-14450
Add additional `switchTo` methods to allow a `DeferredLogger` to behave
like a regular logger once it has been replayed.
This commit also improves thread thread safety within the implementation.
Closes gh-14452
Provide a way for users to quickly group related loggers together for
easier configuration. The `loggers.group` property can be used to define
a group that can then be configured in the usual `loggers.level.<group>`
way.
Additionally, provide pre-defined groups for `web` and `sql.
Closes gh-14421
Update `DevToolsPropertyDefaultsPostProcessor` to remove custom logging
level configuration. Unfortunately it's not easy to back-off logging
overrides when the user has a custom logback/log4j configuration.
Closes gh-14310
Update `SpringApplication` to automatically register the shared
`ApplicationConversionService` instance with the `BeanFactory` and
`Environment`.
Closes gh-12148
Non web applications might want to leverage
`ReactiveClientRegistrationRepository` and
`ServerOAuth2AuthorizedClientRepository` to configure `WebClient`.
Closes gh-14350