SpringCloud-Feign服务
1.搭建环境:JDK1.8+IDEA2017+MySQL8.0
2.项目结构图
3. 修改springcloud-api模块
(1)模块结构
(2)添加service
package com.cloud.service;
import com.cloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;
@Component
//开启F
共有 0 条评论