Commit Graph

27280 Commits (a056eb475a16ad6718d6ab073efd4300b42cdf44)
 

Author SHA1 Message Date
Andy Wilkinson 0566c29e34 Merge pull request #22112 from dreis2211
* gh-22112:
  Cleanup temporary files after Maven plugin execution

Closes gh-22112
4 years ago
dreis2211 021d9b59cb Cleanup temporary files after Maven plugin execution
See gh-22112
4 years ago
Andy Wilkinson 9dea67f78f Merge pull request #22294 from dreis2211
* gh-22294:
  Reduce started threads in OnClassCondition

Closes gh-22294
4 years ago
dreis2211 60e7146326 Reduce started threads in OnClassCondition
Prior to this commit, OnClassCondition started a thread even if the number of
passed autoconfiguration class candidates never exceeded 1. This commit only
starts a thread if there is actually work to split in half.

See gh-22294
4 years ago
Andy Wilkinson 196d20537a Merge branch '2.2.x' into 2.3.x
Closes gh-22325
4 years ago
Andy Wilkinson 9558779dd4 Replace ConfigurationPropertiesBeanDefinitionValidator with a FailureAnalyzer
Previously, regular bean definitions for configuration properties classes
that attempt to use constructor binding were detected in a bean factory
post-processor, ConfigurationPropertiesBeanDefinitionValidator. This
validation examined every standard bean definition and failed if it
encountered one for a class that should have used constructor binding.
There were two downsides to this approach:

1. Reflection used to identify if the bean should be using constructor
   binding triggered class loading that could prevent subsequent
   instrumentation by a load-time weaver.
2. The cost of the validation was incurred when there was no
   misconfiguration to report.

This commit replaces ConfigurationPropertiesBeanDefinitionValidator
with a failure analyzer. This failure analyzer only runs once a failure
has occurred and the application context is not going to complete
refresh. This avoids causing problems with subsequent instrumentation
and also avoids the cost of validation and error reporting unless there
is an error.

Fixes gh-20798
4 years ago
Andy Wilkinson f52cdf10b3 Update WebServerInitEvent docs to reflect ordering w.r.t. refresh
Closes gh-22277
4 years ago
Andy Wilkinson f18b657ff9 Fix handling of DOCKER_HOST that begins with unix://
Fixes gh-22300
4 years ago
Andy Wilkinson 794ded5286 Test the Gradle plugin against Gradle 6.5.1
Closes gh-22292
4 years ago
Andy Wilkinson c963720aee Upgrade to Gradle 6.4.1
Closes gh-22290
4 years ago
Andy Wilkinson be8cd9e867 Extend DefaultTask rather than AbstractTask in buildSrc
Closes gh-22288
4 years ago
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
4 years ago
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
4 years ago
Andy Wilkinson c765df6e5d Merge branch '2.2.x' into 2.3.x
Closes gh-22282
4 years ago
Andy Wilkinson afa5b12bdb Make reactive Jetty auto-config back off without jetty-servlet
Fixes gh-22275
4 years ago
Andy Wilkinson 888bea5224 Merge branch '2.2.x' into 2.3.x
Closes gh-22268
4 years ago
Andy Wilkinson efad6c16d1 Merge branch '2.1.x' into 2.2.x
Closes gh-22269
4 years ago
Andy Wilkinson 9800804b65 Upgrade CI images to use ubuntu:bionic-20200630
Closes gh-22271
4 years ago
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
4 years ago
Andy Wilkinson d84aeef529 Merge branch '2.2.x' into 2.3.x
Closes gh-22264
4 years ago
Andy Wilkinson 66987533d1 Link to application properties section from externalized config list
Closes gh-22262
4 years ago
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
4 years ago
Andy Wilkinson 1b85ce0769 Streamline OAuth2 resource server auto-config class conditions
Fixes gh-22233
4 years ago
Andy Wilkinson b8bc219b25 Merge branch '2.2.x' into 2.3.x
Closes gh-22251
4 years ago
Andy Wilkinson 4e79bb1cff Disable bean method proxying in SpringBootJdbcConfiguration
Closes gh-22231
4 years ago
Andy Wilkinson da319f5f59 Merge branch '2.2.x' into 2.3.x
Closes gh-22249
4 years ago
Andy Wilkinson 14f24dbecc Merge branch '2.1.x' into 2.2.x
Closes gh-22248
4 years ago
Andy Wilkinson 26f591264c Fix handling of NestedServletException with no root cause
Fixes gh-22169
4 years ago
Andy Wilkinson 24e1a1dddf Merge branch '2.2.x' into 2.3.x
Closes gh-22246
4 years ago
Andy Wilkinson 1ad66cf92b Merge pull request #22207 from Sineaggi
* gh-22207:
  Polish "Rename NoneOfNestedConditions to NoneNestedConditions in example docs"
  Rename NoneOfNestedConditions to NoneNestedConditions in example docs

Closes gh-22207
4 years ago
Andy Wilkinson a8d3f9af31 Polish "Rename NoneOfNestedConditions to NoneNestedConditions in example docs"
See gh-22207
4 years ago
Clayton Walker 7fee70a625 Rename NoneOfNestedConditions to NoneNestedConditions in example docs
See gh-22207
4 years ago
Andy Wilkinson 96e6b74894 Merge branch '2.2.x' into 2.3.x
Closes gh-22243
4 years ago
Andy Wilkinson ae043285d8 Merge pull request #22214 from XenoAmess
* gh-22214:
  Polish "Fix unwrapping of captured PrintStream in test support's OutputCapture"
  Fix unwrapping of captured PrintStream in test support's OutputCapture

Closes gh-22214
4 years ago
Andy Wilkinson a0f1424393 Polish "Fix unwrapping of captured PrintStream in test support's OutputCapture"
See gh-22214
4 years ago
XenoAmess 75a64bd901 Fix unwrapping of captured PrintStream in test support's OutputCapture
See gh-22214
4 years ago
Andy Wilkinson 28128a9577 Add support for ChronoUnit.WEEKS when using PeriodUnit
Fixes gh-22225
4 years ago
Andy Wilkinson d1f074858e Correct class name of StringToPeriodConverterTests 4 years ago
Andy Wilkinson 2007490ce7 Merge branch '2.2.x' into 2.3.x
Closes gh-22234
4 years ago
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
4 years ago
Andy Wilkinson 40fc90e343 Merge pull request #22227 from anshlykov
* gh-22227:
  Update to Maven Shade Plugin 3.2.4

Closes gh-22227
4 years ago
anshlykov 683a7a851f Update to Maven Shade Plugin 3.2.4
See gh-22227
4 years ago
Andy Wilkinson dfea2f432a Polish
See gh-21921
4 years ago
Brian Clozel 86d8366ee2 Polish support for reactive Elasticsearch healthcheck
Fixes gh-21042
4 years ago
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
4 years ago
Andy Wilkinson 79770b9615 Use source sets to determine configurations deprecated for resolution
Fixes gh-22200
4 years ago
Andy Wilkinson f6b3666b16 Merge branch '2.2.x' into 2.3.x
Closes gh-22197
4 years ago
Andy Wilkinson 21453b5016 Ignore scoped targets when finding matching beans
Fixes gh-22038
4 years ago
Andy Wilkinson 81d6751ba7 Use ApplicationContextRunner in ConditionalOnSingleCandidateTests 4 years ago
Andy Wilkinson f0b78fb3c4 Merge branch '2.2.x' into 2.3.x
Closes gh-22190
4 years ago