// Path: spring-boot-oauth-resource-server/src/main/java/com/sdcuike/practice/feign/ExampleServiceFeignClient.java
// @FeignClient(name = "exampleService",
//         url = "${exampleService.ribbon.listOfServers}",
//         configuration = {OAuth2FeignAutoConfiguration.class})
// @RequestMapping(value = "/springBoot/example"
//         , consumes = MediaType.APPLICATION_JSON_UTF8_VALUE
//         , produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
// public interface ExampleServiceFeignClient {
//     @GetMapping("/")
//     ModelResult<String> home();
// }


import com.doctor.beaver.domain.result.ModelResult;
import com.sdcuike.practice.feign.ExampleServiceFeignClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
package com.sdcuike.practice.controller;


@RestController
@RequestMapping(path = "/api/example", produces = MediaType.APPLICATION_JSON_VALUE)
public class ExampleController {
    private final Logger log = LoggerFactory.getLogger(getClass());
    
    @Autowired
// Path: spring-boot-oauth-resource-server/src/main/java/com/sdcuike/practice/feign/ExampleServiceFeignClient.java
// @FeignClient(name = "exampleService",
//         url = "${exampleService.ribbon.listOfServers}",
//         configuration = {OAuth2FeignAutoConfiguration.class})
// @RequestMapping(value = "/springBoot/example"
//         , consumes = MediaType.APPLICATION_JSON_UTF8_VALUE
//         , produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
// public interface ExampleServiceFeignClient {
//     @GetMapping("/")
//     ModelResult<String> home();
// }


// Path: spring-boot-oauth-resource-server/src/main/java/com/sdcuike/practice/controller/ExampleController.java
import com.doctor.beaver.domain.result.ModelResult;
import com.sdcuike.practice.feign.ExampleServiceFeignClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

package com.sdcuike.practice.controller;


@RestController
@RequestMapping(path = "/api/example", produces = MediaType.APPLICATION_JSON_VALUE)
public class ExampleController {
    private final Logger log = LoggerFactory.getLogger(getClass());
    
    @Autowired
    private ExampleServiceFeignClient exampleServiceFeignClient;