Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,19 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.csp.sentinel.demo.dubbo.FooService;
import com.alibaba.csp.sentinel.demo.service.DemoService;
import org.apache.dubbo.config.annotation.Reference;

/**
* @author Eric Zhao
*/
@RestController
@RequestMapping("/demo")
public class DemoController {

@Reference
private FooService fooService;

@Autowired
private DemoService demoService;

@GetMapping("/hello")
public String apiSayHello(@RequestParam String name) {
return fooService.sayHello(name);
}

@GetMapping("/bonjour/{name}")
public String apiSayHelloLocal(@PathVariable String name) {
return demoService.bonjour(name);
}

@GetMapping("/time")
public long apiCurrentTime(@RequestParam(value = "slow", defaultValue = "false") Boolean slow) {
return fooService.getCurrentTime(slow);
}
}

This file was deleted.