Interface BinaryResourceConfigClient

All Known Subinterfaces:
ConfigResourceClient

public interface BinaryResourceConfigClient
Provides access to the binary files served by a Spring Cloud Config Server.
Since:
5.1.0
Author:
Craig Walls, Anshul Mehra, Sharang Gupta
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.core.io.Resource
    Retrieves a binary file using the configured profile and label.
    org.springframework.core.io.Resource
    getBinaryResource(String profile, String label, String path)
    Retrieves a binary file.
  • Method Details

    • getBinaryResource

      org.springframework.core.io.Resource getBinaryResource(String path)
      Retrieves a binary file using the configured profile and label.
      Parameters:
      path - the path of the file, relative to the application's folder
      Returns:
      the file served by the config server
      Throws:
      IllegalArgumentException - when the application name or the config server URI is undefined
      org.springframework.web.client.HttpClientErrorException - when the file is not found
    • getBinaryResource

      org.springframework.core.io.Resource getBinaryResource(String profile, String label, String path)
      Retrieves a binary file.
      Parameters:
      profile - the profile, or null for the configured one; may be a comma-separated list
      label - the label, or null for the configured one
      path - the path of the file, relative to the application's folder
      Returns:
      the file served by the config server
      Throws:
      IllegalArgumentException - when the application name or the config server URI is undefined
      org.springframework.web.client.HttpClientErrorException - when the file is not found