Commit Graph

405 Commits

Author SHA1 Message Date
Phillip Webb
17df773913 Reduce number of test dependencies
Reduce the number of direct test dependencies and instead rely on
transitive test support dependencies.
2025-06-13 20:06:16 -07:00
Phillip Webb
106d30a1a6 Merge branch 'main' into 4.0.x 2025-05-20 17:21:08 -07:00
Andy Wilkinson
0b12cebff4 Fix warnings reported in Eclipse 2025-05-14 11:37:07 +01:00
Stéphane Nicoll
b3f35baed3 Add metadata support for types in arbitrary modules
Previously, if a ConfigurationProperties had a nested type or was
extending from a type located outside the compilation unit, no
metadata discovered on the source code was available (documentation and
explicit default value, if any). This typically happens when such a type
resides in another module.

This commit introduces `@ConfigurationPropertiesSource` as a way to
annotate such type and have metadata generated for them in their own
module.

Type-metadata is generated as one file per type and is reused
transparently whenever that type is used. As for module metadata, an
additional file can be crafted manually and will be merged when the
metadata for the type is generated.

The following is an example structure with two types where one has
an additional metadata:

META-iNF/
  spring/
    configuration-properties/
      additional/
        com.example.SourceOne.json
      com.example.SourceOne.json
      com.example.SourceTwo.json

Those files are used only by the annotation processor and are not meant
to be public API.

See gh-18366
2025-05-13 13:42:55 +02:00
Phillip Webb
36fb1e9b4b Replace Actuator @Nullable with @OptionalParameter
Closes gh-45389
2025-05-09 17:38:12 -07:00
Stéphane Nicoll
6fceab2c90 Replace spring-jcl with vanilla commons-logging
See gh-45487

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2025-05-09 17:38:11 -07:00
Andy Wilkinson
6e2049eb92 Compile project with Java 24 and '-release' Java 17
Closes gh-45472
2025-05-09 17:38:08 -07:00
Stéphane Nicoll
9d9b6f11c5 Merge branch '3.4.x'
Closes gh-45384
2025-05-07 10:38:28 +02:00
Stéphane Nicoll
e900e6f739 Merge branch '3.3.x' into 3.4.x
Closes gh-45383
2025-05-07 10:38:20 +02:00
Stéphane Nicoll
88107273f3 Polish "Test that source information is resolved from super class"
See gh-45382
2025-05-07 10:36:56 +02:00
Yanming Zhou
91715a8c7d Test that source information is resolved from super class
See gh-45382

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-05-07 10:36:41 +02:00
Phillip Webb
70e11de647 Merge branch '3.4.x'
Closes gh-45040
2025-04-08 15:09:38 -07:00
Phillip Webb
e29dc450a6 Merge branch '3.3.x' into 3.4.x
Closes gh-45039
2025-04-08 15:09:25 -07:00
Phillip Webb
46b14de6e9 Polish 'Handle generics with identical names in different positions'
See gh-45011
2025-04-08 15:07:51 -07:00
Dmytro Nosan
e24fd50615 Handle generics with identical names in different positions
Update `TypeUtils` to handle generics with identical names in different
positions.

See gh-45011

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-04-08 15:05:42 -07:00
Tran Ngoc Nhan
28bbb3ee10 Remove RECORD_COMPONENT target from @DefaultValue
See gh-44984

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-04-07 08:41:17 +02:00
Johnny Lim
a39e1c4a09 Polish
Signed-off-by: Johnny Lim <izeye@naver.com>

See gh-44034
2025-01-31 17:04:58 +01:00
Moritz Halbritter
f24ba9935c Add ability to ignore configuration properties
Properties which should be ignored can be specified in the
additional-spring-configuration-metadata.json file. The ignored
properties section is copied into the final
spring-configuration-metadata.json file, and the ignored properties are
removed from the properties element in the final file.

Closes gh-2421
2025-01-28 11:09:26 +01:00
Phillip Webb
8ec61b9870 Polish 'Refactor @ConfigurationProperties that only use prefix'
See gh-43917
2025-01-24 14:59:32 -08:00
Yanming Zhou
c1d97ffe16 Refactor @ConfigurationProperties that only use prefix
See gh-43917

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-01-24 14:58:36 -08:00
Johnny Lim
4d15ee5bf0 Polish
See gh-43498
2024-12-13 13:29:20 -08:00
Andy Wilkinson
7a4b7f95e8 Merge branch '3.3.x'
Closes gh-43061
2024-11-07 12:38:51 +00:00
Andy Wilkinson
32c61a99e4 Merge branch '3.2.x' into 3.3.x
Closes gh-43060
2024-11-07 12:38:36 +00:00
Andy Wilkinson
03a3425767 Fix test for incremental build with type rename
Closes gh-38119
2024-11-07 12:38:03 +00:00
Stéphane Nicoll
e5ec38074b Merge branch '3.3.x'
Closes gh-42917
2024-10-29 13:39:31 +09:00
Stéphane Nicoll
5fcc585178 Merge branch '3.2.x' into 3.3.x
Closes gh-42916
2024-10-29 13:39:23 +09:00
Stéphane Nicoll
eba7a5a077 Update copyright year of changed files
See gh-42901
2024-10-29 13:35:35 +09:00
Tran Ngoc Nhan
ff855d9421 Remove redundant null check
See gh-42901
2024-10-29 13:33:55 +09:00
Tran Ngoc Nhan
fcbf6b0200 Polish
See gh-42798
2024-10-21 13:23:42 +02:00
Andy Wilkinson
25082d33e7 Provide more control over access to endpoint operations
This commit reworks the support for enabling and disabling endpoints,
replacing the on/off support that it provided with a finer-grained
access model that supports only allowing read-only access to endpoint
operations in addition to disabling an endpoint (access of none) and
fully enabling it (access of unrestricted).

The following properties are deprecated:

- management.endpoints.enabled-by-default
- management.endpoint.<id>.enabled

Their replacements are:

- management.endpoints.access.default
- management.endpoint.<id>.access

Similarly, the enableByDefault attribute on @Endpoint has been
deprecated with a new defaultAccess attribute replacing it.

Additionally, a new property has been introduced that allows an
operator to control the level of access to Actuator endpoints
that is permitted:

- management.endpoints.access.max-permitted

This property caps any access that may has been configured for
an endpoint. For example, if
management.endpoints.access.max-permitted is set to read-only and
management.endpoint.loggers.access is set to unrestricted, only
read-only access to the loggers endpoint will be allowed.

Closes gh-39046
2024-10-17 13:56:44 +01:00
Phillip Webb
7b3077280c Merge branch '3.3.x'
Closes gh-42441
2024-09-24 14:32:48 -07:00
Phillip Webb
100bedc07d Merge branch '3.2.x' into 3.3.x
Closes gh-42440
2024-09-24 14:29:09 -07:00
Phillip Webb
ad72411e2b Apply conventions plugin to all subprojects
Closes gh-42438
2024-09-24 14:26:32 -07:00
Stéphane Nicoll
00440b982c Merge branch '3.3.x'
Closes gh-42321
2024-09-16 09:04:19 +02:00
Stéphane Nicoll
437ff754ef Merge branch '3.2.x' into 3.3.x
Closes gh-42320
2024-09-16 09:04:07 +02:00
Stéphane Nicoll
242803d59b Polish "Replace Configuration fully qualified name by constant"
See gh-42311
2024-09-16 09:01:36 +02:00
mushroom528
9bcfc72307 Replace Configuration fully qualified name by constant
See gh-42311
2024-09-16 09:01:23 +02:00
Phillip Webb
450e31b42e Merge branch '3.3.x' 2024-08-19 16:47:31 -07:00
Phillip Webb
1d337b7c76 Merge branch '3.2.x' into 3.3.x 2024-08-19 16:46:51 -07:00
Phillip Webb
f1987e6f8b Update copyright year of changed files 2024-08-19 16:45:34 -07:00
Moritz Halbritter
46150bae89 Merge branch '3.3.x'
Closes gh-41858
2024-08-14 17:20:59 +02:00
Moritz Halbritter
2a84fe5760 Merge branch '3.2.x' into 3.3.x
Closes gh-41857
2024-08-14 16:47:52 +02:00
Moritz Halbritter
1d45016d8c Upgrade to spring-javaformat 0.0.43
Closes gh-41853
2024-08-14 16:32:41 +02:00
Stéphane Nicoll
477bd7d15a Detect default enum value
This commit improves the configuration metadata annotation processor to
detect a default enum value. The algorithm is best-effort, similarly to
what it already does for well known prefixes (period, duration, etc).

Based on an expression and an identifier, the default value is inferred
if the expression matches the declaration of the property type.

See gh-7562
2024-08-01 15:43:21 +02:00
Andy Wilkinson
e201b94d4f Merge branch '3.3.x'
Closes gh-41616
2024-07-25 16:17:52 +01:00
Andy Wilkinson
c642f6d268 Merge branch '3.2.x' into 3.3.x
Closes gh-41613
2024-07-25 16:16:35 +01:00
Andy Wilkinson
5f666eec5b Reduce warnings reported by Eclipse
Closes gh-41598
2024-07-25 14:55:00 +01:00
Andy Wilkinson
23b344691d Polish "Support @Name with JavaBean-based configuration properties"
See gh-39452
2024-07-23 14:00:20 +01:00
Phillip Webb
000600c68a Merge branch '3.3.x' 2024-07-22 18:41:53 +01:00
Phillip Webb
d9360a034f Polish 2024-07-22 18:41:12 +01:00