KafkaReciveApi.java 994 字节
package com.tianbo.messagebus.myinterface;

import com.tianbo.messagebus.bean.DslyFeignClientConfiguration;
import com.tianbo.messagebus.controller.response.ResultJson;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(
            name = "kafka-server-consumer",
            url = "https://www.zzecargo.com",
            fallbackFactory = KafkaReciveFallbackFactory.class,
            configuration = {DslyFeignClientConfiguration.class})
public interface KafkaReciveApi {

    @ResponseBody
    @RequestMapping(value = "/kafka/receive",method = RequestMethod.GET)
    ResultJson<List<String>> recive(@RequestParam(value = "username",required = true) String username);

    @ResponseBody
    @RequestMapping(value = "/api/kafka-server-consumer/kafka/receive",method = RequestMethod.POST)
    ResultJson<List<String>> getMessages(@RequestParam(value = "username",required = true) String username);
}