-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add support for repeatable annotations #1670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello! The build is failing because of formatting violations. You can check them locally by running |
I made the fix and confirmed it works locally. |
Hello, thanks for the PR! I might have missed something here, but why did you create a second implementation for the annotations? Is there a reason we couldn't add the functionality for repeated annotations into the |
This comment was marked as resolved.
This comment was marked as resolved.
After thinking more about your previous comment, I realized there might be a better approach that allows You can see it in this commit — I've confirmed that it doesn't break any existing tests: Sorry if my earlier proposal ended up taking unnecessary time. Do you think this approach would be better? |
Yes, please update the PR. Thanks! |
I've updated the PR. @mhalbritter |
...izr-generator/src/main/java/io/spring/initializr/generator/language/AnnotationContainer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
See gh-1670 Signed-off-by: sijun-yang <[email protected]> Co-authored-by: Moritz Halbritter <[email protected]>
Thanks a lot @YangSiJun528 ! |
Resolves issue #1624 by adding support for repeatable annotations of the same type.
Key changes:
AnnotationContainer#add
and replaces it withAnnotationContainer#addSingle
andAnnotationContainer#customizeSingle
AnnotationContainer#addSingle
handles adding single annotationsAnnotationContainer#customizeSingle
handles customizing single annotationsAnnotationContainer#addRepeatable
to support repeatable annotationsKotlinSourceCodeWriter#writeProperty
to correctly write annotationsAnnotationContainer#add
Fixes gh-1624