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>
This commit is contained in:
Eric Zhao 2018-11-21 16:46:55 +08:00
parent 2237727a11
commit 09ba7f081b
2 changed files with 2 additions and 2 deletions

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

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) {