mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
⬆️ Upgrading dependencies. spring cloud 2020
This commit is contained in:
1 parent
f51a3f2ae3
commit
a25caeff01
17 files changed
+78
-32
No files matched your search
+9
-1
@@ -17,6 +17,7 @@
|
||||
|
||||
package com.pig4cloud.pigx.common.feign.annotation;
|
||||
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.cloud.openfeign.PigxFeignClientsRegistrar;
|
||||
import org.springframework.context.annotation.Import;
|
||||
@@ -32,12 +33,16 @@ import java.lang.annotation.*;
|
||||
@Documented
|
||||
@EnableFeignClients
|
||||
@Import(PigxFeignClientsRegistrar.class)
|
||||
// 排除 Ribbon (当然也可以排查 maven 依赖)
|
||||
@EnableAutoConfiguration(excludeName =
|
||||
"org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration")
|
||||
public @interface EnablePigxFeignClients {
|
||||
|
||||
/**
|
||||
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation
|
||||
* declarations e.g.: {@code @ComponentScan("org.my.pkg")} instead of
|
||||
* {@code @ComponentScan(basePackages="org.my.pkg")}.
|
||||
*
|
||||
* @return the array of 'basePackages'.
|
||||
*/
|
||||
String[] value() default {};
|
||||
@@ -49,9 +54,10 @@ public @interface EnablePigxFeignClients {
|
||||
* <p>
|
||||
* Use {@link #basePackageClasses()} for a type-safe alternative to String-based
|
||||
* package names.
|
||||
*
|
||||
* @return the array of 'basePackages'.
|
||||
*/
|
||||
String[] basePackages() default { "com.pig4cloud.pigx" };
|
||||
String[] basePackages() default {"com.pig4cloud.pigx"};
|
||||
|
||||
/**
|
||||
* Type-safe alternative to {@link #basePackages()} for specifying the packages to
|
||||
@@ -59,6 +65,7 @@ public @interface EnablePigxFeignClients {
|
||||
* <p>
|
||||
* Consider creating a special no-op marker class or interface in each package that
|
||||
* serves no purpose other than being referenced by this attribute.
|
||||
*
|
||||
* @return the array of 'basePackageClasses'.
|
||||
*/
|
||||
Class<?>[] basePackageClasses() default {};
|
||||
@@ -75,6 +82,7 @@ public @interface EnablePigxFeignClients {
|
||||
/**
|
||||
* List of classes annotated with @FeignClient. If not empty, disables classpath
|
||||
* scanning.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Class<?>[] clients() default {};
|
||||
|
||||
Reference in new issue
Block a user