Can I configure a @FeignClient url using a properties/yml file?

后端 未结 2 1613
忘掉有多难
忘掉有多难 2020-12-08 04:50

My goal is to create a strategy of different steps to get from a point-to-point communication between 2 components to a \"full blown netflix\" style of communication using e

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 05:24

    This can be done like this:

    @FeignClient(name="fd-mobileapi-service",url="${fdmobile.ribbon.listOfServers}")
    

    Where fdmobile.ribbon.listOfServers : value is a property in application.properties.

    I have tested it and it is working.

提交回复
热议问题