Commit Graph

8583 Commits

Author SHA1 Message Date
Shraddha Yeole 2d76de29ff Do not fail if h2Console bean cannot connect to db
See gh-23566
2020-10-01 18:10:48 -07:00
Madhura Bhave 3118ca9313 Polish 2020-10-01 18:01:11 -07:00
ketaki-t 66aa24b5f0 Remove documentation for unsupported gradle versions
See gh-23562
2020-10-01 17:13:26 -07:00
Andy Wilkinson 323af718e2 Only change the method of requests that Jetty won't handle by default
Previously, JettyEmbeddedErrorHandler would change the method of every
request that is handles to GET. This was being done to work around
Jetty's error handling only dealing with GET, POST, and HEAD requests
by default. It had the unwanted side-effect of causing an error
response to a HEAD request having a body as, from the error handling's
perspective, it was a GET request.

This commit updates JettyEmbeddedErrorHandler to only set the method
on a request for which error handling is being performed if the method
isn't already one that will be handled, leaving the method of GET,
POST, and HEAD requests unchanged.

Unfortunately, short of implementing an HTTP client, this change cannot
be tested as the Apache HttpClient, OkHttp, and the JDK's
HttpURLConnection all silently drop the body of a response to a HEAD
request, preventing a test from asserting that a body hasn't been sent.

Closes gh-23551
2020-10-01 12:29:44 +01:00
Stephane Nicoll fd3683646a Migrate SessionAutoConfigurationMongoTests to Testcontainers
Closes gh-23512
2020-09-29 10:34:59 +02:00
Rujun Chen 8330752b11 Add mising entry for Netty tcnative dependency management
See gh-23502
2020-09-28 09:18:44 +02:00
Andy Wilkinson e74f777971 Remove use of spring-core's Assert from PropertiesLauncher
Fixes gh-23474
2020-09-26 09:11:05 +01:00
Andy Wilkinson 6dc8e6815d Align default tldScanPatterns with Tomcat's
Previously, we configured embedded Tomcat in such a way that no TLD
scan patterns were configured. This differed from a standalone
Tomcat installation where 4 patterns are configured that take
precedence over some of the skip patterns. The missing scan patterns
resulted in the skip patterns preventing the discovery of Log4j2's
TLDs.

This commit updates TomcatServletWebServerFactory to configure the
same four scan patterns as standalone Tomcat configures by default.

Fixes gh-23302
2020-09-24 17:51:38 +01:00
Andy Wilkinson bf9d23e55a Consider SpringBootTest's web environment in context cache key
Previously, the web environment configured on `@SpringBootTest` was not
part of the context cache key. As a result, two test classes that has
identical configuration other than one using a MOCK web environment and
the other using a DEFINED_PORT web environment would share a context
when they should not do so. Classes that use MOCK and RANDOM_PORT were
not affected as the use of RANDOM_PORT results in a property for the
port being added to the environment.

This commit adds a new ContextCustomizer, SpringBootTestWebEnvironment,
that is used to capture the `webEnvironment` from `@SpringBootTest`
and use it in its hashCode and equals implementations. This fixes the
problem as all context customizers are evaluated when determing the
equality of two context cache keys.

Fixes gh-23085
2020-09-24 14:43:51 +01:00
Pavel Gordon 62eb835a4e Fix link to Log4j's JDK Logging Adapter in reference documentation
See gh-23459
2020-09-23 14:36:00 +02:00
Andy Wilkinson 24102656f2 Fix Log4j2 XML configuration tests on Windows
See gh-22983
2020-09-22 16:03:58 +01:00
Stephane Nicoll 2999f09a40 Rework tip on templates location in the IDE
This commit rework the tip on locating templates when running the app
in the IDE. Using classpath* should not change anything as this won't
make a difference without a pattern in the path.

Closes gh-23068
2020-09-22 16:44:16 +02:00
Stephane Nicoll 7f84a92ef1 Document that Java 15 is supported
Closes gh-23447
2020-09-22 15:19:47 +02:00
dreis2211 fba1fb23e4 Fix multi-release JAR test on JDK 15
Backport of 54f93e9

See gh-23445
2020-09-22 10:09:18 +02:00
Phillip Webb b443d22c59 Merge branch '2.1.x' into 2.2.x
Closes gh-23443
2020-09-21 23:19:41 -07:00
Phillip Webb cc442c5c0d Make HandlerFunctionDescription JDK 15 compatible
Update `HandlerFunctionDescription` so that it will work with JDK 15.

Closes gh-23442
2020-09-21 23:18:02 -07:00
Phillip Webb 4945806d84 Make `StringSequence.isEmpty()` public
Make `StringSequence.isEmpty()` public for compatibility with JDK 15.

Closes gh-23440
2020-09-21 22:26:20 -07:00
Andy Wilkinson 0edf7cb9b9 Polish Log4j2 XML configuration tests
See gh-22983
2020-09-21 19:26:40 +01:00
Andy Wilkinson f6492cd0c0 Consume level and dateformat patterns as system props in Log4j config
Previously LOG_LEVEL_PATTERN and LOG_DATEFORMAT_PATTERN were not
consumed as system properties in log4j2.xml and log4j2-file.xml. As a
result, the logging.pattern.level and logging.pattern.dateformat
configuration properties, which are translated into the
LOG_LEVEL_PATTERN and LOG_DATEFORMAT_PATTERN system properties
respectively had no effect.

This commit updates the log4j2.xml and log4j2-file.xml config files to
consume LOG_LEVEL_PATTERN and LOG_DATEFORMAT_PATTERN as system
properties. When the system property is not set, the configuation falls
back to the default values specified in the config files. Tests for
both log4j2.xml and log4j2-file.xml to verify the behaviour have also
bean added.

Fixes gh-22983
2020-09-21 15:08:41 +01:00
Andy Wilkinson 581190d7a0 Test the Gradle plugin against 6.7-rc-1
Closes gh-23425
2020-09-21 12:14:35 +01:00
Andy Wilkinson 360e29af48 Polish "Add note about Kotlin main class name"
See gh-23418
2020-09-21 10:40:29 +01:00
Sebastiaan Fernandez 0bde5fda9b Add note about Kotlin main class name
See gh-23418
2020-09-21 10:36:16 +01:00
Andy Wilkinson 95f26c6358 Configure Flyway with initSqls for any DataSource configuration
Previously, spring.flyway.init-sqls was only applied to Flyway's
configuration if Flyway was being configured to create the DataSource.
If Flyway was being configured to use an existing DataSource, init-sqls
was not applied. This is a hangover from when the init SQLs support was
introduced. At that time, Flyway only supported SQL to initialize the
connection when it was creating the DataSource. Flyway 5.2 added init
SQL support no matter how Flyway's DataSource was configured.

This commit updates FlywayAutoConfiguration to always apply the
init-sqls property to Flyway's configuration. The property's
documentation does not describe the current limitation so this change
should align the behaviour with what the documentation leads people to
expect.

Fixes gh-23392
2020-09-18 13:03:24 +01:00
Andy Wilkinson 5ec673ff2a Add anchors to section headers in Gradle plugin docs
Fixes gh-23402
2020-09-18 09:06:54 +01:00
Stephane Nicoll ab2115633f Upgrade to Micrometer 1.3.14
Closes gh-23388
2020-09-17 08:46:30 +02:00
Stephane Nicoll 35b33303d0 Upgrade to Spring Session Corn-SR4
Closes gh-23186
2020-09-17 08:45:52 +02:00
Stephane Nicoll 91c1d52fc1 Upgrade to Micrometer 1.1.18
Closes gh-23384
2020-09-17 07:40:59 +02:00
Stephane Nicoll db04672403 Upgrade to Spring Session Bean-SR12
Closes gh-23185
2020-09-17 07:37:14 +02:00
Stephane Nicoll e5d135c61c Upgrade to Spring Kafka 2.3.11
Closes gh-23198
2020-09-17 07:23:41 +02:00
Andy Wilkinson d3d96f0417 Upgrade to Spring REST Docs 2.0.5.RELEASE
Closes gh-23374
2020-09-16 17:45:34 +01:00
Andy Wilkinson e87e52d035 Merge branch '2.1.x' into 2.2.x
Closes gh-23375
2020-09-16 17:38:02 +01:00
Andy Wilkinson 106968a115 Upgrade to Spring REST Docs 2.0.5.RELEASE
Closes gh-23374
2020-09-16 17:36:34 +01:00
Stephane Nicoll 9ab8ad6e74 Upgrade to Spring AMQP 2.2.11
Closes gh-23372
2020-09-16 18:23:06 +02:00
Stephane Nicoll 9a09a3c570 Upgrade to Spring AMQP 2.1.17
Closes gh-23371
2020-09-16 18:20:34 +02:00
Stephane Nicoll bac5a7909e Upgrade to Spring Data Moore-SR10
Closes gh-23195
2020-09-16 15:44:25 +02:00
Stephane Nicoll b1e47811af Upgrade to Spring Data Lovelace-SR20
Closes gh-23194
2020-09-16 15:40:09 +02:00
Stephane Nicoll d7a5d44a75 Upgrade to Spring Ws 3.0.10.RELEASE
Closes gh-23336
2020-09-16 10:02:17 +02:00
Stephane Nicoll d5aeb828e6 Upgrade to Neo4j Ogm 3.2.16
Closes gh-23335
2020-09-16 10:02:15 +02:00
Stephane Nicoll 3f520f18d7 Upgrade to Tomcat 9.0.38
Closes gh-23334
2020-09-16 10:02:14 +02:00
Stephane Nicoll 297735a7e7 Upgrade to Spring Ws 3.0.10.RELEASE
Closes gh-23333
2020-09-16 09:56:25 +02:00
Stephane Nicoll b37d79a07e Upgrade to Neo4j Ogm 3.1.22
Closes gh-23332
2020-09-16 09:56:24 +02:00
Stephane Nicoll 9f3b3504ef Upgrade to Tomcat 9.0.38
Closes gh-23331
2020-09-16 09:56:22 +02:00
Phillip Webb bd87ba33d0 Use ephemeral ports for RSocket tests
Closes gh-23325
2020-09-16 00:15:19 -07:00
Phillip Webb 195def0ec3 Merge branch '2.1.x' into 2.2.x 2020-09-15 08:48:00 -07:00
Phillip Webb e0030094e2 Fix missing jar entry certificates
Ensure that the source jar entry is closed before reading
certificates and code signers from the entry.

gh-19041
2020-09-15 08:42:58 -07:00
Andy Wilkinson 5a266155b0 Disable proxyBeanMethods on Spring Session config sub-classes
Closes gh-23280
2020-09-15 16:32:15 +01:00
Stephane Nicoll 95a33071ca Upgrade to Spring Framework 5.2.9
Closes gh-23182
2020-09-15 13:48:02 +02:00
Stephane Nicoll d73ee9d545 Upgrade to Spring Framework 5.1.18
Closes gh-23181
2020-09-15 13:45:51 +02:00
Andy Wilkinson 5d20660c8a Disable proxyBeanMethods on all management context config classes
Fixes gh-23301
2020-09-15 12:30:32 +01:00
Stephane Nicoll bc9c6dc005 Upgrade to Reactor Dysprosium-SR12
Closes gh-23191
2020-09-15 08:46:17 +02:00
Stephane Nicoll a5905c5cb9 Upgrade to Reactor Californium-SR21
Closes gh-23190
2020-09-15 08:42:35 +02:00
Phillip Webb b8e6b2ef94 Merge branch '2.1.x' into 2.2.x 2020-09-14 13:51:24 -07:00
Phillip Webb 4138e59c33 Fix potential JarFileEntries ClassCastException
Update `JarFileEntries` so that the interface is obtained rather than
the concrete implementation. This allows `JarEntry` values to be used
without causing a ClassCastException.

Closes gh-19041
2020-09-14 13:48:59 -07:00
Stephane Nicoll c5532cfac0 Upgrade to Spring Security 5.2.6.RELEASE
Closes gh-23299
2020-09-14 13:38:05 +02:00
Stephane Nicoll 4da461cf85 Upgrade to Spring Amqp 2.2.10.RELEASE
Closes gh-23298
2020-09-14 13:38:05 +02:00
Stephane Nicoll 1862eb4455 Upgrade to Postgresql 42.2.16
Closes gh-23297
2020-09-14 13:38:05 +02:00
Stephane Nicoll 0edd00c9d7 Upgrade to Neo4j Ogm 3.2.15
Closes gh-23296
2020-09-14 13:38:05 +02:00
Stephane Nicoll de38777397 Upgrade to Infinispan 9.4.20.Final
Closes gh-23295
2020-09-14 13:38:04 +02:00
Stephane Nicoll bf02b86f60 Upgrade to Hibernate 5.4.21.Final
Closes gh-23294
2020-09-14 13:38:04 +02:00
Stephane Nicoll 12d0835da0 Upgrade to Elasticsearch 6.8.12
Closes gh-23293
2020-09-14 13:38:04 +02:00
Stephane Nicoll 53ba03bdec Upgrade to Jetty 9.4.31.v20200723
Closes gh-23292
2020-09-14 13:38:04 +02:00
Stephane Nicoll 4125e5fc8f Upgrade to Byte Buddy 1.10.14
Closes gh-23291
2020-09-14 13:38:04 +02:00
Stephane Nicoll 0d12683a93 Upgrade to Undertow 2.0.31.Final
Closes gh-23290
2020-09-14 13:38:04 +02:00
Stephane Nicoll 67f3c3193d Upgrade to Rsocket 1.0.2
Closes gh-23289
2020-09-14 13:38:03 +02:00
Stephane Nicoll 1a676b154e Upgrade to Netty Tcnative 2.0.34.Final
Closes gh-23288
2020-09-14 13:38:03 +02:00
Stephane Nicoll f4a84d3b63 Upgrade to Netty 4.1.52.Final
Closes gh-23287
2020-09-14 13:37:57 +02:00
Stephane Nicoll a9f1441fcc Upgrade to Micrometer 1.3.12
Closes gh-23286
2020-09-14 13:12:09 +02:00
Stephane Nicoll 87fdccf4a0 Upgrade to Dropwizard Metrics 4.1.12.1
Closes gh-23285
2020-09-14 13:12:07 +02:00
Stephane Nicoll da9505cf01 Upgrade to Hazelcast 3.12.9
Closes gh-23284
2020-09-14 13:12:05 +02:00
Stephane Nicoll 5ce3aaefb2 Upgrade to Appengine Sdk 1.9.82
Closes gh-23283
2020-09-14 13:12:03 +02:00
Stephane Nicoll 492e1a4c0f Upgrade to Netty 4.1.52.Final
Closes gh-23269
2020-09-14 11:28:55 +02:00
Stephane Nicoll 3bd4337a4e Upgrade to Spring Security 5.1.12.RELEASE
Closes gh-23278
2020-09-14 10:41:44 +02:00
Stephane Nicoll 72a5b2353d Upgrade to Postgresql 42.2.16
Closes gh-23277
2020-09-14 10:41:43 +02:00
Stephane Nicoll 5c3947c64b Upgrade to Neo4j Ogm 3.1.21
Closes gh-23276
2020-09-14 10:41:40 +02:00
Stephane Nicoll c723b4e705 Upgrade to Infinispan 9.4.20.Final
Closes gh-23275
2020-09-14 10:41:25 +02:00
Stephane Nicoll 738613b889 Upgrade to Hibernate 5.3.18.Final
Closes gh-23274
2020-09-14 10:41:25 +02:00
Stephane Nicoll c608f4425d Upgrade to Jetty 9.4.31.v20200723
Closes gh-23273
2020-09-14 10:41:25 +02:00
Stephane Nicoll 9f0befbcb8 Upgrade to Undertow 2.0.31.Final
Closes gh-23272
2020-09-14 10:41:25 +02:00
Stephane Nicoll 78c1e105ee Upgrade to Dependency Management Plugin 1.0.10.RELEASE
Closes gh-23271
2020-09-14 10:41:24 +02:00
Stephane Nicoll 6d99776d9d Upgrade to Netty Tcnative 2.0.34.Final
Closes gh-23270
2020-09-14 10:41:20 +02:00
Stephane Nicoll e5a9a7ae83 Upgrade to Micrometer 1.1.17
Closes gh-23268
2020-09-14 09:47:49 +02:00
Stephane Nicoll fb935ecb8d Upgrade to Appengine Sdk 1.9.82
Closes gh-23267
2020-09-14 09:47:48 +02:00
Stephane Nicoll 76fd9a530c Upgrade to Jackson 2.9.10.20200824
Closes gh-23266
2020-09-14 09:47:47 +02:00
Phillip Webb a20fdf8e6a Merge branch '2.1.x' into 2.2.x
Closes gh-23263
2020-09-13 22:45:39 -07:00
Phillip Webb 895ff9c72d Merge pull request #19041 from mathieufortin01
* pr/19041:
  Polish 'Fix signed jar performance issues'
  Fix signed jar performance issues
  Ignore Visual Studio Code Files

Closes gh-19041
2020-09-13 22:40:05 -07:00
Phillip Webb c6a9696dd1 Polish 'Fix signed jar performance issues'
Update the performance improvements to push certificate loading
and storage into the `JarFileEntries` class. This allows us to
keep certificates without needing to cache all entry data. We
now also keep certificates and code signers in a dedicated class
which is set whenever the full jar stream as been read, even if
the contained values are `null`. The logic that assumes META-INF
entries are not signed has been removed in favor of delegating to
the streamed entry results.

See gh-19041
2020-09-13 22:28:45 -07:00
mathieufortin01 4d053e15d8 Fix signed jar performance issues
Update Spring Boot nested JarFile support to improve the performance of
signed jars. Prior to this commit, `certificates` and `codeSigners`
were read by streaming the entire jar whenever the existing values
were `null`. Unfortunately, the contract for `getCertificates` and
get `getCodeSigners` states that `null` is a valid return value. This
meant that full jar streaming would occur whenever either method was
called on an entry that had no result. The problem was further
exacerbated by the fact that entries might not be cached.

See gh-19041
2020-09-13 22:14:03 -07:00
Phillip Webb 326a56da01 Support validation of bound map key entries
Update `ValidationBindHandler` so that pushed fields that reference
map keys can be used. This fixes a regression that was introduced in
commit 4483f417 when we switched to a `AbstractBindingResult` that no
longer required public getters/setters.

Closes gh-20350
2020-09-13 10:54:30 -07:00
Phillip Webb d8232b3c21 Polish 'Allow other "timestamp" types in MVC error model'
See gh-23256
2020-09-11 18:44:04 -07:00
lock14 d1d953819a Allow other "timestamp" types in MVC error model
Remove casting "timestamp" to `java.util.Date` in
`ErrorMvcAutoConfiguration` as the cast is not necessary and it
prevents other types (e.g. `java.time`) from being used.

See gh-23256
2020-09-11 18:11:47 -07:00
David Good 775f0fa861 Improve sanitization for list of URI types
Prior to this commit, Actuator would sanitize properties values when
serializing them on the dedicated endpoint. Keys like "password" or
"secret" are entirely sanitized, but other keys like "uri" or "address"
are considered as URI types and only the password part of the user info
is sanitized.

This commit fixes the sanitization process where lists of such URI types
would not match the first entries of the list since they're starting
with `'['`. This commit improves the regexp matching process to sanitize
all URIs within a collection.

The documentation is also updated to better underline the processing
difference between complete sanitization and selective sanitization for
URIs.

Fixes gh-23037
2020-09-11 11:34:38 +02:00
Andy Wilkinson e4691a4c61 Document that sliced tests don't scan @ConfigurationProperties beans
Closes gh-23210
2020-09-10 11:14:28 +01:00
Stephane Nicoll ba7a103588 Start building against Spring Kafka 2.3.11 snapshots
See gh-23198
2020-09-07 15:24:02 +02:00
Stephane Nicoll 3b4f541b44 Start building against Spring Session Corn-SR4 snapshots
See gh-23186
2020-09-07 15:23:21 +02:00
Stephane Nicoll a8c36b7659 Start building against Spring Data Moore-SR10 snapshots
See gh-23195
2020-09-07 15:22:43 +02:00
Stephane Nicoll e3635c4848 Start building against Reactor Dysprosium-SR11 snapshots
See gh-23191
2020-09-07 15:21:51 +02:00
Andy Wilkinson 5f00d91176 Restore identifying org.hsqldb.jdbcDriver as embedded
See gh-23036
2020-09-07 14:03:10 +01:00
Stephane Nicoll b3960cae86 Start building against Spring Data Bean-SR12 snapshots
See gh-23185
2020-09-07 14:38:50 +02:00
Stephane Nicoll d2a6035914 Start building against Spring Data Lovelace-SR20 snapshots
See gh-23194
2020-09-07 14:38:25 +02:00
Stephane Nicoll e35cf5219a Start building against Reactor Californium-SR21 snapshots
See gh-23190
2020-09-07 14:38:18 +02:00
Stephane Nicoll 88e0c280ce Start building against Spring Framework 5.0.19 snapshots
See gh-23181
2020-09-07 14:36:01 +02:00
Andy Wilkinson 115ea87b14 Restore ordering of ErrorPageFilter lost in 49f8943
See gh-19471
2020-09-07 13:33:43 +01:00
Andy Wilkinson c948c70c5a Align EmbeddedDatabaseConnection with DatabaseDriver
Fixes gh-23036
2020-09-07 10:13:55 +01:00
Stephane Nicoll 4b5a3f4ff9 Start building against Spring Framework 5.2.9 snapshots
See gh-23182
2020-09-07 08:47:57 +02:00
Phillip Webb 611447c4d5 Fix checkstyle issue caused by polish commit
See gh-22946
2020-08-28 15:30:27 -07:00
Phillip Webb 35994b061c Polish 'Remove ResourceUtils.getURL logging config check'
Extend `initializeSystem` to search the exception stack for a
FileNotFoundException before reporting the error. This allows
us to provide a similar stack trace to the one that used to be
thrown when we had the `ResourceUtils.getURL` check.

See gh-22946
2020-08-28 15:16:12 -07:00
Ralph Goers 684b65e80c Remove ResourceUtils.getURL logging config check
Remove `ResourceUtils.getURL` checking from `LoggingApplicationListener`
so that logging systems can implement custom location support.

Prior to this commit, we checked in the listener if the specified config
location could be opened as a URL. This unfortunately prevents Log4J
extensions such as `log4j-spring-cloud-config-client` from implementing
configurable SSL and credentials support.

See gh-22946
2020-08-28 15:07:06 -07:00
Andy Wilkinson 627ede8bff Remove duplicate jackson-datatype-jsr310 dependency
Closes gh-23123
2020-08-28 12:38:42 +01:00
Andy Wilkinson 5cd910c7ce Replace Embedded Mongo with Testcontainers' MongoDB support
Closes gh-23090
2020-08-28 12:00:31 +01:00
Andy Wilkinson 84a12c8436 Upgrade to Testcontainers 1.14.3
Closes gh-23122
2020-08-28 11:57:32 +01:00
Andy Wilkinson 04540887af Widen timeout and delay to accommodate Windows' imprecision under load
Closes gh-23093
2020-08-26 14:48:33 +01:00
Andy Wilkinson 6f047c8356 Polish "Handle null RSocketServer address when setting port property"
See gh-23084
2020-08-26 08:52:57 +01:00
spencergibb f08f948c3e Handle null RSocketServer address when setting port property
See gh-23084
2020-08-26 08:52:57 +01:00
Andy Wilkinson b57b2f0b44 Test the Gradle Plugin against 6.5 and 6.6
Closes gh-23075
2020-08-25 12:01:25 +01:00
Stephane Nicoll 5b0f22e8fe Fix unintended import on commons lang
Closes gh-23059
2020-08-24 12:12:33 +02:00
Stephane Nicoll f1455b156a Polish "Add example of custom Actuator operations"
See gh-23028
2020-08-24 11:56:31 +02:00
Ivo Smid e8de069e00 Add example of custom Actuator operations
See gh-23028
2020-08-24 11:37:00 +02:00
Phillip Webb 17e2d72bcb Fix Windows path issue in JarFileWrapperTests
See gh-22991
2020-08-19 10:33:23 -07:00
Phillip Webb 3fe2005e06 Use @AfterEach to close the source jar file
Update `JarFileWrapperTests` so that the jar files are closed after each
test.

See gh-22991
2020-08-19 10:22:10 -07:00
dreis2211 06eb7e9777 Mention correct JUnit 5 annotations in Kotlin testing section
See gh-23002
2020-08-19 10:07:40 +02:00
Phillip Webb 2a137a2d8a Remove Mockito from JarFileWrapperTests
Remove Mockto from JarFileWrapperTests since it seems to be failing on
later versions of Java.

See gh-22991
2020-08-18 16:20:05 -07:00
Phillip Webb 4e76138ebc Update copyright year of changed files 2020-08-18 15:37:59 -07:00
Phillip Webb 5997cbd21f Refine AbstractJarFile method visibility
Refine method visibility in an attempt to fix test issues on Java 11+.

See gh-22991
2020-08-18 15:37:37 -07:00
Phillip Webb aac367e9c5 Attempt to fix memory leak in JarFile class
Create a new `JarFileWrapper` class so that we can wrap and existing
`JarFile` and offer a version that can be safely closed.

Prior to this commit, we provided wrapper functionality in the `JarFile`
class itself. Unfortunately, because we override `close` and also create
a lot of wrappers this caused memory issues when running on Java 11.

With Java 11 `java.util.zip.ZipFile` class uses `FinalizableResource`
for any implementation that overrides `close()`. This means that any
wrapper classes will not be garbage collected until the JVM finalizer
thread runs.

Closes gh-22991
2020-08-18 14:07:03 -07:00
Phillip Webb 10da595302 Polish 'Order metrics auto-configurations correctly'
See gh-21134
2020-08-17 16:10:18 -07:00
Martin Benda 02b7ec787e Order metrics auto-configurations correctly
Update metrics auto-configurations so that they are auto-configured
after `CompositeMeterRegistryAutoConfiguration` in order to ensure
the `MeterRegistry` bean has been defined.

Prior to this commit, metrics auto-configurations that depended on a
`MeterRegistry` has `@AutoConfigureAfter(MetricsAutoConfiguration.class)`
which is not sufficient since `MetricsAutoConfiguration` does not export
a `MeterRegistry`.

See gh-21134
2020-08-17 16:03:27 -07:00
Phillip Webb 3271542d98 Add @Interited to @TypeExcludeFilters
Update `@TypeExcludeFilters` so that it is also annotated with
`@Inherited`.

Closes gh-22939
2020-08-14 17:12:31 -07:00
Phillip Webb 89a6f83344 Fix and improve SpringApplicationBuilder javadoc
Update SpringApplicationBuilder.properties method javadoc to fix
inaccuracies and apply more consistency.

Closes gh-22962
2020-08-14 17:06:39 -07:00
Phillip Webb 3e939cbabd Polish method order 2020-08-14 17:02:13 -07:00
Maciej Walkowiak 15de956566 Fix typo `Assert4J` -> `AssertJ`
See gh-22948
2020-08-14 15:09:56 -07:00
Stephane Nicoll f61a632a37 Polish "Fix conditions that lead to auto-configure PushGateway"
See gh-22919
2020-08-13 11:47:43 +02:00
smlc c355b95f6c Fix conditions that lead to auto-configure PushGateway
See gh-22919
2020-08-13 11:41:49 +02:00
Johnny Lim 68e2dd626d Mention configuration customizers for WebTestClient and RestAssured
See gh-22765
2020-08-12 13:13:11 +01:00
Stephane Nicoll ee2363fca7 Polish "Harmonize Discover the HTTP Port at Runtime How-To"
See gh-22898
2020-08-12 09:50:44 +02:00
John Franco 303768b2b5 Harmonize Discover the HTTP Port at Runtime How-To
See gh-22898
2020-08-12 09:48:57 +02:00
Madhura Bhave cdbb7f441a Do not ignore null/empty values from SPRING_APPLICATION_JSON
Fixes gh-21542
2020-08-11 12:22:08 -07:00
Stephane Nicoll ccffd50285 Document the limitation of default value detection
Closes gh-22685
2020-08-11 16:51:00 +02:00
Stephane Nicoll 64a5aa9340 Polish 2020-08-11 16:41:47 +02:00
Andy Wilkinson b2c0c958c9 Upgrade to Dependency Management Plugin 1.0.10.RELEASE
Closes gh-22615
2020-08-11 12:14:24 +01:00
Stephane Nicoll dd9c9fd171 Polish "Migrate legacy endpoint that have a dash in their id"
See gh-21615
2020-08-10 14:53:18 +02:00
Gabriele Bianchet-David 0f9f10f97e Migrate legacy endpoint that have a dash in their id
See gh-21615
2020-08-10 14:42:46 +02:00
Stephane Nicoll 8962d6ca21 Polish 2020-08-10 14:31:16 +02:00
Stephane Nicoll 333af3d4e7 Polish "Propagate the cause that led Reactor"s debug agent to fail"
See gh-22777
2020-08-10 14:21:44 +02:00
davidbilge 12c419054a Propagate the cause that led Reactor"s debug agent to fail
Prior to this commit, DebugAgentEnvironmentPostProcessor throws a
RuntimeException with a generic error message if its initialization
fails. The causing exception is discarded, which makes error analysis
unnecessarily difficult.

This commit attaches the cause to the newly thrown RuntimeException.

See gh-22777
2020-08-10 14:21:26 +02:00
Madhura Bhave f39f33bb8d Fix documentation related to the health endpoint's inner details
Closes gh-22490
2020-08-06 17:57:56 -07:00
Phillip Webb fdd6a89a61 Polish 2020-08-06 10:14:01 -07:00
Andy Wilkinson 07699ea6ff Retry when dependency resolution fails in ModifiedClassPathClassLoader
Closes gh-22763
2020-08-06 15:12:20 +01:00
Andy Wilkinson 63f7c75b61 Polish 2020-08-06 13:34:01 +01:00
Andy Wilkinson b53f54f2cf Add tip about using AopTestUtils.getTargetProxy with proxied spy beans
Closes gh-22281
2020-08-06 09:21:11 +01:00
Andy Wilkinson bfe250e5d3 Clarify docs on schema and data SQL scripts with Flyway and Liquibase
Closes gh-20920
2020-08-05 18:14:39 +01:00
Andy Wilkinson 71ffb44a3c Remove WebClient's in-memory buffer size limit for endpoint tests
Previously, the endpoints' responses could occasionally exceed
WebClient's in-memory buffer limt, for example if the threads endpoint
was reporting a large number of threads or the threads had large
stacks.

This commit disables WebClient's in-memory buffer size limit so that
the tests passing is not dependent on the size of the endpoints'
responses.

Closes gh-22743
2020-08-05 17:37:44 +01:00
Andy Wilkinson 2238b0d797 Try to make FileSystemWatcherTests.waitsForQuietPeriod() more robust
Previously, waitsForQuietPeriod would iterate 10 times, touching a new
file and then sleeping for 100ms at it did so. With a quiet period of
200ms, this was intended to result in a single change set containing
10 files. However, the test would fail occasionally as multiple change
sets were detected. The test is multi-threaded and is, therefore, at
the mercy of the scheduler. If the thread that is iterating and
touching the files takes over 200ms to be scheduled – exceeding the
watcher's quiet period – the watcher may detect a change set while the
changes are still being made. Eliminating this possibilty would require
the test to participate in the watcher's synchronization, which would
require some changes to its implementation. Instead, this commit
aims to avoid the problem by sleeping for 1/10 of the time (10ms) and
expecting a single change set of 100 files. The hope is that the much
shorter sleep time will result in the file touching thread being
scheduled well within the 200ms quiet period.

Closes gh-22732
2020-08-05 09:00:49 +01:00
Stephane Nicoll 4082cddce2 Merge branch '2.1.x' into 2.2.x
Closes gh-22705
2020-08-03 15:00:41 +02:00
Johnny Lim bd2874de49 Fix broken links to Micrometer registry docs
See gh-22704
2020-08-03 14:58:22 +02:00
Andy Wilkinson 59b1df4548 Polish "Look in correct context when finding Liquibase beans"
See gh-22681
2020-07-31 12:20:58 +01:00
biergit 62156810cf Look in correct context when finding Liquibase beans
See gh-22681
2020-07-31 12:20:09 +01:00
Andy Wilkinson 49f8943a5f Register ErrorPageFilter for async dispatch
Fixes gh-19471
2020-07-30 13:38:02 +01:00
Andy Wilkinson 22dc4e7608 Clarify documentation on @AutoConfigureRestDocs with WebTestClient
Closes gh-15977
2020-07-30 12:12:10 +01:00
Andy Wilkinson 1871cffc7d Document that constructor binding does not support @…Unit annotations
Closes gh-22565
2020-07-30 09:04:30 +01:00
Andy Wilkinson 72551242fd Allow XADataSource auto-config with no spring.datasource properties
Fixes gh-20229
2020-07-29 13:57:50 +01:00
Andy Wilkinson 5ea8bb0676 Recommend the use of a MeterBinder when a metric depends on a bean
Closes gh-19557
2020-07-28 18:26:38 +01:00
Stephane Nicoll 16aa8fbc88 Fix actuator dependency on Jackson JSR 310 module
This commit harmonizes dependency declarations for Jackson in the
actuator. Both Jackson and JSR 310 are back to optional in the core
actuator module and mandatory when using the auto-configuration.

Closes gh-22624
2020-07-28 16:26:11 +02:00
Andy Wilkinson 856c55b188 List DevTools in section overview of multi-page documentation
Closes gh-22591
2020-07-28 14:36:23 +01:00
dreis2211 c405b8b9c9 Fix link to Elasticsearch health indicator
See gh-22598
2020-07-28 13:21:09 +01:00
Andy Wilkinson ea5284ca91 Polish "Use milliseconds when configuring awaitTerminationPeriod"
See gh-22604
2020-07-28 09:03:57 +01:00
Tadaya Tsuyukubo 685a6116d1 Use milliseconds when configuring awaitTerminationPeriod
Prior to this change, TaskExecutorBuilder used seconds as its precision
to map the awaitTerminationPeriod value. This caused a loss of
millisecond information in the period.

This commit fixes the loss by converting the period to millisecond and
using setAwaitTerminationMillis to configure the executor.

See gh-22604
2020-07-28 09:01:55 +01:00
Andy Wilkinson d9b61c4aaa Update link to App Engine's Spring Boot sample
Closes gh-22607
2020-07-28 08:42:40 +01:00
Andy Wilkinson 0a01875d41 Improve documentation about swapping one technical starter for another
Closes gh-20408
2020-07-27 15:50:07 +01:00
Andy Wilkinson 812a0ed0c6 Define the reference doc authors in a single place
Closes gh-20896
2020-07-27 15:20:59 +01:00
Andy Wilkinson b631fa1405 Describe MongoClientSettingsBuilderCustomizer in the documentation
Closes gh-21696
2020-07-27 14:46:30 +01:00
Andy Wilkinson be428ef0f2 Document the need for configuration files to have a file extension
Closes gh-22278
2020-07-27 14:09:54 +01:00
Andy Wilkinson 1b48daf1d5 Do not ignore unknown fields when invalid fields are being ignored
Previously, ignoring invalid fields would cause the failure for an
unknown field to be ignored, irrespective of the ignoreUnknownFields
attribute on `@ConfigurationProperties`.

This commit updates the NoUnboundElementsBindHandler to ensure that
any UnboundConfigurationPropertiesException is thrown rather than
being ignored when the handler has been wrapped by an
IgnoreErrorsBindHandler.

Fixes gh-22308
2020-07-27 13:28:44 +01:00
Andy Wilkinson 41954533b2 Fix Mock|SpyBean context caching
The fix for gh-20916 updated DefinitionsParser so that the
ResolvableType for each MockBean or SpyBean field included the
implementation class from which the field was found. Where the field
was declared with a variable generic signature that was made constant
by its implementation class, this allowed the correct concrete type to
be determined. It also had the unintended side-effect of preventing two
test classes with identical `@MockBean` and `@SpyBean` configuration
from sharing a context as the resolvable types for their mock and spy
bean fields would now be different.

This commit updates DefinitionsParser to only include the
implementation class in the ResolvableType if the field's generic type
is variable. For cases where it is not variable, this restores the
behaviour prior to the fix for gh-20916.

Fixes gh-22566
2020-07-27 13:04:02 +01:00
Andy Wilkinson 16eaae0b2f Defer background pre-init till the environment is prepared
Previously, background pre-init was started in response to the
application starting event. This meant that it would be running while
the logging turbo filter was in place and was rejecting all logging.
As a result, any logging performed during pre-init would be lost.

This commit changes background pre-init so that it is now started
in response to the application environment prepared event. By this
point, the logging turbo filter has been removed as the logging levels
have been configured from the environment.

Closes gh-21897
2020-07-27 11:24:36 +01:00
Andy Wilkinson b98c3dccfd Fix property-based configuration of Undertow socket options
Previously, only UndertowOptions was used as the source of options for
both server and socket options, but it only contains server options.
As a result, attempting to configure any socket options defined by
XNIO's Options class would fail.

This commit updates the property-based configuration of options to use
UndertowOptions as the source for server options and XNIO's Options as
the source for socket options.

Fixes gh-22502
2020-07-27 10:47:14 +01:00
Andy Wilkinson 1c3528f5a4 Include Jackson Modules in WebMvcTest and WebFluxTest
Fixes gh-22530
2020-07-27 10:11:29 +01:00
Andy Wilkinson 7b3c0a9e09 Advise against java.util.Optional configuration properties
Closes gh-21868
2020-07-27 09:58:24 +01:00
Andy Wilkinson ce7210c4f0 Merge branch '2.1.x' into 2.2.x
Closes gh-22563
2020-07-25 09:06:11 +01:00
Nelson Osacky 585aed8f8f Add generated-snippets as output to test goal
The generated snippets were not declared as an output to the
`spring-boot-actuator-autoconfigure` test goal so when the test was
pulled from the cache, it did not contain the `generated-snippets`
directory. This directory is required as an input to the Asciidoctor
plugin.

See gh-22555
2020-07-25 08:26:15 +01:00
Andy Wilkinson 1a43cd1c8e Merge branch '2.1.x' into 2.2.x
Closes gh-22551
2020-07-24 14:28:11 +01:00
Nelson Osacky 0494007893 Disable extra scans for full profile.
The extra scans were not disabled for the full profile, only the
regular profile.

See gh-22550
2020-07-24 14:27:32 +01:00
Andy Wilkinson f4508b4059 Merge branch '2.1.x' into 2.2.x
Closes gh-22547
2020-07-24 11:54:12 +01:00
Nelson Osacky e41a53cf85 Add Gradle Enterprise Extension
This adds build caching and build scans.

The changes required disabling scans when using the maven invoker
plugin in order to not cause duplicate build scans when invoking other
maven builds. There is also an empty `.mvn` folder in the
spring-boot-starters project to prevent duplicate build scans as well
since there is no way to pass properties to the maven-javadoc-plugin.

The checkstyle plugin was causing a cache miss with the
`propertyExpansion` because it contains an absolute path. The absolute
path is now ignored and instead the files are added as inputs to the
checkstyle plugin. This only enables the local build cache. The remote
cache is not yet enabled.

On my local machine:

./mvnw clean install build times go from about 30 minutes to about 10 minutes.
./mvnw clean install -Pfull build times go from about 60 minutes to about 13 minutes.

See gh-22089
2020-07-24 11:47:24 +01:00
Andy Wilkinson 9c5e59371f Upgrade to Jackson 2.10.5
Closes gh-22432
2020-07-23 21:12:08 +01:00
Andy Wilkinson f93bae4bd3 Upgrade to Aspectj 1.9.6
Closes gh-22539
2020-07-23 21:03:51 +01:00
Andy Wilkinson ce803cc678 Upgrade to Micrometer 1.3.11
Closes gh-22538
2020-07-23 21:03:49 +01:00
Andy Wilkinson 698db27a75 Upgrade to Aspectj 1.9.6
Closes gh-22537
2020-07-23 21:02:36 +01:00
Andy Wilkinson db242794ec Upgrade to Micrometer 1.1.16
Closes gh-22536
2020-07-23 21:02:34 +01:00
Stephane Nicoll 4f3b03afcf Merge branch '2.1.x' into 2.2.x
Closes gh-22525
2020-07-23 11:01:05 +02:00
Stephane Nicoll 0440a9a78c Upgrade to Groovy 2.5.13
Closes gh-22505
2020-07-23 10:55:47 +02:00
Phillip Webb b5e70157dc Update copyright year of changed files 2020-07-22 17:01:36 -07:00
Phillip Webb 51a26a4d5a Polish 2020-07-22 17:01:19 -07:00
Stephane Nicoll d9c34d5b84 Upgrade to Spring Integration 5.1.12
Closes gh-22511
2020-07-22 21:35:48 +02:00
Stephane Nicoll 68497649b1 Upgrade to Spring Integration 5.2.8
Closes gh-22385
2020-07-22 21:32:52 +02:00
Stephane Nicoll d1f9adc189 Upgrade to Spring Kafka 2.3.10
Closes gh-22386
2020-07-22 20:36:14 +02:00
Stephane Nicoll ad976bec20 Upgrade to Spring AMQP 2.2.9
Closes gh-22383
2020-07-22 18:43:46 +02:00
Stephane Nicoll baa6a8aeb1 Upgrade to Spring AMQP 2.1.16
Closes gh-22507
2020-07-22 18:41:46 +02:00
Stephane Nicoll d5301f8b0a Upgrade to Spring Data Moore-SR9
Closes gh-22384
2020-07-22 11:09:58 +02:00
Stephane Nicoll 8b20840a1a Upgrade to Spring Data Lovelace-SR19
Closes gh-22382
2020-07-22 11:08:13 +02:00
Andy Wilkinson 8448763976 Upgrade to Spring Framework 5.2.8.RELEASE
Closes gh-22372
2020-07-21 11:38:40 +01:00