Commit Graph

1973 Commits

Author SHA1 Message Date
Stephane Nicoll 01ddee2201 Polish 2020-10-10 08:23:28 +02:00
Scott Frederick 0f9e8315bc Replace use of deprecated Reactor MonoProcessor in tests
Fixes gh-23627
2020-10-09 15:14:32 -05:00
Phillip Webb 8b740c07e3 Merge branch '2.3.x' into master
Closes gh-23615
2020-10-07 11:41:25 -07:00
Phillip Webb 0709c7671f Merge branch '2.2.x' into 2.3.x
Closes gh-23614
2020-10-07 11:41:11 -07:00
Phillip Webb ce70e7d768 Merge branch '2.1.x' into 2.2.x
Closes gh-23613
2020-10-07 11:40:55 -07:00
Phillip Webb 1db2f5f960 Support Formatter conversion service beans
Update `ConversionServiceDeducer` to also include `Formatter` beans
when they are qualified with `@ConfigurationPropertiesBinding`.

Fixes gh-23576
2020-10-07 11:34:57 -07:00
Stephane Nicoll b69ede4556 Polish
See gh-23480
2020-10-07 14:40:56 +02:00
Stephane Nicoll ef2fee22cb Make sure that the type used for discovery implements DataSource
See gh-23480
2020-10-07 12:00:24 +02:00
Stephane Nicoll 1296b4dfe6 Revert "Support constructor binding on 3rd party classes"
This commit reverts the support of constructor binding on 3rd party
classes using @ImportConfigurationPropertiesBean

See gh-23172

Closes gh-23593
2020-10-07 10:53:01 +02:00
Stephane Nicoll 35d41e4ae2 Remove code deprecated in Spring Boot 2.2
Closes gh-22034
2020-10-06 08:17:10 +02:00
Stephane Nicoll b08da63da5 Polish 2020-10-05 17:37:11 +02:00
Stephane Nicoll d952a8f3a5 Avoid unnecessary reflection in builders
Closes gh-23560
2020-10-05 16:16:40 +02:00
Stephane Nicoll ebc9c575e3 Allow to customize RSocketServer's fragment size
Closes gh-23247
2020-10-05 13:58:57 +02:00
dreis2211 ecee9c0f9b Avoid unnecessary explicit initialization of Atomics
Constructor calls like new AtomicInteger(0) cause a volatile write that
can be saved in cases where the constructor parameter is the default
value.

See gh-23575
2020-10-02 16:43:34 +02:00
Stephane Nicoll 1e2ed8ab4c Update copyright of changed file
See gh-23571
2020-10-02 09:48:18 +02:00
mnhock fc89051242 Use platform-independent line separator
See gh-23571
2020-10-02 09:47:44 +02:00
Madhura Bhave 7c22e71753 Polish "Deprecate EmbeddedDatabaseConnection#HSQL"
See gh-23565
2020-10-01 16:56:48 -07:00
desainidhi99 d5a1421bbe Deprecate EmbeddedDatabaseConnection#HSQL in favor of HSQLDB
See gh-23565
2020-10-01 16:55:44 -07:00
Andy Wilkinson 65c7cd43db Merge branch '2.3.x'
Closes gh-23557
2020-10-01 12:38:44 +01:00
Andy Wilkinson 914dccade2 Merge branch '2.2.x' into 2.3.x
Closes gh-23555
2020-10-01 12:30:16 +01: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 de32fab324 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
2020-09-30 16:09:41 +02:00
Stephane Nicoll 366fec33d0 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
2020-09-30 13:46:57 +02:00
Stephane Nicoll 75554ce236 Polish "Add support for Oracle UCP"
See gh-23403
2020-09-29 16:09:55 +02:00
Fabio Grassi a21ab392b6 Add support for Oracle UCP
See gh-23403
2020-09-29 14:45:48 +02:00
Andy Wilkinson a19a565410 Stop registering the default servlet by default
Previously, the default servlet was registered automatically when using
embedded Jetty, Tomcat, or Undertow. However, it is not used by the
majority of applications where Spring MVC's DispatcherServlet will be
the only servlet that's needed. As such configuring the default servlet
was wasting CPU and memory.

This commit changes the default for registering the default servlet to
false. It can be re-enabled by setting
server.servlet.register-default-servlet=true.

Closes gh-22915
2020-09-29 11:52:19 +01:00
Stephane Nicoll 57bc23284e Apply DataSource aliases only when necessary
This commit makes sure that aliases are only applied when they match
the DataSource being bound. This prevent an alias targetted to a
DataSource to accidently match an unexpected property of another
DataSource.

Closes gh-23480
2020-09-28 10:17:13 +02:00
Andy Wilkinson ab8d33aa72 Merge branch '2.3.x'
Closes gh-23482
2020-09-24 19:04:33 +01:00
Andy Wilkinson df5cd21ca5 Merge branch '2.2.x' into 2.3.x
Closes gh-23481
2020-09-24 19:04:17 +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 17d5e17069 Merge branch '2.3.x' 2020-09-22 16:26:58 +01:00
Andy Wilkinson 232c310df2 Merge branch '2.2.x' into 2.3.x 2020-09-22 16:26:39 +01:00
Andy Wilkinson 24102656f2 Fix Log4j2 XML configuration tests on Windows
See gh-22983
2020-09-22 16:03:58 +01:00
Phillip Webb bd2a252101 Polish 'Add origin support for empty YAML list and map'
See gh-21704
2020-09-21 16:45:16 -07:00
heinz f18d564add Add origin support for empty YAML list and map
Update `OriginTrackedYamlLoader` to better deal with empty maps
and collections.

See gh-21704
2020-09-21 16:44:22 -07:00
Phillip Webb c885a15aea Allow binding when 'is' method also exists
Improve the `JavaBeanBinder` so that an bean that has both a `get` and
`is` method can still be bound.

Closes gh-23007
2020-09-21 16:35:54 -07:00
Phillip Webb fde2e440bb Add missing registration convenience methods
Update `BootstrapContext` with convenience methods that help if the
type has not been registered.

Closes gh-23438
2020-09-21 16:08:36 -07:00
Phillip Webb 0df37302af Make ConfigData Resolvers/Loaders public
Change the visibility of our own ConfigDataLocationResolver and
ConfigDataLoader classes so that they can be created outside of
`spring.factories`.

Closes gh-23434
2020-09-21 15:36:04 -07:00
Andy Wilkinson 3587ecb043 Merge branch '2.3.x' 2020-09-21 19:28:53 +01:00
Andy Wilkinson 0963218be1 Merge branch '2.2.x' into 2.3.x 2020-09-21 19:28:39 +01:00
Andy Wilkinson 0edf7cb9b9 Polish Log4j2 XML configuration tests
See gh-22983
2020-09-21 19:26:40 +01:00
Andy Wilkinson 5a3232d681 Merge branch '2.3.x'
Closes gh-23430
2020-09-21 15:21:17 +01:00
Andy Wilkinson 13e08a4344 Merge branch '2.2.x' into 2.3.x
Closes gh-23428
2020-09-21 15:15:08 +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 fee1e3aa2b Polish javadoc of LoggingSystemFactory
See gh-23387
2020-09-20 17:03:17 +01:00
Phillip Webb 8f5959ba1d Fix LoggingSystem package tangle
Introduce a new `LoggingSystemFactory` interface so that the
`LoggingSystem` class can find implementations without needing to
be directly tied to them.

Closes gh-23387
2020-09-19 14:21:04 -07:00
Phillip Webb 35673b7472 Add Binder to BootstrapContext
Update `ConfigDataEnvironment` so that it adds the initial `Binder`
to the `BootstrapContext` for `Bootstrappers` to use.

Closes gh-23401
2020-09-17 12:37:19 -07:00
Phillip Webb 8b8d5ccb10 Allow trailing whitespace document split marker
Refine `OriginTrackedPropertiesLoader` document split detection to be
more lenient if there is trailing whitespace.

Closes gh-23399
2020-09-17 11:23:59 -07:00
Andy Wilkinson ea5c6c2923 Polish BootstrapRegistry's javadoc
See gh-23326
2020-09-17 09:55:05 +01:00
Phillip Webb 99dc7914b2 Attempt to fix ConcurrentModificationException
Attempt to fix `ConcurrentModificationException` which occurs on
Java 11+.

See gh-23326
2020-09-17 01:41:39 -07:00