Skip to content

Instantly share code, notes, and snippets.

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 sayadi/58bf04a3ee8e8dd32b3d70e1071ba227 to your computer and use it in GitHub Desktop.
Save sayadi/58bf04a3ee8e8dd32b3d70e1071ba227 to your computer and use it in GitHub Desktop.
@RestController
@RequestMapping("/properties")
public class PropertyController {
private final Environment environment;
@Autowired
public PropertyController(
Environment environment) {
this.environment = environment;
}
@GetMapping
public String getProperty(@NotNull String key) {
return environment.getProperty(key);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment