CompanyController.java 752 字节
package cn.dnect.companyconsumer.controller;

import cn.dnect.companyconsumer.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Date: 2019/2/18
 * Time: 14:54
 *
 * @author: 二条
 * Description:
 */
@RestController
public class CompanyController {

    @Autowired CompanyService companyService;

    @GetMapping("/consumer")
    public String sayHi(@RequestParam String name){
        return companyService.sayHi(name);
    }
}