10931 Commits

Author SHA1 Message Date
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
Andy Wilkinson
9e3a2bbdeb Implement BeanFactoryAware to inject BeanFactory
Closes gh-23543
2020-09-30 19:38:06 +01:00
Stephane Nicoll
9ff946bafa Remove unnecessary stubbing 2020-09-30 16:13:43 +02: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
Andy Wilkinson
f4ce77fcae Merge branch '2.3.x'
Closes gh-23541
2020-09-30 14:58:26 +01:00
Andy Wilkinson
e58a92b3d0 Introduce a dedicated @GradleCompatibility annotation
Rather than using the extension directly, introduced a dedicated
annotation will enable customization of the compatibility tests that
are run via attributes on the annotation. For example, it will allow
certain test classes to run their tests with Gradle's configuration
cache enabled while others disable it.

Closes gh-23532
2020-09-30 14:50:48 +01:00
Andy Wilkinson
bd4934b0fd Fix matching of SNAPSHOT artifacts when customizing layers
Previously the artifact's version was used. In an artifact's version,
SNAPSHOT is replaced with the timestamped version number of a specific
snapshot. As a result, it no longer matches the *:*:*SNAPSHOT pattern.

This commit replaces switches to using the artifact's base version.
This preserves the SNAPSHOT in the version number. For non-snapshot
artifacts, the version and base version are identical.

Fixes gh-23533
2020-09-30 14:48:04 +01: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
6254ad634e Merge branch '2.3.x'
Closes gh-23535
2020-09-30 10:32:16 +02:00
Stephane Nicoll
2f6c19d618 Start building against Spring Framework 5.3.0 snapshots
See gh-23534
2020-09-30 10:31:29 +02:00
Stephane Nicoll
cd15cbdc79 Do not execute datasource initialization in a separate thread
This commit makes sure that `data.sql` is performed in the same thread
as the one initializing the JPA container.

Closes gh-22852
2020-09-30 10:10:16 +02:00
Stephane Nicoll
789fafadac Start building against Spring Framework 5.3.10 snapshots
See gh-23526
2020-09-30 10:00:21 +02:00
Andy Wilkinson
f5df6e463a Reduce configuration resolution when building a layered jar
Previously, BootJar would resolves all of a project's configurations
when building a layered jar. This was unnecessarily broad as it was
likely to include configurations that had contributed nothing to the
jar's classpath.

This commit replaces the configuration resolution with an afterResolve
action that populates the ResolvedDependencies in response to a
configuration being resolved. This allows the resolved dependencies to
be populated from all of the configurations that were resolved as part
of determining the jars classpath and no more.

Closes gh-23528
2020-09-29 17:51:55 +01: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
2852ea0808 Remove useless version override for MongoDBContainer
Closes gh-23520
2020-09-29 10:50:30 +02:00
Stephane Nicoll
137f4ec980 Merge branch '2.3.x'
Closes gh-23522
2020-09-29 10:46:36 +02:00
Stephane Nicoll
466c1012d6 Merge branch '2.2.x' into 2.3.x
Closes gh-23521
2020-09-29 10:44:30 +02:00
Stephane Nicoll
fd3683646a Migrate SessionAutoConfigurationMongoTests to Testcontainers
Closes gh-23512
2020-09-29 10:34:59 +02:00
Stephane Nicoll
cc1f7402a7 Associate ResourceLoader with RabbitConnectionFactoryBean
Closes gh-22332
2020-09-29 10:14:34 +02:00
Stephane Nicoll
36382e599c Add support for Redis 6 authentication with username
Closes gh-22702
2020-09-29 10:01:11 +02:00
Stephane Nicoll
a5c20a5132 Polish 2020-09-28 14:56:44 +02:00
Lukas Cardot
e95bcfac34 Configure the bootBuildInfo task lazily
Prior to this commit, the bootBuildInfo was configured eagerly.
Configuring it lazily prevent this task from being configured when not
explicitly needed. Also, the 'classes' and 'bootJar' tasks are now
lazily configured, as the bootBuildInfo task was causing them to be
configured eagerly.

See gh-23435
2020-09-28 11:19:26 +01:00
Andy Wilkinson
ad6de10f14 Remove use of deprecated SDR API when describing request mappings
Closes gh-22654
2020-09-28 11:08:24 +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
Stephane Nicoll
d9b4d7b594 Merge branch '2.3.x'
Closes gh-23509
2020-09-28 09:22:19 +02:00
Stephane Nicoll
2c1634e6ed Merge branch '2.2.x' into 2.3.x
Closes gh-23508
2020-09-28 09:21:51 +02:00
Rujun Chen
8330752b11 Add mising entry for Netty tcnative dependency management
See gh-23502
2020-09-28 09:18:44 +02:00
Stephane Nicoll
77e27eaeb1 Polish "Add reference to desensitization spring boot starter"
See gh-23507
2020-09-28 09:14:23 +02:00
zyc
1d0b085b5c Add reference to desensitization spring boot starter
See gh-23507
2020-09-28 09:14:09 +02:00
Andy Wilkinson
558c2b4591 Merge branch '2.3.x'
Closes gh-23501
2020-09-26 09:17:08 +01:00
Andy Wilkinson
9bd040cb0f Merge branch '2.2.x' into 2.3.x
Closes gh-23500
2020-09-26 09:16:46 +01: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
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
b662f1e06e Remove UnresolvedDependenciesAnalyzer from the Gradle plugin
Closes gh-23479
2020-09-24 15:16:29 +01:00
Stephane Nicoll
4d33062d30 Upgrade to Hazelcast Hibernate5 2.1.1
Closes gh-23476
2020-09-24 15:57:07 +02:00
Stephane Nicoll
4009acf025 Add support for Hazelcast
This commit upgrades to Hazelcast 4.0.3, yet keeping compatibility with
Hazelcast 3.x.

Closes gh-20856
Closes gh-23475
2020-09-24 15:57:07 +02:00
Andy Wilkinson
7b183ef99d Merge branch '2.3.x'
Closes gh-23478
2020-09-24 14:46:42 +01:00
Andy Wilkinson
e626f7f47e Merge branch '2.2.x' into 2.3.x
Closes gh-23477
2020-09-24 14:45:55 +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
thorasine
2d74aef6ef Fix typos
See gh-23465
2020-09-24 11:42:05 +02:00
Stephane Nicoll
c44e1ec0ad Merge branch '2.3.x'
Closes gh-23462
2020-09-23 14:36:59 +02:00
Stephane Nicoll
b3c5588c86 Merge branch '2.2.x' into 2.3.x
Closes gh-23461
2020-09-23 14:36:41 +02: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