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 TypeMethodDescriptionorg.springframework.core.io.ResourcegetBinaryResource(String path) Retrieves a binary file using the configured profile and label.org.springframework.core.io.ResourcegetBinaryResource(String profile, String label, String path) Retrieves a binary file.
-
Method Details
-
getBinaryResource
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 undefinedorg.springframework.web.client.HttpClientErrorException- when the file is not found
-
getBinaryResource
Retrieves a binary file.- Parameters:
profile- the profile, ornullfor the configured one; may be a comma-separated listlabel- the label, ornullfor the configured onepath- 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 undefinedorg.springframework.web.client.HttpClientErrorException- when the file is not found
-