Commit Graph
71 Commits
Author SHA1 Message Date
Phillip Webb ab8d5266fb Merge branch '4.1.x'
Closes gh-51898
2026-09-28 14:20:27 -07:00
Phillip Webb a5bc294685 Merge branch '4.0.x' into 4.1.x
Closes gh-51897
2026-09-28 14:20:12 -07:00
Phillip Webb 7a871ff117 Polish 'Use instanceof pattern matching to avoid an explicit cast'
See gh-51896
2026-09-28 14:18:55 -07:00
Tran Ngoc Nhan 68c321499a Use instanceof pattern matching to avoid an explicit cast
See gh-51896

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2026-09-28 14:18:41 -07:00
Stéphane Nicoll 5f790ed584 Merge branch '4.1.x'
Closes gh-51891
2026-09-28 13:16:42 +02:00
Stéphane Nicoll 3af085d914 Merge branch '4.0.x' into 4.1.x
Closes gh-51890
2026-09-28 13:16:33 +02:00
Stéphane Nicoll e3805a9601 Polish contribution
See gh-51872
2026-09-28 13:08:02 +02:00
Kosuke Yanagihara f0987da4bb Back off DevTools' JDBC and R2DBC support when modules are missing
DevToolsDataSourceAutoConfiguration and DevToolsR2dbcAutoConfiguration
were only guarded by classes from the JDK and r2dbc-spi respectively.
When a single user-defined DataSource or ConnectionFactory bean was
present, their conditions went on to reference classes from
spring-boot-jdbc or spring-boot-r2dbc. Both are optional dependencies
of spring-boot-devtools, so startup failed with a NoClassDefFoundError
when they were absent.

This commit adds a class from each module to the class conditions.
Without the modules the conditions could never match, so this only
turns the failure into a back-off.

See gh-51872

Signed-off-by: Kosuke Yanagihara <11373191+ksky8864@users.noreply.github.com>
2026-09-28 12:44:47 +02:00
Stéphane Nicoll 097319ecf9 Polish "Check resource existence once when looking for deleted files"
See gh-51841
2026-09-28 09:40:24 +02:00
DongHoon Lee 5c2ad14f50 Check resource existence once when looking for deleted files
ClassLoaderFilesResourcePatternResolver.isDeleted() calls
resource.exists() and resource.getURI() inside the loop over the
uploaded files, so both are repeated once per DELETED entry although
neither depends on the entry. Every resource lookup made while the
application context is being built goes through this method - about
1300 times per restart in the application I measured - so a session
that has accumulated 100 deleted files performs around 130 000 file
system lookups where 1300 are enough.

This commit hoists both calls out of the loop: the resource is
inspected at most once per call, on the first DELETED entry, and the
URI comparison then uses the cached value. The method still returns on
the first match and still reports a failing getURI() as an
IllegalStateException, so behaviour is unchanged.

The loop now walks the per-directory entry sets, which is what
ClassLoaderFiles.addAll() and RestartServer already do, instead of the
flattened view added in gh-46289. That view is wrapped in
Collections.unmodifiableSet(), whose iterator is shared JDK code; in a
running application its delegate calls are megamorphic and C2 stops
inlining them, which made restarts with many accumulated files and no
deletions slower than before gh-46289. isDeleted() returns a boolean,
so the visiting order of the entries cannot change its result.

Measured on a Spring Boot application driven through the remote restart
path (restart request to ApplicationReadyEvent), 12 JVMs per variant
and 20 restarts per JVM, medians:

  100 source directories, 10 000 entries, 10 deleted:  278 ms -> 200 ms
  100 source directories, 10 000 entries, 100 deleted: 891 ms -> 201 ms
  100 source directories, 10 000 entries, 500 deleted: 3536 ms -> 200 ms
  100 source directories, 50 000 entries, none deleted: 431 ms -> 341 ms
  100 source directories, 10 000 entries, none deleted: 202 ms -> 192 ms
  no uploaded files:                                   150 ms -> 148 ms

See gh-51841

Signed-off-by: DongHoon Lee <dhl1924@naver.com>
2026-09-28 09:26:41 +02:00
Andy Wilkinson bc72f228c3 Merge branch '4.1.x'
Closes gh-51764
2026-09-15 13:03:19 +01:00
Andy Wilkinson 7612f4a222 Merge branch '4.0.x' into 4.1.x
Closes gh-51763
2026-09-15 13:03:03 +01:00
Hyunwoo Jung ed63da9f5d Fix duplicated tests
Signed-off-by: Hyunwoo Jung <hyunwoojung@kakao.com>

See gh-51722
2026-09-15 12:48:22 +01:00
Stéphane Nicoll 4bc86fedc4 Merge branch '4.1.x'
Closes gh-51731
2026-09-14 11:42:22 +02:00
Stéphane Nicoll cd6efbd910 Merge branch '4.0.x' into 4.1.x
Closes gh-51730
2026-09-14 11:42:14 +02:00
Stéphane Nicoll 5c799bc0cf Polish "Fix detection of reactive web environments in DevTools"
See gh-51708
2026-09-14 11:34:05 +02:00
ohchanKyu f5b563934a Fix detection of reactive web environments in DevTools
DevToolsPropertyDefaultsPostProcessor looked for
ConfigurableReactiveWebEnvironment
in org.springframework.boot.web.reactive.context by name, but the class
moved to org.springframework.boot.web.context.reactive in 4.0. As a
result, reactive web applications were never identified as web
applications and the hint about setting logging.level.web to DEBUG was
not logged for them.

ConfigurableReactiveWebEnvironment is part of spring-boot, so it is now
referenced directly rather than by name. The servlet environment check
is unchanged as spring-web is an optional dependency.

See gh-51708

Signed-off-by: ohchanKyu <okc0202@naver.com>
2026-09-14 11:09:40 +02:00
Andy Wilkinson 57b44b0594 Merge branch '4.1.x'
Closes gh-51600
2026-09-07 08:27:14 +01:00
Andy Wilkinson ea613dc511 Merge branch '4.0.x' into 4.1.x
Closes gh-51599
2026-09-07 08:26:42 +01:00
Manu Sridharan 25a3f8feb9 Remove unnecessary NullAway suppressions
Signed-off-by: Manu Sridharan <msridhar@gmail.com>

See gh-51591
2026-09-07 08:18:11 +01:00
Phillip Webb ef4f1404a1 Merge branch '4.1.x'
Closes gh-51455
2026-08-25 14:19:47 -07:00
Phillip Webb 914f39384c Merge branch '4.0.x' into 4.1.x
Closes gh-51454
2026-08-25 14:07:23 -07:00
Phillip Webb 5a21e0d698 Upgrade to spring-javaformat 0.0.48
Closes gh-51452
2026-08-25 13:58:58 -07:00
Brian Clozel c06abc12ac Replace TestRestTemplate with RestTestClient in module tests
Before deprecating `TestRestTemplate`, we must first stop using it in
module tests and replace it with:
* `RestTestClient` when the Spring MVC infrastructure is present
* `RestClient` when the test does not have Spring MVC on classpath

See gh-46632
2026-07-27 16:13:10 +02:00
Stéphane Nicoll 3959c56bdd Deprecate RestTemplate support
With Spring Framework 7.1 deprecating RestTemplate for removal, this
commit deprecates our supporting infrastructure as well, and steers
users towards RestClient instead:

* RestTemplateAutoConfiguration and
  RestTemplateObservationAutoConfiguration
* RestTemplateBuilder, RestTemplateBuilderConfigurer, and
  RestTemplateBuilderClientHttpRequestInitializer
* RestTemplateCustomizer, RestTemplateRequestCustomizer, and
  ObservationRestTemplateCustomizer
* MockRestServiceServerAutoConfiguration,
  MockServerRestTemplateCustomizer, and RootUriRequestExpectationManager
  in the test support module

The reference documentation no longer covers RestTemplate and now
solely documents RestClient and WebClient. Code snippets and sample
tests that only existed to illustrate RestTemplate usage have been
removed accordingly.

Closes gh-51118
2026-07-25 08:32:32 +02:00
Stéphane Nicoll 9821dade80 Merge branch '4.0.x' into 4.1.x
Closes gh-51121
2026-07-24 15:19:14 +02:00
Stéphane Nicoll b9ebff0084 Use RestClient in tests and infrastructure code
Closes gh-51120
2026-07-24 15:10:43 +02:00
Stéphane Nicoll bce125b7ec Merge branch '4.0.x' into 4.1.x
Closes gh-51087
2026-07-21 14:51:51 +02:00
Manu Sridharan 428806d71f Adapt to improvements in Nullaway 0.13.8
This commit adapts @Nullable when calling Map#remove as it correctly
handles nullability.

See gh-50972

Signed-off-by: Manu Sridharan <msridhar@gmail.com>
2026-07-21 14:45:29 +02:00
Stéphane Nicoll a243d230b3 Merge branch '4.0.x'
Closes gh-50497
2026-05-25 17:09:28 +02:00
Stéphane Nicoll 8e337c5ddc Merge branch '3.5.x' into 4.0.x
Closes gh-50496
2026-05-25 17:09:13 +02:00
Andy Wilkinson 6a74bb85a3 Merge branch '4.0.x'
Closes gh-50440
2026-05-14 15:03:44 +01:00
Andy Wilkinson add52b6ccd Merge branch '3.5.x' into 4.0.x
Closes gh-50439
2026-05-14 15:02:24 +01:00
Andy Wilkinson c5969670d1 Merge branch '4.0.x'
Closes gh-50275
2026-05-01 11:45:42 +01:00
Andy Wilkinson 5628644848 Merge branch '3.5.x' into 4.0.x
Closes gh-50274
2026-05-01 11:41:12 +01:00
Andy Wilkinson 7a4d9e4cdb Merge branch '4.0.x'
Closes gh-50177
2026-04-23 08:46:21 +01:00
Andy Wilkinson fd70564879 Merge branch '3.5.x' into 4.0.x
Closes gh-50176
2026-04-23 08:45:56 +01:00
Andy Wilkinson 0277a4fad5 Merge branch '4.0.x'
Closes gh-50163
2026-04-22 21:07:54 +01:00
Andy Wilkinson ad25c28b6d Merge branch '3.5.x' into 4.0.x
Closes gh-50162
2026-04-22 20:51:26 +01:00
Stéphane Nicoll 02f3dba12b Merge branch '4.0.x' 2026-03-26 16:08:01 +01:00
Stéphane Nicoll 9105b64025 Merge branch '3.5.x' into 4.0.x 2026-03-26 16:07:44 +01:00
Stéphane Nicoll d413cc93ec Merge branch '4.0.x'
Closes gh-49748
2026-03-25 07:34:24 +01:00
Stéphane Nicoll 6b53de850d Merge branch '3.5.x' into 4.0.x
Closes gh-49747
2026-03-25 07:34:12 +01:00
Brian Clozel 8018829ff5 Deprecate LiveReload support for removal
Closes gh-48971
2026-02-26 14:22:02 +01:00
Andy Wilkinson 3d6671d47a Merge branch '4.0.x'
Closes gh-48701
2026-01-08 12:14:50 +00:00
Andy Wilkinson 0ffffee4bf Upgrade to Nullability Plugin 0.0.9
Closes gh-48638
2026-01-08 11:59:51 +00:00
Stéphane Nicoll 12652a313e Deprecate Derby support since Apache Derby is retired
Closes gh-48567
2025-12-30 17:36:53 +01:00
Andy Wilkinson 3becdc7d47 Move server.error properties to spring.web.error
Closes gh-48201
2025-11-20 11:55:23 +00:00
Stéphane Nicoll d1e5fe3248 Merge branch '3.5.x'
Closes gh-48106
2025-11-13 10:31:25 +01:00
Stéphane Nicoll 96457f4665 Merge branch '3.5.x'
Closes gh-47996
2025-11-09 12:16:47 +01:00