SearchEngineClient.java 957 B

12345678910111213141516171819
  1. package com.webchat.rmi.search;
  2. import com.webchat.common.bean.APIPageResponseBean;
  3. import com.webchat.rmi.interceptor.RpcRequestInterceptor;
  4. import org.springframework.cloud.openfeign.FeignClient;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.RequestParam;
  7. @FeignClient(name = "webchat-search-service",
  8. contextId = "searchEngineClient",
  9. configuration = RpcRequestInterceptor.class)
  10. public interface SearchEngineClient {
  11. @GetMapping("/search-service/content/query")
  12. APIPageResponseBean query(@RequestParam(value = "q", required = false) String query,
  13. @RequestParam(value = "type", required = false) Integer type,
  14. @RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
  15. @RequestParam(value = "size", required = false, defaultValue = "10") Integer size);
  16. }