Skip to content

Instantly share code, notes, and snippets.

@eldermoraes
Last active July 10, 2020 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eldermoraes/76185aedf5610a0b5f1194121765b3e6 to your computer and use it in GitHub Desktop.
Save eldermoraes/76185aedf5610a0b5f1194121765b3e6 to your computer and use it in GitHub Desktop.
@Path("/config")
public class ConfigResource {
@ConfigProperty(name = "config")
private Optional<String> config;
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getConfig(){
return Response.ok("Hello, " + config.orElse("Optional")).build() ;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment