Skip to content

Instantly share code, notes, and snippets.

@muralidharan-rade
Created August 24, 2020 18:35
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 muralidharan-rade/8fc32157efec367c7f1477cd86550518 to your computer and use it in GitHub Desktop.
Save muralidharan-rade/8fc32157efec367c7f1477cd86550518 to your computer and use it in GitHub Desktop.
package com.muralitechblog.swagger.resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(path = "/test")
public class TestResource {
@GetMapping(path = "/echo")
public String getEcho() {
return "Echo 1.. 2.. 3..";
}
@GetMapping(path = "/hello/{name}")
public String helloApp(@PathVariable String name) {
return "Hello " + name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment