Browse Source

Resolves #256: Support parameters in entry of Sentinel annotation support

- To enable parameter flow control in Sentinel annotation support

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
master
Eric Zhao 6 years ago
parent
commit
09ba7f081b
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      sentinel-core/src/main/java/com/alibaba/csp/sentinel/annotation/SentinelResource.java
  2. +1
    -1
      sentinel-extension/sentinel-annotation-aspectj/src/main/java/com/alibaba/csp/sentinel/annotation/aspectj/SentinelResourceAspect.java

+ 1
- 1
sentinel-core/src/main/java/com/alibaba/csp/sentinel/annotation/SentinelResource.java View File

@@ -37,7 +37,7 @@ public @interface SentinelResource {
/**
* @return name of the Sentinel resource
*/
String value() default "";;
String value() default "";

/**
* @return the entry type (inbound or outbound), outbound by default


+ 1
- 1
sentinel-extension/sentinel-annotation-aspectj/src/main/java/com/alibaba/csp/sentinel/annotation/aspectj/SentinelResourceAspect.java View File

@@ -53,7 +53,7 @@ public class SentinelResourceAspect extends AbstractSentinelAspectSupport {
EntryType entryType = annotation.entryType();
Entry entry = null;
try {
entry = SphU.entry(resourceName, entryType);
entry = SphU.entry(resourceName, entryType, 1, pjp.getArgs());
Object result = pjp.proceed();
return result;
} catch (BlockException ex) {


Loading…
Cancel
Save