@RestController @RequestMapping(method=GET, path="${spring.cloud.config.server.prefix:}") public class ResourceController extends Object
ResourceRepository
is used to locate a
Resource
, specific to an application, and the contents are transformed to text.
Then an EnvironmentRepository
is used to supply key-value pairs which are used
to replace placeholders in the resource text.Constructor and Description |
---|
ResourceController(ResourceRepository resourceRepository,
EnvironmentRepository environmentRepository) |
Modifier and Type | Method and Description |
---|---|
byte[] |
binary(String name,
String profile,
String label,
javax.servlet.http.HttpServletRequest request) |
void |
notFound(NoSuchResourceException e) |
String |
resolve(String name,
String profile,
String label,
javax.servlet.http.HttpServletRequest request) |
public ResourceController(ResourceRepository resourceRepository, EnvironmentRepository environmentRepository)
@RequestMapping(value="/{name}/{profile}/{label}/**") public String resolve(@PathVariable String name, @PathVariable String profile, @PathVariable String label, javax.servlet.http.HttpServletRequest request) throws IOException
IOException
@RequestMapping(value="/{name}/{profile}/{label}/**", produces="application/octet-stream") public byte[] binary(@PathVariable String name, @PathVariable String profile, @PathVariable String label, javax.servlet.http.HttpServletRequest request) throws IOException
IOException
@ExceptionHandler(value=NoSuchResourceException.class) @ResponseStatus(value=NOT_FOUND) public void notFound(NoSuchResourceException e)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.