From 28e6a5a934f374258dfec88a1c581f6f8ff2feee Mon Sep 17 00:00:00 2001 From: yhao3 Date: Tue, 19 Mar 2024 09:36:16 +0800 Subject: [PATCH] Resolve deprecation warning for convention-based annotation attribute overrides --- .../main/java/_package_/client/AuthorizedFeignClient.java.ejs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generators/feign-client/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs b/generators/feign-client/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs index 1261c5403b9a..a9a9fdf70f9c 100644 --- a/generators/feign-client/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs +++ b/generators/feign-client/templates/src/main/java/_package_/client/AuthorizedFeignClient.java.ejs @@ -49,12 +49,14 @@ public @interface AuthorizedFeignClient { * An absolute URL or resolvable hostname (the protocol is optional). * @return the URL. */ + @AliasFor(annotation = FeignClient.class, attribute = "url") String url() default ""; /** * Whether 404s should be decoded instead of throwing FeignExceptions. * @return true if 404s will be decoded; false otherwise. */ + @AliasFor(annotation = FeignClient.class, attribute = "dismiss404") boolean dismiss404() default false; /** @@ -62,11 +64,13 @@ public @interface AuthorizedFeignClient { * implement the interface annotated by this annotation and be a valid Spring bean. * @return the fallback class for the specified Feign client interface. */ + @AliasFor(annotation = FeignClient.class, attribute = "fallback") Class fallback() default void.class; /** * Path prefix to be used by all method-level mappings. * @return the path prefix to be used by all method-level mappings. */ + @AliasFor(annotation = FeignClient.class, attribute = "path") String path() default ""; }