Skip to content

Instantly share code, notes, and snippets.

@arush-sal
Created June 16, 2018 21:39
Show Gist options
  • Save arush-sal/31ac305fe6b77fbd07cde274a9e29707 to your computer and use it in GitHub Desktop.
Save arush-sal/31ac305fe6b77fbd07cde274a9e29707 to your computer and use it in GitHub Desktop.
As found in github.com/kubernauts/prometheus_example/tree/master/springboot/uninstrumented
// Define code's package
package com.github.kubernauts.prometheus_example.springboot.uninstrumented;
// import the default Spring Boot packages
import org.springframework.boot.*;
import org.springframework.boot.autoconfigure.*;
import org.springframework.web.bind.annotation.*;
// Declare the Standard Spring boot annotation for instantiation
@SpringBootApplication
// Add route annotations below
@RestController
// Main application class
public class HelloWorld {
@RequestMapping("/")
String home() {
return "Hello World!";
}
public static void main(String[] args) throws Exception {
SpringApplication.run(HelloWorld.class, args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment