Commit Graph

9632 Commits

Author SHA1 Message Date
Andy Wilkinson
df67816e55 Try to make ConfigurationPropertySourcesTests perf tests more robust
Previously, the tests used absolute values to verify that the work
had completed sufficiently quickly. This led to flaky tests in
environments where the performance can be variable such as CI.

This commit tries to make the tests more robust by comparing the
performance to a baseline and requiring it to be twice as fast.

Closes gh-22137
2020-07-09 12:36:06 +01:00
Andy Wilkinson
b24f17b35c Rework spring-boot-docs to be a full-blown java project
Previously, spring-boot-docs used the java-base-plugin and then added
configuration on top. This has proven to be error prone, with the most
recent problem being that the tests were not being compiled and run.

This commit changes approach and applies the java plugin to the project
instead of the java-base plugin. Now, rather than adding the necessary
configuration to the base, the unwanted pieces of the java plugin's
configuration – specifically the jar and javadoc tasks – are disabled
instead. The DeployedPlugin has also been updated so that it does not
create a publication from the java component for projects that have a
disabled jar task.

Closes gh-22284
2020-07-09 11:21:03 +01:00
Andy Wilkinson
c765df6e5d Merge branch '2.2.x' into 2.3.x
Closes gh-22282
2020-07-09 10:37:01 +01:00
Andy Wilkinson
afa5b12bdb Make reactive Jetty auto-config back off without jetty-servlet
Fixes gh-22275
2020-07-09 10:36:32 +01:00
Scott Frederick
1e2176b6c9 Improve Redis URL validation
This commit improves the validation of URLs provided in the property
'spring.redis.url' used to auto-configure a Spring Data Redis
connection. In particular, only the URL schemes 'redis://' and
'rediss://' are allowed, and any other scheme will result in a
configuration error. A failure analyzer is also provided to improve
diagnostics for common mis-configurations detected by this validation.

Fixes gh-21999
2020-07-08 14:50:26 -05:00
Andy Wilkinson
d84aeef529 Merge branch '2.2.x' into 2.3.x
Closes gh-22264
2020-07-08 18:00:07 +01:00
Andy Wilkinson
66987533d1 Link to application properties section from externalized config list
Closes gh-22262
2020-07-08 17:58:35 +01:00
Andy Wilkinson
502ccb6586 Honor spring.autoconfigure.exclude in test slices
Previously, the import selector for `@ImportAutoConfiguration` did not
consider the spring.autoconfigure.exclude property when determining
which auto-configurations to exclude. This meant that tests using a
slice that included a particular auto-configuration would include it
even if the application's configuration excluded it via
spring.autoconfigure.exclude. Confusingly, this could result in a
sliced test using an auto-configuration that would be excluded in a
broader `@SpringBootTest`.

This commit updates the ImportAutoConfigurationImportSelector to
consider the spring.autoconfigure.exclude property so that sliced tests
will use a subset of the auto-configurations that a `@SpringBootTest`
would use.

Fixes gh-21736
2020-07-08 17:22:32 +01:00
Andy Wilkinson
1b85ce0769 Streamline OAuth2 resource server auto-config class conditions
Fixes gh-22233
2020-07-07 12:22:27 +01:00
Andy Wilkinson
b8bc219b25 Merge branch '2.2.x' into 2.3.x
Closes gh-22251
2020-07-07 11:52:34 +01:00
Andy Wilkinson
4e79bb1cff Disable bean method proxying in SpringBootJdbcConfiguration
Closes gh-22231
2020-07-07 11:51:07 +01:00
Andy Wilkinson
da319f5f59 Merge branch '2.2.x' into 2.3.x
Closes gh-22249
2020-07-07 11:43:03 +01:00
Andy Wilkinson
14f24dbecc Merge branch '2.1.x' into 2.2.x
Closes gh-22248
2020-07-07 11:42:43 +01:00
Andy Wilkinson
26f591264c Fix handling of NestedServletException with no root cause
Fixes gh-22169
2020-07-07 11:34:25 +01:00
Andy Wilkinson
24e1a1dddf Merge branch '2.2.x' into 2.3.x
Closes gh-22246
2020-07-07 10:53:45 +01:00
Andy Wilkinson
a8d3f9af31 Polish "Rename NoneOfNestedConditions to NoneNestedConditions in example docs"
See gh-22207
2020-07-07 10:46:32 +01:00
Clayton Walker
7fee70a625 Rename NoneOfNestedConditions to NoneNestedConditions in example docs
See gh-22207
2020-07-07 10:46:20 +01:00
Andy Wilkinson
96e6b74894 Merge branch '2.2.x' into 2.3.x
Closes gh-22243
2020-07-07 09:56:21 +01:00
Andy Wilkinson
a0f1424393 Polish "Fix unwrapping of captured PrintStream in test support's OutputCapture"
See gh-22214
2020-07-07 09:54:52 +01:00
XenoAmess
75a64bd901 Fix unwrapping of captured PrintStream in test support's OutputCapture
See gh-22214
2020-07-07 09:53:34 +01:00
Andy Wilkinson
28128a9577 Add support for ChronoUnit.WEEKS when using PeriodUnit
Fixes gh-22225
2020-07-06 19:57:26 +01:00
Andy Wilkinson
d1f074858e Correct class name of StringToPeriodConverterTests 2020-07-06 15:59:32 +01:00
Andy Wilkinson
2007490ce7 Merge branch '2.2.x' into 2.3.x
Closes gh-22234
2020-07-06 14:24:53 +01:00
Andy Wilkinson
4301580095 Improve testing of PropertyPlaceholderAutoConfiguration
Since Spring Framework 4.3.0.RC2, a default embedded value resolver
has been registered with the bean factory when one is not otherwise
configured. This meant that placeholders in `@Value` would be resolved
with or without PropertyPlaceholderAutoConfiguration defining a
PropertySourcesPlaceholderConfigurer bean. However, placeholders in
bean definitions would only be resolved if a
PropertySourcesPlaceholderConfigurer was defined.

This commit updates PropertyPlaceholderAutoConfigurationTests to align
with this change in Framework. We now test that placeholders are
resolved in `@Value` annotations with or without the auto-configuration
and that placeholders in bean definitions are only resolved with the
auto-configured.

Closes gh-22230
2020-07-06 14:24:36 +01:00
anshlykov
683a7a851f Update to Maven Shade Plugin 3.2.4
See gh-22227
2020-07-06 09:51:08 +01:00
Andy Wilkinson
dfea2f432a Polish
See gh-21921
2020-07-06 09:41:39 +01:00
Brian Clozel
86d8366ee2 Polish support for reactive Elasticsearch healthcheck
Fixes gh-21042
2020-07-03 15:25:18 +02:00
Aleksander Lech
203878a16f Add support for reactive Elasticsearch healthcheck
Prior to this commit, configuring a reactive Elasticsearch client would
auto-configure an Actuator Health check using a synchronous client, with
the default configuration properties (so tarting localhost:9200).

This would lead to false reports of unhealthy Elasticsearch clusters
when using reactive clients.

This commit reproduces the logic for MongoDB repositories: if a reactive
variant is available, it is selected for the health check
infrastructure.

See gh-21042
2020-07-03 15:16:38 +02:00
Andy Wilkinson
79770b9615 Use source sets to determine configurations deprecated for resolution
Fixes gh-22200
2020-07-02 15:14:00 +01:00
Andy Wilkinson
f6b3666b16 Merge branch '2.2.x' into 2.3.x
Closes gh-22197
2020-07-02 10:40:54 +01:00
Andy Wilkinson
21453b5016 Ignore scoped targets when finding matching beans
Fixes gh-22038
2020-07-02 10:39:56 +01:00
Andy Wilkinson
81d6751ba7 Use ApplicationContextRunner in ConditionalOnSingleCandidateTests 2020-07-02 10:10:28 +01:00
Eddú Meléndez
54e0a61b42 Reinstate metrics for Kafka Streams
See gh-21921
2020-07-01 14:03:11 +01:00
Andy Wilkinson
d64337013f Upgrade to Spring Kafka 2.5.3.RELEASE
Closes gh-22185
2020-07-01 14:01:39 +01:00
Andy Wilkinson
9360ba168b Upgrade to Reactor Dysprosium-SR9
Closes gh-21938
2020-07-01 11:51:54 +01:00
Andy Wilkinson
a13acf9f2b Upgrade to Reactor Dysprosium-SR9
Closes gh-21937
2020-07-01 11:49:39 +01:00
Andy Wilkinson
9317135690 Improve error handling when builder image isn't a builder
Fixes gh-22179
2020-07-01 11:42:36 +01:00
Andy Wilkinson
0e1ded6893 Merge branch '2.2.x' into 2.3.x
Closes gh-22175
2020-06-30 17:39:52 +01:00
dreis2211
8c0e302f2e Accept empty filter dispatcher types in auto-configurations
Prior to this commit, the usage of EnumSet.copyOf resulted in exceptions when
the underlying collection was empty.

See gh-22138
2020-06-30 17:39:21 +01:00
Andy Wilkinson
4566ac5c25 Add package info to o.s.b.autoconfigure.elasticsearch.rest
Closes gh-22147
2020-06-30 17:01:21 +01:00
Andy Wilkinson
75fc140e2d Merge branch '2.2.x' into 2.3.x
Closes gh-22167
2020-06-30 14:09:57 +01:00
Andy Wilkinson
3922fb7164 Polish "Avoid NPE when binder is closed before started event"
See gh-22141
2020-06-30 13:26:30 +01:00
im47cn
b34c268547 Avoid NPE when binder is closed before started event
Previously, if TomcatMetricsBinder destroy() was called before it had
received an ApplicationStartedEvent an NPE would be thrown due to
TomcatMetrics being null. This NPE was then caught and logged at
warning level by the disposable bean adapter.

This prevents the NPE by checking that the TomcatMetrics instance is
null before calling close() on it.

See gh-22141
2020-06-30 13:23:58 +01:00
Andy Wilkinson
f86831da9c Use TCCL at time of access for resource loading
Fixes gh-22119
2020-06-30 10:51:13 +01:00
Madhura Bhave
f19f2b8714 Merge branch '2.2.x' into 2.3.x
Closes gh-22155
2020-06-29 17:08:37 -07:00
May
c1b9d3c226 Simplify logic in ErrorPage's equals method
See gh-22082
2020-06-29 17:06:49 -07:00
Johnny Lim
43aee1bddd Polish
See gh-22090
2020-06-29 16:35:23 -07:00
Madhura Bhave
62f5e44324 Fix typo 2020-06-29 16:29:09 -07:00
Madhura Bhave
7a81cea513 Update layers.idx file example in docs
Fixes gh-21510
2020-06-29 16:25:23 -07:00
Scott Frederick
9a083584b8 Improve validation of layertools input
This commit improves the validation performed on the user
input provided to the layertools jarmode to provide more
clear error messages when the input is not correct and
reduce the chance of ambiguity.

Fixes gh-22042
2020-06-26 11:51:07 -05:00