Skip to content

Instantly share code, notes, and snippets.

@yostane
Last active March 31, 2023 08:34
Show Gist options
  • Select an option

  • Save yostane/6ba0c09ebae42174cdcf0377725ef781 to your computer and use it in GitHub Desktop.

Select an option

Save yostane/6ba0c09ebae42174cdcf0377725ef781 to your computer and use it in GitHub Desktop.
import org.eclipse.microprofile.config.inject.ConfigProperty;
import javax.inject.Inject;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
@Path("sample")
public class SampleResource {
@Inject
@ConfigProperty(name = "message")
private String message;
@GET
public Response message() {
return Response.ok(message).build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment