File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
mse-simple-demo/A/src/main/java/com/alibabacloud/mse/demo/a Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 2121import org .springframework .cloud .commons .util .InetUtils ;
2222import org .springframework .http .HttpStatus ;
2323import org .springframework .http .ResponseEntity ;
24- import org .springframework .web .bind .annotation .GetMapping ;
25- import org .springframework .web .bind .annotation .PathVariable ;
26- import org .springframework .web .bind .annotation .RequestMapping ;
27- import org .springframework .web .bind .annotation .RestController ;
24+ import org .springframework .web .bind .annotation .*;
2825import org .springframework .web .client .RestTemplate ;
2926
3027import javax .annotation .PostConstruct ;
@@ -229,7 +226,7 @@ public String aZone(HttpServletRequest request) {
229226
230227 @ ApiOperation (value = "Dubbo 全链路灰度入口" , tags = {"入口应用" })
231228 @ GetMapping ("/dubbo" )
232- public String dubbo (HttpServletRequest request ) {
229+ public String dubbo (HttpServletRequest request , @ RequestParam ( required = false ) String param ) {
233230 StringBuilder headerSb = new StringBuilder ();
234231 Enumeration <String > enumeration = request .getHeaderNames ();
235232 while (enumeration .hasMoreElements ()) {
@@ -241,7 +238,7 @@ public String dubbo(HttpServletRequest request) {
241238 }
242239 }
243240 return "A" + serviceTag + "[" + inetUtils .findFirstNonLoopbackAddress ().getHostAddress () + "]" + " -> " +
244- helloServiceB .hello (JSON . toJSONString ( request . getParameterMap ()) );
241+ helloServiceB .hello (param );
245242 }
246243
247244
You can’t perform that action at this time.
0 commit comments