Commit Graph
323 Commits
Author SHA1 Message Date
Phillip Webb bcf4c32426 Call setAllowBeanDefinitionOverriding before initializer
Update initialization order in `SpringApplication` to ensure
`setAllowBeanDefinitionOverriding` is called before initializiers.

This prevents an initializer from accidentially overriding a bean.

Closes gh-50264
2026-05-04 15:47:22 -07:00
Andy Wilkinson 1a64cac622 Merge branch '4.0.x'
Closes gh-50270
2026-05-01 09:34:24 +01:00
Andy Wilkinson 065c463cef Improve nullability of TestPropertyValues
Closes gh-50269
2026-05-01 08:39:18 +01:00
Phillip Webb 2fffebe214 Reduce garbage of repeated WritableJson.toByteArray() calls
Update the default implementation of `WritableJson.toByteArray()`
to reduce the amount of garbage created from repeated calls.

Prior to this commit, each call would create a new
`ByteArrayOutputStream` and `OutputStreamWriter` to create the
byte array. Writing structured JSON results in many calls to
the `toByteArray()` method, which means we repeatedly create
and destroy the `ByteArrayOutputStream` and `OutputStreamWriter`
objects. Furthermore, both contain buffers that are often
expanded and will overlap with each other.

The updated implementation uses a custom `Appendable`
implementation that uses a single `ByteBuffer` buffer. It also
has a `ThreadLocal` cache so that repeated calls from the same
thread can reuse the buffer. The cache uses a `SoftReference`
to ensure that the JVM can reclaim space if needed (for example,
if a large JSON line was written).

Closes gh-49428
2026-04-30 12:04:39 -07:00
Stéphane Nicoll 0e2f7e2b1a Merge branch '4.0.x'
Closes gh-50234
2026-04-28 13:54:58 +02:00
Stéphane Nicoll 813913ccb8 Merge branch '3.5.x' into 4.0.x
Closes gh-50233
2026-04-28 13:54:49 +02:00
Andy Wilkinson 72cad8c97d Merge branch '4.0.x'
Closes gh-50214
2026-04-25 07:49:27 +01:00
Andy Wilkinson afc61f922c Merge branch '3.5.x' into 4.0.x
Closes gh-50213
2026-04-25 07:47:49 +01:00
Phillip Webb eac712596d Add public constructor that accepts a cause
Add a public constructor to `InvalidConfigurationPropertyValueException`
that accepts a cause.

Closes gh-50211
2026-04-24 20:10:47 -07:00
Andy Wilkinson 14c4f779c5 Merge branch '4.0.x' 2026-04-23 11:34:47 +01:00
Andy Wilkinson 98daa8ea30 Merge branch '3.5.x' into 4.0.x 2026-04-23 11:33:21 +01:00
Andy Wilkinson ca03d6d1f3 Merge branch '4.0.x'
Closes gh-50186
2026-04-23 08:55:14 +01:00
Andy Wilkinson ef8527bb0e Merge branch '3.5.x' into 4.0.x
Closes gh-50185
2026-04-23 08:55:02 +01:00
Andy Wilkinson 653f5a1c17 Merge branch '4.0.x'
Closes gh-50184
2026-04-23 08:52:28 +01:00
Andy Wilkinson 4a7bd332b6 Merge branch '3.5.x' into 4.0.x
Closes gh-50183
2026-04-23 08:52:16 +01:00
Andy Wilkinson 9a15575243 Merge branch '4.0.x'
Closes gh-50179
2026-04-23 08:48:26 +01:00
Andy Wilkinson 8e013b6f90 Merge branch '3.5.x' into 4.0.x
Closes gh-50178
2026-04-23 08:48:16 +01:00
Moritz Halbritter 02df21cc07 Polish "Add support for docker.elastic.co/elasticsearch/elasticsearch"
See gh-50119
2026-04-20 09:03:40 +02:00
itsmevichu 1b712e0434 Add support for docker.elastic.co/elasticsearch/elasticsearch
See gh-50119

Signed-off-by: itsmevichu <vishnutheep@gmail.com>
2026-04-20 08:51:50 +02:00
Phillip Webb d088519814 Merge branch '4.0.x'
Closes gh-50065
2026-04-13 15:52:31 -07:00
Phillip Webb 3cf39544c3 Merge branch '3.5.x' into 4.0.x
Closes gh-50064
2026-04-13 15:41:08 -07:00
Phillip Webb 481b972fad Merge branch '3.5.x' into 4.0.x
Closes gh-50064
2026-04-13 15:26:23 -07:00
Stéphane Nicoll 3087d96686 Merge branch '4.0.x'
Closes gh-50042
2026-04-13 09:17:36 +02:00
Stéphane Nicoll 2e7adbdef4 Merge branch '3.5.x' into 4.0.x
Closes gh-50041
2026-04-13 09:17:22 +02:00
Andy Wilkinson 767444c48e Merge branch '4.0.x'
Closes gh-50013
2026-04-10 09:56:53 +01:00
Andy Wilkinson 9fdb2db07c Merge branch '3.5.x' into 4.0.x
Closes gh-50012
2026-04-10 09:56:33 +01:00
Phillip Webb 3753b9d466 Fix additional test Timezone issue
Fix test that fails in certain timezones.

See gh-8923
2026-04-07 21:19:03 -07:00
Stéphane Nicoll 1519bcf1e2 Polish "Add support for additional Homebrew home on macOS"
See gh-49721
2026-04-03 16:19:47 +02:00
1233day 2d4c235522 Add support for additional Homebrew home on macOS
Add /opt/homebrew/bin as an additional macOS fallback location when
starting external processes.

The previous fallback assumed /usr/local/bin only, which can fail on
Apple Silicon Homebrew setups in restricted PATH environments (for
example, IDE or UI-launched processes).

Update CredentialHelperTests to verify both macOS fallback paths are
attempted.

See gh-49721

Signed-off-by: 1233day <1233day@naver.com>
2026-04-03 13:32:45 +02:00
Stéphane Nicoll 11d1498509 Polish "Enable ansi support if Windows 11 or later is detected"
See gh-49571
2026-04-03 08:54:33 +02:00
Philemon Hilscher 13c795a102 Enable ansi support if Windows 11 or later is detected
See gh-49571

Signed-off-by: Philemon Hilscher <philemon847@gmail.com>
2026-04-03 08:46:31 +02:00
Moritz Halbritter a04b65ea74 Set embeddedValueResolver on WebConversionService
Closes gh-8923
2026-04-02 08:57:22 +02:00
Stéphane Nicoll 3b471d5193 Merge branch '4.0.x' 2026-03-30 11:24:28 +02:00
Stéphane Nicoll e4c4283dce Polish
See gh-49837
2026-03-30 11:24:19 +02:00
Stéphane Nicoll 67bb931f22 Merge branch '4.0.x'
Closes gh-49819
2026-03-27 11:45:05 +01:00
Stéphane Nicoll 57a3521c45 Merge branch '3.5.x' into 4.0.x
Closes gh-49818
2026-03-27 11:44:54 +01:00
Phillip Webb 9bac152770 Merge branch '4.0.x'
Closes gh-49737
2026-03-24 17:39:47 -07:00
Phillip Webb e8ec285fd5 Merge branch '3.5.x' into 4.0.x
Closes gh-49736
2026-03-24 17:39:33 -07:00
Phillip Webb da3fd5cf53 Merge branch '4.0.x'
Closes gh-49732
2026-03-24 13:43:06 -07:00
Phillip Webb 4694f6fa6a Merge branch '3.5.x' into 4.0.x
Closes gh-49731
2026-03-24 13:38:12 -07:00
Stéphane Nicoll 3a38f0039b Merge branch '4.0.x'
Closes gh-49728
2026-03-24 10:29:45 +01:00
Stéphane Nicoll a96bfd6a0b Merge branch '3.5.x' into 4.0.x
Closes gh-49727
2026-03-24 10:29:30 +01:00
Phillip Webb eff95e98a5 Merge branch '4.0.x'
Closes gh-49698
2026-03-21 14:23:13 -07:00
Phillip Webb e464348fa4 Merge branch '3.5.x' into 4.0.x
Closes gh-49697
2026-03-21 14:22:46 -07:00
Andy Wilkinson b2631fbe42 Merge branch '4.0.x'
Closes gh-49669
2026-03-19 18:33:16 +00:00
Andy Wilkinson 01170c3273 Merge branch '3.5.x' into 4.0.x
Closes gh-49668
2026-03-19 18:30:47 +00:00
Yanming Zhou 4418c451f3 Fix typo
See gh-49635

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2026-03-18 08:24:53 +01:00
Phillip Webb 79261acd30 Support empty property defaults binding without parameters
Refine empty property default binding support to include no-arg
constructors.

See gh-48920
2026-03-17 19:59:07 -07:00
Phillip Webb 55eba139ec Support binding of default properties when an empty property is defined
Update the `Binder` so that empty properties are treated as an indicator
that default value binding should be attempted. This update allow bound
objects to differentiate between a completely missing property vs one
that is present but doesn't have any values.

For example, given the following value object:

	@ConfigurationProperties("my")
	public record My(Name name, int age) {

		public record Name(String first, String last) {
		}

	}

The following binding scenarios are supported:

1) Full binding

	my.name.first=Spring
	my.name.last=Boot
	my.age=4

Binds to `new My(new Name("Spring", "Boot"), 4)`
(works the same as Spring Boot 4.0)

2) Missing Properties

	my.age=4

Binds to `new My(null, 4)`
(works the same as Spring Boot 4.0)

3) Default Properties

	my.name=
	my.age=4

Binds to `new My(new Name(null, null), 4)`
(previously would throw a converter exception)

Closes gh-48920
2026-03-17 11:37:51 -07:00
Andy Wilkinson 29e4938971 Polish "Add more styling support to the Logback and Log4j2 color converters"
See gh-49285
2026-03-12 09:27:04 +00:00