File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
mse-simple-demo/C/src/main/java/com/alibabacloud/mse/demo/c Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,17 @@ public String c(HttpServletRequest request) {
61
61
if (throwException ) {
62
62
throw new RuntimeException ();
63
63
}
64
- return "C" + serviceTag + "[" + inetUtils .findFirstNonLoopbackAddress ().getHostAddress () + "]" ;
64
+ try (Entry entry1 = SphU .entry ("HelloWorld-c-1" , EntryType .IN )) {
65
+ log .debug ("Hello Sentinel!1" );
66
+ try (Entry entry2 = SphU .entry ("H\" elloWorld-c-2" , EntryType .IN )) {
67
+ log .debug ("Hello Sentinel!2" );
68
+ return "C" + serviceTag + "[" + inetUtils .findFirstNonLoopbackAddress ().getHostAddress () + "]" ;
69
+ } catch (BlockException e ) {
70
+ throw new RuntimeException (e );
71
+ }
72
+ } catch (BlockException e ) {
73
+ throw new RuntimeException (e );
74
+ }
65
75
}
66
76
67
77
@ GetMapping ("/c-zone" )
You can’t perform that action at this time.
0 commit comments