Commit Graph

227 Commits

Author SHA1 Message Date
Phillip Webb
73a34b6c0a Fix checkstyle issues
See gh-32582
2022-10-20 00:09:07 -07:00
Andy Wilkinson
1d78100ba8 Fix Checkstyle suppressions on Windows 2022-10-18 21:37:59 +01:00
Andy Wilkinson
4a76fbf93c Support logback.xml in a native image
Closes gh-32756
2022-10-18 21:37:28 +01:00
Bertolt Meier
647a2905c8 Add checkstyle rule for List.of() / Set.of() / Map.of()
This commits adds a checkstyle rule to not use List.of(), Set.of()
and Map.of(), preferring Collections.emptyList(), emptySet(), and
emptyMap() respectively.

It replaces usages of these methods across the codebase.

See gh-32655
2022-10-12 18:15:48 +01:00
Andy Wilkinson
3eb3d79104 Log condition evaluation report during AOT processing
Closes gh-32109
2022-10-07 18:08:18 +01:00
Andy Wilkinson
8e35f2ae92 Separate report logging from context initialization and events
See gh-32109
2022-10-07 18:08:18 +01:00
Andy Wilkinson
98dbabda08 Require since attribute when marking API as deprecated
Closes gh-32612
2022-10-06 11:12:42 +01:00
Andy Wilkinson
0bfa9cd704 Upgrade to Logback 1.4 and SLF4J 2.0
Closes gh-12649
2022-09-28 21:14:08 +01:00
Andy Wilkinson
0857cae943 Merge branch '2.7.x'
Closes gh-31952
2022-08-01 21:10:36 +01:00
Andy Wilkinson
0dde4278db Merge branch '2.6.x' into 2.7.x
Closes gh-31951
2022-08-01 21:09:37 +01:00
Marc Wrobel
3e0665e791 Fix links in documentations
- Fix broken links
- Use HTTPS where possible,
- Remove spring-security-oauth2-docs as it is no longer used
- Remove https://github.com/ThierrySquirrel/rocketmq-spring-boot-starter.
  This starter is 404 and https://github.com/rocketmq/rocketmq-spring-boot-starter
  hasn't been updated for 4 years.
- Clean up nohttp allowlist.lines.

See gh-31887
2022-08-01 21:07:36 +01:00
Andy Wilkinson
a6333f5e67 Merge branch '2.7.x'
Closes gh-31817
2022-07-20 19:50:34 +01:00
Andy Wilkinson
13431745e0 Merge branch '2.6.x' into 2.7.x
Closes gh-31816
2022-07-20 19:50:23 +01:00
Andy Wilkinson
5afa04f3cd Remove redundant Checkstyle suppression
Closes gh-30131
2022-07-20 19:49:53 +01:00
Andy Wilkinson
003f747e77 Merge branch '2.7.x'
Closes gh-31170
2022-05-26 13:52:41 +01:00
Andy Wilkinson
e617035dba Merge branch '2.6.x' into 2.7.x
Closes gh-31167
2022-05-26 13:45:52 +01:00
Andy Wilkinson
3e7bd582a3 Upgrade to Spring Java Format 0.0.33
Closes gh-31166
2022-05-26 13:22:23 +01:00
Andy Wilkinson
770cb840c3 Use more flexible SpringFactoriesLoader
Closes gh-30235

Co-authored-by: Madhura Bhave <bhavem@vmware.com>
Co-authored-by: Stephane Nicoll <snicoll@vmware.com>
2022-05-09 14:13:04 +01:00
Scott Frederick
7e089a6b81 Remove support for embedded MongoDB
This commit removes auto-configuration and dependency management
for Flapdoodle embedded MongoDB in favor of the Spring Boot support
provided by Flapdoodle.

Closes gh-30863
2022-05-06 17:05:36 -05:00
Andy Wilkinson
4a030343d3 Merge branch '2.7.x' 2022-05-06 11:40:11 +01:00
Andy Wilkinson
c61cd7761e Merge branch '2.6.x' into 2.7.x
Closes gh-30883
2022-05-06 11:37:30 +01:00
Andy Wilkinson
5258cd2814 Merge branch '2.5.x' into 2.6.x
Closes gh-30882
2022-05-06 11:29:22 +01:00
Andy Wilkinson
0e7c3547dd Prohibit usage of Micrometer nullability annotations
Closes gh-30881
2022-05-06 11:29:08 +01:00
Andy Wilkinson
fac2430dff Merge branch 'gh-30358' 2022-04-07 19:17:27 +01:00
Guirong Hu
dfafccaba5 Add failure analyzer for missing web factory bean
See gh-30358
2022-04-07 18:50:50 +01:00
Andy Wilkinson
3de024594f Merge branch '2.7.x' 2022-03-25 12:06:16 +00:00
Andy Wilkinson
64888b0deb Merge branch '2.6.x' into 2.7.x
Closes gh-30433
2022-03-25 12:03:24 +00:00
Andy Wilkinson
35d8f1dcdd Merge branch '2.5.x' into 2.6.x
Closes gh-30431
2022-03-25 11:44:24 +00:00
Andy Wilkinson
c087d609a0 Polish "Prevent imports of null-safety annotations"
See gh-30406
2022-03-25 11:43:57 +00:00
Yanming Zhou
0e99c57f8e Prevent imports of null-safety annotations
See gh-30406
2022-03-25 11:22:36 +00:00
Moritz Halbritter
44beceffaf Merge branch '2.7.x' 2022-02-10 13:39:22 +01:00
Moritz Halbritter
96ce8d842e Merge branch '2.6.x' into 2.7.x
Closes gh-29729
2022-02-10 13:38:50 +01:00
Moritz Halbritter
44ff29c4d4 Merge branch '2.5.x' into 2.6.x
Closes gh-29728
2022-02-10 13:28:15 +01:00
Moritz Halbritter
096ba72a39 Add documentation for WebMvc.fn
See gh-29683
2022-02-10 13:14:34 +01:00
Stephane Nicoll
41fb9cf562 Merge branch '2.7.x' 2022-02-01 11:15:49 +01:00
Stephane Nicoll
f812b33cbd Merge branch '2.6.x' into 2.7.x
Closes gh-29613
2022-02-01 11:07:31 +01:00
Stephane Nicoll
136b5959c3 Merge branch '2.5.x' into 2.6.x
Closes gh-29612
2022-02-01 10:59:08 +01:00
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
2022-02-01 09:37:15 +01:00
Phillip Webb
1b7db2750d Merge branch '2.7.x'
Closes gh-29373
2022-01-12 14:08:04 -08:00
Phillip Webb
e1c84e2972 Merge branch '2.6.x' into 2.7.x
Closes gh-29372
2022-01-12 14:07:48 -08:00
Phillip Webb
72696cdb0f Merge branch '2.5.x' into 2.6.x
Closes gh-29371
2022-01-12 14:07:31 -08:00
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
2022-01-12 14:03:27 -08:00
Stephane Nicoll
fed89f98aa Merge branch '2.7.x' 2022-01-05 09:36:07 +01:00
Stephane Nicoll
ce7a3d0ef2 Upgrade to Flyway 8.3.0
Closes gh-29249
2022-01-05 09:18:23 +01:00
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
2021-11-30 20:32:16 +00:00
Andy Wilkinson
89b40e1e00 Add support for Log4j2's composite configuration
Closes gh-27110
2021-10-19 10:01:30 +01:00
Stephane Nicoll
d6aab2fe84 Merge branch '2.5.x' 2021-10-19 10:51:36 +02:00
Stephane Nicoll
0f5bd90539 Add checkstyle ignore for unusual test structure 2021-10-19 10:50:21 +02:00
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
2021-09-20 14:37:44 +01:00
Andy Wilkinson
575d83737a Merge branch '2.5.x'
Closes gh-27799
2021-08-23 13:27:22 +01:00
Andy Wilkinson
e409489859 Merge branch '2.4.x' into 2.5.x
Closes gh-27798
2021-08-23 13:26:37 +01:00
Andy Wilkinson
f8ef90813f Allow @MockBean to be used with Framework's @Repeat
Fixes gh-27693
2021-08-23 12:38:15 +01:00
Scott Frederick
2178c281e9 Polish "Add network option for image building"
See gh-27486
2021-08-12 17:08:52 -05:00
Scott Frederick
a0b32251eb Split gradle test support into a separate module
See gh-25824
2021-07-16 12:52:39 -05:00
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
2021-07-08 17:02:43 -05:00
Scott Frederick
b62905b91d Merge branch '2.4.x'
Closes gh-25840
2021-05-12 15:48:59 -05:00
Scott Frederick
8ac297d6f3 Merge branch '2.3.x' into 2.4.x
Closes gh-25839
2021-05-12 14:57:40 -05:00
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
2021-05-12 14:51:45 -05:00
Phillip Webb
b5583a4620 Polish doc code samples
See gh-6313
2021-05-03 22:39:44 -07:00
Phillip Webb
9aad29da0c Extract code samples from docs
See gh-6313
2021-05-03 17:46:37 -07:00
Phillip Webb
b314d848dc Polish docs code
See gh-6313
2021-04-30 18:19:52 -07:00
Andy Wilkinson
ad968a2640 Merge branch '2.4.x'
Closes gh-26273
2021-04-28 12:28:33 +01:00
Andy Wilkinson
cf1b29ebd4 Merge branch '2.3.x' into 2.4.x
Closes gh-26272
2021-04-28 12:28:10 +01:00
dreis2211
9b1b47ae5d Rename nohttp whitelist to allowlist
See gh-26264
2021-04-28 11:39:52 +01:00
Andy Wilkinson
d1164c63f9 Merge branch '2.4.x'
Closes gh-26176
2021-04-20 15:47:50 +01:00
Andy Wilkinson
be99f386a8 Merge branch '2.3.x' into 2.4.x
Closes gh-26175
2021-04-20 15:47:38 +01:00
Andy Wilkinson
9e5f738f7a Make relative file references in checkstyle.xml more robust
Closes gh-26174
2021-04-20 15:47:08 +01:00
Andy Wilkinson
b9348c6d28 Merge branch '2.4.x'
Closes gh-26169
2021-04-20 11:26:46 +01:00
Andy Wilkinson
bc1a462143 Merge branch '2.3.x' into 2.4.x
Closes gh-26168
2021-04-20 11:19:10 +01:00
Andy Wilkinson
82198a99e0 Polish nohttp configuration
Closes gh-26166
2021-04-20 11:15:13 +01:00
Andy Wilkinson
8b5f914ba5 Revert "Merge branch '2.4.x'"
This reverts commit 97b26b4886, reversing
changes made to 6f9b1ed6a3.

See gh-25840
2021-04-07 10:20:23 +01:00
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
2021-04-07 10:19:20 +01:00
Andy Wilkinson
b35d1ec6e8 Revert "Use test harness for image building integration tests"
This reverts commit da9d8d6055.

See gh-25838
2021-04-07 09:30:51 +01:00
Scott Frederick
97b26b4886 Merge branch '2.4.x'
Closes gh-25840
2021-03-30 21:00:38 -05:00
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
2021-03-30 16:48:28 -05:00
Andy Wilkinson
9d7135f515 Relax Micrometer import control for docs examples
See gh-25762
2021-03-23 10:30:16 +00:00
Andy Wilkinson
cf7f59fe4b Merge branch '2.4.x'
Closes gh-25762
2021-03-23 10:20:44 +00:00
Andy Wilkinson
f8c1a73bf2 Prevent import of Micrometer class outside of the Actuator
Closes gh-25760
2021-03-23 10:16:42 +00:00
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
2021-03-17 17:05:04 -07:00
Phillip Webb
bea307b115 Extract code samples from docs
See gh-6313
2021-03-12 17:49:17 -08:00
Madhura Bhave
c4432a81a8 Merge branch '2.4.x'
Closes gh-25615
2021-03-12 14:03:02 -08:00
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
2021-03-12 13:56:54 -08:00
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
2021-02-03 15:47:05 -08:00
Phillip Webb
49e754f48b Merge branch '2.2.x' into 2.3.x
Closes gh-24411
2020-12-08 17:23:33 -08:00
Phillip Webb
286ef61071 Narrow auto-configure checkstyle suppressions
Closes gh-21015
2020-12-08 17:04:03 -08:00
Andy Wilkinson
2dce4aa42b Merge branch '2.2.x' into 2.3.x
Closes gh-24009
2020-11-03 14:04:08 +00:00
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
2020-11-03 13:59:38 +00:00
Phillip Webb
e12a449ed9 Merge branch '2.2.x' into 2.3.x 2020-09-21 22:32:49 -07:00
Phillip Webb
8b3728a57e Refine StringSequence checkstyle suppression
See gh-23440
2020-09-21 22:31:43 -07:00
Phillip Webb
3fca8c6b4e Merge branch '2.2.x' into 2.3.x
Closes gh-23441
2020-09-21 22:27:45 -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
Stephane Nicoll
652561c274 Review checkstyle rule to prevent non BDD mockito imports
Closes gh-20902
2020-09-01 11:50:14 +02:00
Stephane Nicoll
a149edcfd7 Merge branch '2.2.x' into 2.3.x
Closes gh-23077
2020-08-25 14:06:12 +02:00
Stephane Nicoll
066471b1d9 Merge branch '2.1.x' into 2.2.x
Closes gh-23076
2020-08-25 14:05:07 +02:00
dreis2211
7bf32e9bb1 Disallow Apache Commons Lang & Lang3 imports
See gh-23071
2020-08-25 14:03:37 +02:00
Andy Wilkinson
38db129146 Remove checkstyle config made redundant by ee758fa6
Closes gh-21473
2020-05-15 18:22:13 +01:00
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
2020-05-15 16:33:11 +01:00
Andy Wilkinson
3f56f97e03 Merge branch '2.2.x'
Closes gh-21472
2020-05-15 16:21:33 +01:00
Andy Wilkinson
4a896f2272 Merge branch '2.1.x' into 2.2.x
Closes gh-21471
2020-05-15 16:20:23 +01:00
Andy Wilkinson
fdc63d71fe Use HTTPS when linking to groovy-lang.org
Closes gh-21466
2020-05-15 16:18:23 +01:00