Commit Graph

331 Commits (882e29dc7fd870d0990b31cb02d591329a5efb86)

Author SHA1 Message Date
Phillip Webb 7fc9debf2a Consider super classes when detecting nested property classes
Update `PropertyDescriptor.isParentTheSame` to consider the candidate
as well as all super classes.

Fixes gh-21626
2 years ago
dreis2211 5db04da275 Use pattern matching for instanceof where appropriate
See gh-31475
2 years ago
Andy Wilkinson d354c03e63 Merge branch '2.7.x'
Closes gh-31191
3 years ago
Andy Wilkinson 682ac53f32 Ensure that config processor runs with only AutoConfiguration
Fixes gh-31186
3 years ago
Phillip Webb ea41e89c6c Merge branch '2.5.x' into 2.6.x 3 years ago
Andy Wilkinson 541ab69aff Merge branch '2.7.x' 3 years ago
Andy Wilkinson 4cd850cfc0 Merge branch '2.6.x' into 2.7.x
Closes gh-30851
3 years ago
Andy Wilkinson fa327a783d Merge branch '2.5.x' into 2.6.x
Closes gh-30850
3 years ago
Andy Wilkinson 4fd2e0c916 Polish "Fix typos"
See gh-30773
3 years ago
Andy Wilkinson f6d24dc1a8 Fix typos
See gh-30773
3 years ago
Phillip Webb 7a6ca8ce25 Merge branch '2.7.x' 3 years ago
Phillip Webb dd5696b59b Update copyright year of changed files 3 years ago
dreis2211 a63e730136 Remove unused private methods
See gh-30655
3 years ago
Andy Wilkinson fbb060e0fe Polish
See 5d8c1d9bd7.
3 years ago
Andy Wilkinson 5d8c1d9bd7 Merge branch '2.7.x' 3 years ago
Andy Wilkinson 8f985474a6 Merge branch '2.5.x' into 2.6.x
Closes gh-30465
3 years ago
Andy Wilkinson d574563616 Document @ConstructorBinding and @DefaultValue with records
Closes gh-30460
3 years ago
Andy Wilkinson e9d2ec507e Merge branch '2.7.x' 3 years ago
Andy Wilkinson 5ee3fdab77 Polish "Allow @DefaultValue to be used on record components"
See gh-29010
3 years ago
Pavel Anisimov 976ed90cd7 Allow @DefaultValue to be used on record components
See gh-29010
3 years ago
Andy Wilkinson 89b2015adf Merge branch '2.7.x' 3 years ago
Andy Wilkinson 3630952f7b Merge branch '2.5.x' into 2.6.x
Closes gh-30022
3 years ago
Andy Wilkinson a265f150ac Improve parsing of numeric default values
Previously, all integral numbers were parsed as integers. This
caused two problems:

1. Compilation would fail if the default value for a long wasn't a
   valid integer.
2. The default value for a byte or short could be out of range,
   resulting in the generation of invalid metadata and an error
   that could have been caught at compile time not being caught
   until runtime.

This commit updates the parsing of all numeric values to use the
parse method of the target primitive type. For example,
Short.parseShort(String) is now used to parse a short.

Fixes gh-30020
3 years ago
Madhura Bhave bf1ed5f2f8 Update copyright header on changed files 3 years ago
Madhura Bhave 44b88cc88c Allow @ConstructorBinding to be optional
This commit makes @ConstructorBinding optional for a type
that has a single parameterized constructor. An @Autowired annotation
on any of the constructors indicates that the type should not be constructor
bound.

Since @ConstructorBinding is now deduced for a single parameterized constructor,
the annotation is no longer needed at the type level.

Closes gh-23216
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
Phillip Webb beb68671bb Update copyright year of changed files 3 years ago
Andy Wilkinson 2a342ef416 Merge branch '2.5.x'
Closes gh-28662
3 years ago
Andy Wilkinson 5e4a502b2d Merge branch '2.4.x' into 2.5.x
Closes gh-28661
3 years ago
Andy Wilkinson 2cec3971d7 Prohibit unwanted dependencies in all modules not just starters
Closes gh-28658
3 years ago
Phillip Webb e25f216eab Merge branch '2.5.x'
Closes gh-28425
3 years ago
Phillip Webb daf36dff55 Merge branch '2.4.x' into 2.5.x
Closes gh-28424
3 years ago
Phillip Webb 2f6651c3cb Don't use markdown syntax in javadoc or error messages
Closes gh-28408
3 years ago
dreis2211 cf0fcafd13 Polish
See gh-27940
3 years ago
Andy Wilkinson fd2fbcb3c6 Merge branch '2.5.x'
Closes gh-27758
3 years ago
Andy Wilkinson 6d8ba3e8b1 Merge branch '2.4.x' into 2.5.x
Closes gh-27757
3 years ago
Andy Wilkinson ffbd28b60a Polish "Polish access modifiers for test classes"
See gh-27736
3 years ago
Andy Wilkinson 681df90d33 Generate metadata for records using implicit constructor binding
Closes gh-27216
3 years ago
Andy Wilkinson 37f690323f Polish
Closes gh-27432
3 years ago
Stephane Nicoll 69c2621a14 Polish "Add support for @Value annotation"
See gh-26337
3 years ago
Mark Jeffrey 14d86034a1 Add support for @Value annotation
This commit adds support for `@Value` from project Lombok for metadata
generation. This is very similar to the existing `@Data` support.

See gh-26337
3 years ago
weixsun 8a2be288a3 Remove unnecessary throws declaration in tests
See gh-26441
4 years ago
Stephane Nicoll 52994027f4 Fix checkstyle violation 4 years ago
Stephane Nicoll 7465eb0f03 Merge branch '2.4.x' 4 years ago
Stephane Nicoll 85e1cc4d65 Fix checkstyle violation 4 years ago
Stephane Nicoll 09ae65e3b7 Merge branch '2.4.x'
Closes gh-26277
4 years ago
Stephane Nicoll 05b09907e0 Merge branch '2.3.x' into 2.4.x
Closes gh-26275
4 years ago
Stephane Nicoll d610f3c2ff Polish "Fix ordering of metadata entries"
See gh-26230
4 years ago
Dmitry Pavlov 3e34b0a60a Fix ordering of metadata entries
This commit provides a consistent ordering for groups that share the
same configuration property prefix.

See gh-26230
4 years ago
Stephane Nicoll 9e3c3b73ac Merge branch '2.4.x' 4 years ago
Stephane Nicoll d98fe36b88 Merge branch '2.3.x' into 2.4.x 4 years ago
Stephane Nicoll 20da9826cc Disable incrementalBuildTypeRenamed test
This commit disables a test that does not test what it is supposed to
and improve the Metadata assertions to fail early if more than one
matching item by name and type is found in the metadata.

See gh-26271
4 years ago
Andy Wilkinson 340893747b Merge branch '2.4.x'
Closes gh-25799
4 years ago
Andy Wilkinson af7e4e211c Support all known endpoint types
Previously, the configuration metadata annotation processor only
declared support for `@Endpoint` and none of the other more
specialized `@…Endpoint` annotations that are meta-annotated with
`@Endpoint` such as `@WebEndpoint` and `@JmxEndpoint. This would
result in missing metadata if a full or incremental build only
compiled classes annotated with one of the more specialized
`@…Endpoint` annotations as the annotation processor would not be
called.

This commit updates the processor's supported annotation types to
include every known `@…Endpoint` annotation. The test processor has
also been similarly updated to align its behaviour with that of the
main processor.

Fixes gh-25388
4 years ago
Andy Wilkinson db781a0d84 Merge branch '2.4.x'
See gh-25077
4 years ago
Andy Wilkinson 788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
4 years ago
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
4 years ago
Phillip Webb d8b6960997 Merge branch '2.4.x'
Closes gh-25077
4 years ago
Phillip Webb 257608a3a3 Merge branch '2.3.x' into 2.4.x
Closes gh-25076
4 years ago
Phillip Webb 939b5dfc26 Add junit-platform-launcher dependency
Update `build.gradle` files to ensure that `junit-platform-launcher` is
a `testRuntimeOnly` dependency. This ensures that tests can be run from
Eclipse.

Closes gh-25074
4 years ago
Marten Deinum 5121ca5d17 Reduce the overhead of char[] creation
See gh-24204
4 years ago
Stephane Nicoll 946be4eab6 Merge branch '2.3.x'
Closes gh-24059
4 years ago
Stephane Nicoll 4a8646bd09 Merge branch '2.2.x' into 2.3.x
Closes gh-24058
4 years ago
Stephane Nicoll 59ea7c11f6 Use most specific getter when generating metadata
This commit makes sure to use the most specific getter if more than
one candidate exists.

Closes gh-24002
4 years ago
izeye 9c35cd41ad Polish
See gh-23986
4 years ago
Phillip Webb a41ff4dfab Merge branch '2.3.x' 4 years ago
Phillip Webb b0c2687aa9 Update copyright year of changed files 4 years ago
Andy Wilkinson 5642dc6d13 Merge branch '2.3.x'
Closes gh-23970
4 years ago
Andy Wilkinson 70d9602b3f Merge branch '2.2.x' into 2.3.x
Closes gh-23969
4 years ago
Andy Wilkinson e7eb7739dc Use overriding rather than overridden getter methods in config prop AP
Fixes gh-23966
4 years ago
Phillip Webb 74e06e8e6a Refine MetadataCollector logic
Update `MetadataCollector` merge logic so that previous items are no
longer added if the current round contains a property of the same name.

Fixes gh-23916
4 years ago
Phillip Webb 23e5fd798c Merge branch '2.3.x'
Closes gh-23960
4 years ago
Phillip Webb b86dcbec72 Merge branch '2.2.x' into 2.3.x
Closes gh-23959
4 years ago
Phillip Webb cf09451ffb Retain inner-class data on incremental compile
Ensure that metadata sourced from inner-types is not deleted when
performing an incremental compile. Prior to this commit, the source
type was searched using the `Outer$Inner` format. This is not supported
`Elements.getTypeElement` so we now convert the names to `Outer.Inner`.

Closes gh-10886
4 years ago
Stephane Nicoll 1296b4dfe6 Revert "Support constructor binding on 3rd party classes"
This commit reverts the support of constructor binding on 3rd party
classes using @ImportConfigurationPropertiesBean

See gh-23172

Closes gh-23593
4 years ago
Andy Wilkinson c82581171d Trigger configuration properties annotation processsor on `@Endpoint`
We generate metadata for `@Endpoint` annotated types so the annotation
processor need to indicate that it supports the endpoint annotation.

See gh-23580
4 years ago
Andy Wilkinson 1924aad07c Limit supported annotations to `@ConfigurationProperties` and `@Configuration`
Previously, the configuration property annotation processor declared
that it supported all annotation types. This hurt performance and
prevented incremental builds with Gradle when compiling source code
containing source-retention annotations.

This commit updates its supported annotation types to be only
`@ConfigurationProperties` and `@Configuration`. The latter is declared
to allow binding third-party classes returned from a `@Bean` method.

Fixes gh-23580
4 years ago
Stephane Nicoll 5feaf2bc1a Polish "Polish empty string checks"
See gh-23550
4 years ago
Santhoshkumar. P 5cb07e292d Polish empty string checks
See gh-23550
4 years ago
Phillip Webb 5f49d4a8d7 Rename @ConfigurationPropertiesImport
Rename `@ConfigurationPropertiesImport` to
`@ImportAsConfigurationPropertiesBean` and also refine the registrar
so that it can be used with type directly annotated with
`@ConfigurationProperties`.

Closes gh-23172
4 years ago
Phillip Webb c857a743a0 Rename @ImportConfigurationPropertiesBean
Rename `@ImportConfigurationPropertiesBean` to
`@ConfigurationPropertiesImport`.

Closes gh-23172
4 years ago
dreis2211 be56cac2bb Note starters' and annotation processors' jar type in their manifest
See gh-22203
4 years ago
Phillip Webb f260c77fe3 Add @ImportConfigurationPropertiesBean support
Add repeatable `@ImportConfigurationPropertiesBean` annotation that can
be used to import types and treat them as `@ConfigurationProperties`
beans. This annotation is specifically designed to support third-party
classes that can't contain any Spring annotations.

Closes gh-23172
4 years ago
Andy Wilkinson 56ded38f5d Generate default values from Duration and Period .ZERO
Closes gh-23082
4 years ago
Stephane Nicoll dac63fc3e5 Polish 4 years ago
Phillip Webb 33b48c8bac Add @Name support to the annotation processor
Update the `ConfigurationMetadataAnnotationProcessor` so that `@Name`
annotated parameters generate the correct meta-data.

Closes gh-22492
4 years ago
Andy Wilkinson 62aa8ce107 Support incremental annotation processing with Gradle
Closes gh-22150
4 years ago
Phillip Webb 82ed255bb1 Merge branch '2.3.x'
Closes gh-22060
4 years ago
Phillip Webb 9843888714 Merge branch '2.2.x' into 2.3.x
Closes gh-22059
4 years ago
Phillip Webb 3b3a49db1f Polish 'Fix infinite loop in FieldValues'
See gh-22040
4 years ago
Konrado85 39a853c57b Fix infinite loop in FieldValues
Update `FieldValues` test object so that it doesn't cause an infinite
loop if it is actually created.

See gh-22040
4 years ago
Andy Wilkinson 47874d8c6a Treat warnings as errors when compiling
See gh-21271
4 years ago
Phillip Webb 0a05b4c9fd Update copyright year of changed files 5 years ago
Phillip Webb 5ae623c43a Polish 'Add Period converter support'
Polish period converter support, primarily by changing
`PeriodStyle` to parse and print periods that include
more than one unit.

See gh-21136
5 years ago
Grubhart dc4d71f91e Add Period converter support
Add converter support for `javax.time.Period` including:

	String -> Period
	Number -> Period
	Period -> String

Period to Number conversion is not supported since `Period` has no
ability to deduce the number of calendar days in the period.

See gh-21136
5 years ago
Phillip Webb ad1248e4ec Replace "folder" with "directory"
Consistently use the term "directory" instead of "folder"

Closes gh-21218
5 years ago
Phillip Webb bf41da5322 Update copyright year of changed files 5 years ago
Stephane Nicoll 692885f71e Merge branch '2.2.x'
Closes gh-21049
5 years ago
Stephane Nicoll 8cbd7f5cd0 Polish "Add support for initializing nested object when nothing bound"
This commit harmonizes the change made to @DefaultValue to the
annotation processor. If such annotation is added to a scalar value with
no value at all, no default value is produced.

Closes gh-18917
5 years ago
Phillip Webb 3ca896e63f Polish 5 years ago