Skip to content

Instantly share code, notes, and snippets.

@akleemans
Last active July 21, 2020 15:20
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 akleemans/05d74551b8fc936d51ad49b2184d1c6b to your computer and use it in GitHub Desktop.
Save akleemans/05d74551b8fc936d51ad49b2184d1c6b to your computer and use it in GitHub Desktop.
package ch.kleemans.demoapp;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@CrossOrigin
@GetMapping("/api/hello")
public String sayHello(@RequestParam String name) {
return "Hello " + name + "!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment