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:
parent
2237727a11
commit
09ba7f081b
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue