Interface PlainTextConfigClient
- All Known Subinterfaces:
ConfigResourceClient
public interface PlainTextConfigClient
Provides access to the plain text files served by a Spring Cloud Config Server.
- Since:
- 5.1.0
- Author:
- Daniel Lavoie, Sharang Gupta
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.io.ResourcegetPlainTextResource(String path) Retrieves a plain text file using the configured profile and label.org.springframework.core.io.ResourcegetPlainTextResource(String profile, String label, String path) Retrieves a plain text file.
-
Method Details
-
getPlainTextResource
Retrieves a plain text 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
-
getPlainTextResource
org.springframework.core.io.Resource getPlainTextResource(String profile, String label, String path) Retrieves a plain text 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
-