This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.
See gh-19609
This reverts commit b34a311d02 as,
having disabled the publishing of Gradle's module metadata (4f75ab5),
the changes are no longer needed.
See gh-19609
Previously, enforcedPlatform dependencies were using to pull in the
constraints defined in spring-boot-dependencies and
spring-boot-parent and applied them strictly so that the constrained
version had to be used. This worked as intended in Spring Boot's own
build but incorrectly enforced those same strict version requirements
on external consumers of Spring Boot's modules.
This commit reworks how Spring Boot defines its internal dependency
management so that platform dependencies are exposed to external
consumers while enforced platform dependencies are using internally.
See gh-19609
Prior to this commit, active profiles were being added to the Spring Boot
application environment by setting the `spring.profiles.active` property.
This could result in profiles getting parsed differently than other uses of `@ActiveProfiles`.
Setting the profiles directly in the `Environment` prevents this parsing.
See gh-19556
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.
This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.
Fixes gh-18328
Previously, when spying on a scoped bean the creation of the spy
would be performed using the scoped proxy. This would result in
the spy being unable to spy on any of the target bean's methods as
the scoped proxy's implementations of those methods would be final.
This commit updates MockitoPostProcessor so that the creation of the
spy and injection of the @SpyBean-annotated field is performed using
the scoped target. The scoped target has not be proxied so this
allows Mockito to spy on all of its methods.
Closes gh-17817
Extend `JsonContentAssert` with `hasJsonPath` and `doesNotHaveJsonPath`
methods which can be used to check the path regardless of the value it
may or may not contain.
Prior to this commit there wasn't an easy way to assert that the
Jackson `@JsonInclude(JsonInclude.Include.NON_NULL)` annotation was
applied since `assertDoesNotHavePathValue` would pass for both
`{"name" : null}` and `{}`.
Closes gh-17608
Meta-annotate `ClassPathExclusions` and `ClassPathOverrides` with
so that the `ModifiedClassPathExtension` no longer needs to be
used directly.
See gh-17491
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.
Closes gh-7316
Broaden the scope of customizer support so that instead of focusing
just on headers, we can now customize any outgoing `HttpClientRequest`.
Also update auto-configuration to automatically add any
`RestTemplateRequestCustomizer` beans to the builder.
See gh-17091
Update `RestTemplateBuilder` so that it is easier to apply custom
headers to the outgoing request. The update is particularly useful
for setting the `User-Agent` header, for example so that a GitHub
username can be used when calling `api.github.com`.
See gh-17091
Reduce the surface area of the public API by making the
`BasicAuthentication` and `BasicAuthenticationClientHttpRequestFactory`
class package private.
This commit also attempts to simplify `TestRestTemplate` by keeping
the `RestTemplateBuilder` and reusing it, rather than needing to deal
only with a `RestTemplate` instance.
See gh-17010
Update `RestTemplateBuilder` to use a custom request factory to add
authentication headers rather than an interceptor.
Prior to this commit, the use of the `BasicAuthenticationInterceptor`
interceptor could cause `OutOfMemoryError` whenever a large file is
uploaded.
See gh-17010
Split the JUnit 5 `OutputCapture` class into separate `OutputExtension`
and `CapturedOutput` classes. The JUnit 5 callback methods are now
contained only in the `OutputExtension` class so no longer pollute the
public API that users will interact with.
The `CapturedOutput` class has also been updated to capture System.err
and System.out separately to allow distinct assertions if required.
Closes gh-17029
Previously, due to a quirk in Spring Framework, it was necessary to use bean method
proxying in @Configuration classes that define one or more FactoryBeans. This quirk has
now been addressed so this commit disables bean method proxying where it is now no longer
needed.
Closes gh-16533
The `spring-boot-test` module has a dependency to TestNG to validate
some part of the test infrastructure but no tests are actually written
using TestNG. The presence of TestNG is a trigger for the maven surefire
plugin and it attempts to run tests using it.
This commit defines the explicit provider to use (JUnit 4)
Closes gh-16735