Commit Graph

191 Commits (3.0.x)

Author SHA1 Message Date
Stephane Nicoll 136b5959c3 Merge branch '2.5.x' into 2.6.x
Closes gh-29612
3 years ago
Yanming Zhou b49418aaaf Enforce use of BDDMockito
1. Replace Mockito.verify*() with BDDMockito.then()
2. Replace Mockito.doReturn() with BDDMockito.willReturn()
3. Adjust checkstyle rule

See gh-29178
3 years ago
Phillip Webb 1b7db2750d Merge branch '2.7.x'
Closes gh-29373
3 years ago
Phillip Webb e1c84e2972 Merge branch '2.6.x' into 2.7.x
Closes gh-29372
3 years ago
Phillip Webb 72696cdb0f Merge branch '2.5.x' into 2.6.x
Closes gh-29371
3 years ago
Phillip Webb 7c16668bf3 Log Docker output to aid debugging
Add an SLF4J logger so that we can see real time output of the
Docker container.

See gh-29370
3 years ago
Stephane Nicoll fed89f98aa Merge branch '2.7.x' 3 years ago
Stephane Nicoll ce7a3d0ef2 Upgrade to Flyway 8.3.0
Closes gh-29249
3 years ago
Andy Wilkinson fe7b13ec46 Upgrade to Spring Framework 6 and Jakarta EE 9
Closes gh-28619
Closes gh-28620
Closes gh-28621
Closes gh-28622
Closes gh-28623
Closes gh-28624
Closes gh-28625
Closes gh-28626
Closes gh-28627
Closes gh-28628
Closes gh-28629
Closes gh-28630
Closes gh-28631
Closes gh-28632
Closes gh-28633
Closes gh-28634
Closes gh-28635
Closes gh-28636
Closes gh-28638
Closes gh-28639
Closes gh-28640
Closes gh-28644
Closes gh-28645
Closes gh-28650
Closes gh-28711
Closes gh-28866
Closes gh-28867
Closes gh-28868
Closes gh-28872

See gh-28641
See gh-28642
See gh-28643
See gh-28646
See gh-28647
See gh-28648
See gh-28649
See gh-28721
See gh-28869
See gh-28871
3 years ago
Andy Wilkinson 89b40e1e00 Add support for Log4j2's composite configuration
Closes gh-27110
3 years ago
Stephane Nicoll d6aab2fe84 Merge branch '2.5.x' 3 years ago
Stephane Nicoll 0f5bd90539 Add checkstyle ignore for unusual test structure 3 years ago
Andy Wilkinson e2a355f003 Consolidate Elasticsearch configuration properties
Previously, a number of Elasticsearch properties were duplicated
across the spring.elasticsearch.rest and
spring.data.elasticsearch.client.reactive prefixes for configuring
the blocking REST client provided by Elasticsearch and the reactive
client provided by Spring Data respectively. This could cause
problems when using the Elasticsearch REST client configured with
a custom spring.elasticsearch.rest.uris. If Spring WebFlux (to make
use of WebClient) and Spring Data Elasticsearch were on the classpath,
the reactive Elasticsearch Client would be autoconfigured but it
would use the default value of its analogous
spring.data.elasticsearch.client.reactive.endpoints property. It
would be unable to connect, causing a startup failure.

This commit consoliates the configuration properties where possible.
Each setting that is common across the two clients is now configured
using a single, shared spring.elasticsearch property. Each setting
that is specific to the blocked REST client or the WebClient-based
reactive client now have prefixes of spring.elasticsearch.restclient
and spring.elasticsearch.webclient respectively.

The old properties beneath spring.elasticsearch.rest and
spring.data.elasticsearch.client.reactive have been deprecated. If a
any deprecated property is set, all of the new properties are
ignored. In other words, to migrate to the new properties, each usage
of a now-deprecated property must be updated to use its new
replacement instead.

Closes gh-23106
3 years ago
Andy Wilkinson 575d83737a Merge branch '2.5.x'
Closes gh-27799
3 years ago
Andy Wilkinson e409489859 Merge branch '2.4.x' into 2.5.x
Closes gh-27798
3 years ago
Andy Wilkinson f8ef90813f Allow @MockBean to be used with Framework's @Repeat
Fixes gh-27693
3 years ago
Scott Frederick 2178c281e9 Polish "Add network option for image building"
See gh-27486
3 years ago
Scott Frederick a0b32251eb Split gradle test support into a separate module
See gh-25824
3 years ago
Scott Frederick 18c7c0af22 Add Paketo image building system tests
A new system test plugin is being made available for running test
suites that should be run less frequently than with every commit, such
as tests that verify Spring Boot compatibility with external
projects. CI pipeline configuration for running system tests is also
provided.

The first system tests verify the behavior of the Spring Boot image
building plugins when building images using Paketo buildpacks.

Closes gh-25824
3 years ago
Scott Frederick b62905b91d Merge branch '2.4.x'
Closes gh-25840
4 years ago
Scott Frederick 8ac297d6f3 Merge branch '2.3.x' into 2.4.x
Closes gh-25839
4 years ago
Scott Frederick 32d378a348 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
4 years ago
Phillip Webb b5583a4620 Polish doc code samples
See gh-6313
4 years ago
Phillip Webb 9aad29da0c Extract code samples from docs
See gh-6313
4 years ago
Phillip Webb b314d848dc Polish docs code
See gh-6313
4 years ago
Andy Wilkinson ad968a2640 Merge branch '2.4.x'
Closes gh-26273
4 years ago
Andy Wilkinson cf1b29ebd4 Merge branch '2.3.x' into 2.4.x
Closes gh-26272
4 years ago
dreis2211 9b1b47ae5d Rename nohttp whitelist to allowlist
See gh-26264
4 years ago
Andy Wilkinson d1164c63f9 Merge branch '2.4.x'
Closes gh-26176
4 years ago
Andy Wilkinson be99f386a8 Merge branch '2.3.x' into 2.4.x
Closes gh-26175
4 years ago
Andy Wilkinson 9e5f738f7a Make relative file references in checkstyle.xml more robust
Closes gh-26174
4 years ago
Andy Wilkinson b9348c6d28 Merge branch '2.4.x'
Closes gh-26169
4 years ago
Andy Wilkinson bc1a462143 Merge branch '2.3.x' into 2.4.x
Closes gh-26168
4 years ago
Andy Wilkinson 82198a99e0 Polish nohttp configuration
Closes gh-26166
4 years ago
Andy Wilkinson 8b5f914ba5 Revert "Merge branch '2.4.x'"
This reverts commit 97b26b4886, reversing
changes made to 6f9b1ed6a3.

See gh-25840
4 years ago
Andy Wilkinson e9ce20dbf4 Revert "Merge branch '2.3.x' into 2.4.x"
This reverts commit 586ce00e06, reversing
changes made to 563b8a8cec.

See gh-25839
4 years ago
Andy Wilkinson b35d1ec6e8 Revert "Use test harness for image building integration tests"
This reverts commit da9d8d6055.

See gh-25838
4 years ago
Scott Frederick 97b26b4886 Merge branch '2.4.x'
Closes gh-25840
4 years ago
Scott Frederick da9d8d6055 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
4 years ago
Andy Wilkinson 9d7135f515 Relax Micrometer import control for docs examples
See gh-25762
4 years ago
Andy Wilkinson cf7f59fe4b Merge branch '2.4.x'
Closes gh-25762
4 years ago
Andy Wilkinson f8c1a73bf2 Prevent import of Micrometer class outside of the Actuator
Closes gh-25760
4 years ago
Phillip Webb 8ba45cc6b5 Allow DB migrations without DataSourceProperties
Update `FlywayAutoConfiguration`, `LiquibaseAutoConfiguration` and
`DataSourceInitializer` classes so that they no longer depend on
`DataSourceProperties`. DB migrations can now be performed against
a `@Bean` defined primary `DataSource` with an alternative
username/password.

This update also removed using fallback properties when a custom
connection `url` is defined with Flyway or Liquibase. We now assume
that `username`, `password` and `driver-class-name` will be provided
if the default values are unacceptable. Our previous logic was
particularly flawed if a custom URL caused a change of driver type.

Closes gh-25643
4 years ago
Phillip Webb bea307b115 Extract code samples from docs
See gh-6313
4 years ago
Madhura Bhave c4432a81a8 Merge branch '2.4.x'
Closes gh-25615
4 years ago
Madhura Bhave df1d1dbaa9 Fallback to BeanPropertyBindingResult for unbound property validation
gh-17424 updated `ValidationBindHandler` so that it would
only look at bound values when validating. This commit updates
`ValidationBindHandler` to use Spring Framework's `BeanPropertyBindingResult`.
This means that for fields that are not bound, JavaBean accessor methods can
be used to get the value to validate.

Fixes gh-25356
4 years ago
Phillip Webb 2a85427324 Refine spring-boot-docs package restructure
Refine the package restructure started in 91ccc23462 to help provide
a solid foundation for code snippets. This commit renames many of the
classes so that they no longer end in `Example`. It also removes some
of the inner types that were previously used. Many tag comments have
also been moved to ensure that `import` statements are available in
the docs.

Closes gh-25089
4 years ago
Phillip Webb 49e754f48b Merge branch '2.2.x' into 2.3.x
Closes gh-24411
4 years ago
Phillip Webb 286ef61071 Narrow auto-configure checkstyle suppressions
Closes gh-21015
4 years ago
Andy Wilkinson 2dce4aa42b Merge branch '2.2.x' into 2.3.x
Closes gh-24009
4 years ago
Andy Wilkinson 30a0ccab02 Remove use of `@PostConstruct` from main code
When running on Java 11 (where `@PostConstruct` is no longer part of
the JRE) and without a dependency on jakarta-annotation-api,
`@PostContruct` annotions are silently dropped. This leads to obscure and
hard-to-track down changes in the behaviour of our auto-configuration
as the `@PostConstruct`-annotated methods are not invoked.

To allow users to run on Java 11 without having jakarta-annotation-api
on the classpath, this commit removes use of `@PostConstruct` from main
code. A Checkstyle rule has also been added to prevent its usage in
main code from being reintroduced.

Closes gh-23723
4 years ago
Phillip Webb e12a449ed9 Merge branch '2.2.x' into 2.3.x 4 years ago
Phillip Webb 8b3728a57e Refine StringSequence checkstyle suppression
See gh-23440
4 years ago
Phillip Webb 3fca8c6b4e Merge branch '2.2.x' into 2.3.x
Closes gh-23441
4 years ago
Phillip Webb 4945806d84 Make `StringSequence.isEmpty()` public
Make `StringSequence.isEmpty()` public for compatibility with JDK 15.

Closes gh-23440
4 years ago
Stephane Nicoll 652561c274 Review checkstyle rule to prevent non BDD mockito imports
Closes gh-20902
4 years ago
Stephane Nicoll a149edcfd7 Merge branch '2.2.x' into 2.3.x
Closes gh-23077
4 years ago
Stephane Nicoll 066471b1d9 Merge branch '2.1.x' into 2.2.x
Closes gh-23076
4 years ago
dreis2211 7bf32e9bb1 Disallow Apache Commons Lang & Lang3 imports
See gh-23071
4 years ago
Andy Wilkinson 38db129146 Remove checkstyle config made redundant by ee758fa6
Closes gh-21473
5 years ago
Andy Wilkinson ee758fa670 Use HTTPS for license links
This commit updates the MavenPublishingConventions to use HTTPS to
link to the Apache license. The configuration of NoHTTP has also
been reworked so that it will correctly find usch uses of http://
URLs.

Closes gh-21459
5 years ago
Andy Wilkinson 3f56f97e03 Merge branch '2.2.x'
Closes gh-21472
5 years ago
Andy Wilkinson 4a896f2272 Merge branch '2.1.x' into 2.2.x
Closes gh-21471
5 years ago
Andy Wilkinson fdc63d71fe Use HTTPS when linking to groovy-lang.org
Closes gh-21466
5 years ago
Phillip Webb eb3b0f82a3 Use http liquibase XSDs
Update the lquibase test to use `http://` rather than `https://` so that
it can be resolved from the local jar.
5 years ago
Scott Frederick 158933c3e5 Improve API of ErrorAttributes and DefaultErrorAttributes
This commit improves the backward-compatibility of the ErrorAttributes
interfaces by providing a default implementation of a new method. It
also encapsulates several parameters that control the inclusion or
exclusion of error attributes into a new ErrorAttributeOptions type to
make it easier and less intrusive to add additional options in the
future. This encapsulation also makes the handling of the
includeException option more similar to other options.

Fixes gh-21324
5 years ago
dreis2211 b0eea26260 Prevent shaded imports from Datastax
See gh-20967
5 years ago
dreis2211 5b9d8bfc17 Upgrade to Testcontainers 1.14.0
See gh-20936
5 years ago
Stephane Nicoll abe43b2e83 Upgrade to Couchbase SDK v3
This commit upgrades to the Couchbase SDK v3 which brings the following
breaking changes:

* Bootstrap hosts have been replaced by a connection string and the
authentication is now mandatory.
* A `Bucket` is no longer auto-configured. The
`spring.couchbase.bucket.*` properties have been removed
* `ClusterInfo` no longer exists and has been replaced by a dedicated
API on `Cluster`.
* `CouchbaseEnvironment` no longer exist in favour of
`ClusterEnvironment`, the customizer has been renamed accordingly.
* The bootstrap-related properties have been removed. Users requiring
custom ports should supply the seed nodes and initialize a Cluster
themselves.
* The endpoints-related configuration has been consolidated in a
single IO configuration.

The Spring Data Couchbase provides an integration with the new SDK. This
leads to the following changes:

* A convenient `CouchbaseClientFactory` is auto-configured.
* Repositories are configured against a bucket and a scope. Those can
be set via configuration in `spring.data.couchbase.*`.
* The default consistency property has been removed in favour of a more
flexible annotation on the repository query methods instead. You can now
specify different query consistency on a per method basis.
* The `CacheManager` implementation is provided, as do other stores for
consistency so a dependency on `couchbase-spring-cache` is no longer
required.

See gh-19893

Co-authored-by: Michael Nitschinger <michael@nitschinger.at>
5 years ago
Brian Clozel ab72cc8fdb Revert "Add actuator specific ObjectMapper"
See gh-12951
See gh-20291
5 years ago
Brian Clozel 97af0b2f3a Add actuator specific ObjectMapper
Prior to this commit, Actuator endpoints would use the application
ObjectMapper instance for serializing payloads as JSON. This was
problematic in several cases:

* application-specific configuration would change the actuator endpoint
output.
* choosing a different JSON mapper implementation in the application
would break completely some endpoints.

Spring Boot Actuator already has a hard dependency on Jackson, and this
commit uses that fact to configure a shared `ObjectMapper` instance that
will be used by the Actuator infrastructure consistently, without
polluting the application context.

This `ObjectMapper` is used in Actuator for:

* JMX endpoints
* Spring MVC endpoints with an HTTP message converter
* Spring WebFlux endpoints with an `Encoder`
* Jersey endpoints with a `ContextResolver<ObjectMapper>`

For all web endpoints, this configuration is limited to the
actuator-specific media types such as
`"application/vnd.spring-boot.actuator.v3+json"`.

Fixes gh-12951
5 years ago
Phillip Webb aa1954717c Add cloud native buildpack module
Add a Java implementation of the buildpacks.io specification allowing
projects to be packaged into OCI containers. The `builder` class
provides a Java equivalent of `pack build` command and is based on
the `pack` CLI Go code published at https://github.com/buildpacks/pack.

Closes gh-19828
5 years ago
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
5 years ago
Andy Wilkinson dd4377e69c Merge branch '2.1.x'
Closes gh-18912
5 years ago
Andy Wilkinson d1ead884c4 Fix @ServletComponentScan with a component index
Previously @ServletComponentScan did not work when there was a
component index on the classpath as it made an assumption about
the concrete type of the BeanDefinitions produced by scanning that
does not hold true when an index is present.

This commit updates the scanning and the handlers to correct the
assumpution by working with a bean definition type that is produced
by scanning both when there is and when there is not an index present.

To prevent the problem from reoccuring, a test that uses and index
has been added and the import of ScannedGenericBeanDefinition is now
prohibited by Checkstyle.

Closes gh-18910
5 years ago
Andy Wilkinson cf62dc862b Polish "Correct Mono import in LegacyHealthEndpointCompatibilityConfiguration"
See gh-18571
5 years ago
dreis2211 d8de6fff53 Polish
See gh-18557
5 years ago
dreis2211 38d5a52ac4 Remove obsolete checkstyle suppressions
See gh-17522
5 years ago
dreis2211 0f0278e69b Migrate ModifiedClassPath tests to JUnit 5
Migrate the remaining JUnit 4 tests to JUnit 5, making use of the
new `ModifiedClassPathExtension`.

See gh-17491
5 years ago
Andy Wilkinson a40bc64f6e Merge branch '2.1.x'
Closes gh-17463
5 years ago
Andy Wilkinson c5241f0e82 Remove accidental usage of com.hazelcast.util.Base64
Closes gh-17461
5 years ago
Phillip Webb a66c4d3096 Unify method visibility of private classes
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
5 years ago
Ilya Lukyanovich 569830cdca Migrate LogbackLoggingSystemTests to JUnit 5
See gh-17107
5 years ago
Phillip Webb 605599138e Merge branch '2.1.x' 5 years ago
Phillip Webb 92bff3c328 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb cfeb0239b7 Merge branch '1.5.x' into 2.0.x 5 years ago
Phillip Webb fc7a99d0df Merge branch '2.1.x'
Closes gh-17362
5 years ago
Phillip Webb 6425fb6ec8 Merge branch '2.0.x' into 2.1.x
Closes gh-17361
5 years ago
Phillip Webb 4f079803d2 Merge branch '1.5.x' into 2.0.x
Closes gh-17359
5 years ago
Madhura Bhave d5c0009c6e Rename samples to smoke tests
Closes gh-17197
5 years ago
Phillip Webb 0b720b99b2 Merge branch '2.1.x'
Closes gh-17308
5 years ago
Phillip Webb 02e705c8e4 Relax nohttp requirement for service.wsdl
Unfortunately https references cause eclipse errors so we need to
relax the requirement for this file.

Fixes gh-17307
5 years ago
Johnny Lim f283aa18eb Use "JUnit" instead of "Junit"
See gh-17272
5 years ago
Issam El-atif 9fafcda929 Add JUnit 4 and the Vintage Engine sample
This commit adds a sample to verify the use of JUnit 4 and the Vintage
Engine.

See gh-17100
5 years ago
Andy Wilkinson 9b5cb4f9b8 Remove need for public constructor on inner-class
Closes gh-17086
6 years ago
Phillip Webb b3d5cd538d Add JUnit 5 checkstyle rules
Add a rule to enforce JUnit 5 usage and conventions.

Closes gh-17093
6 years ago
Phillip Webb 266d6334b2 Fix checkstyle RedundantModifier test violations 6 years ago
Phillip Webb cde4f0d688 Fix checkstyle violations 6 years ago
Phillip Webb 4c21dc1c31 Merge branch '2.1.x' 6 years ago
Phillip Webb 866e2b712e Merge branch '2.0.x' into 2.1.x 6 years ago