Consider a service class responsible for making a remote call and retrieving a detail:

public class CitiesService {
    private final WebClient.Builder webClientBuilder;
    private final String baseUrl;

    public CitiesService(
            WebClient.Builder webClientBuilder,
            @Value("${cityservice.url}") String baseUrl) {
        this.webClientBuilder = webClientBuilder;
        this.baseUrl = baseUrl;

    public Flux getCities() {

This is a Spring Bean and resolves the URL to call through a property called “cityservice.url”.