Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created June 12, 2019 17:34
Show Gist options
  • Select an option

  • Save recursivecodes/03a8e8f1227d620f35978f41db05b0ed to your computer and use it in GitHub Desktop.

Select an option

Save recursivecodes/03a8e8f1227d620f35978f41db05b0ed to your computer and use it in GitHub Desktop.
@Controller("/metadata")
public class MetadataController {
final static Logger logger = LoggerFactory.getLogger(MetadataController.class);
private ServiceInstance serviceInstance;
@Inject ApplicationContext applicationContext;
String testConfigValue = null;
@Inject
MetadataController( @Property(name="test") String test ){
this.testConfigValue = test;
}
@EventListener
void onServiceStarted(ServiceStartedEvent event) {
ServiceInstance serviceInstance = event.getSource();
this.serviceInstance = serviceInstance;
}
@Get("/")
public HttpStatus index() {
return HttpStatus.OK;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment