1234567891011121314151617 |
- package cn.hhj.controller;
- import cn.hhj.vo.Company;
- import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
- import org.springframework.web.bind.annotation.*;
- @RestController
- public class CompanyRest {
- @GetMapping("/company/get/{title}")
- @HystrixCommand // 如果需要进行性能监控,那么必须要有此注解
- public Object get(@PathVariable("title") String title) {
- Company vo = new Company() ;
- vo.setTitle(title);
- vo.setNote("www.hhj.cn");
- return vo ;
- }
- }
|