1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

style(nacos): Standard code style.

This commit is contained in:
chuntaojun
2019-09-05 11:13:59 +08:00
parent 7265046eab
commit e4d85b6c7e
26 changed files with 217 additions and 206 deletions

View File

@@ -58,7 +58,7 @@ class SampleRunner implements ApplicationRunner {
* user.name=Nacos user.age=25
*
* @param configInfo latest config data for specific dataId in Nacos
* server
* server
*/
@Override
public void receiveConfigInfo(String configInfo) {

View File

@@ -48,8 +48,8 @@ public class ConsumerApplication {
String divide(@RequestParam("a") Integer a, @RequestParam("b") Integer b);
default String divide(Integer a) {
return divide(a, 0);
}
return divide(a, 0);
}
@GetMapping(value = "/notFound")
String notFound();

View File

@@ -71,10 +71,10 @@ public class TestController {
return echoService.divide(a, b);
}
@GetMapping(value = "/divide-feign2")
public String divide(@RequestParam Integer a) {
return echoService.divide(a);
}
@GetMapping(value = "/divide-feign2")
public String divide(@RequestParam Integer a) {
return echoService.divide(a);
}
@GetMapping(value = "/echo-feign/{str}")
public String feign(@PathVariable String str) {

View File

@@ -1,12 +1,12 @@
package com.alibaba.cloud.examples;
public class UrlCleaner {
public static String clean(String url) {
System.out.println("enter urlCleaner");
if (url.matches(".*/echo/.*")) {
System.out.println("change url");
url = url.replaceAll("/echo/.*", "/echo/{str}");
}
return url;
}
public static String clean(String url) {
System.out.println("enter urlCleaner");
if (url.matches(".*/echo/.*")) {
System.out.println("change url");
url = url.replaceAll("/echo/.*", "/echo/{str}");
}
return url;
}
}