Skip to content

Instantly share code, notes, and snippets.

@zavierrodriguez
Last active August 29, 2015 14:19
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 zavierrodriguez/92b362ba764fed14bef6 to your computer and use it in GitHub Desktop.
Save zavierrodriguez/92b362ba764fed14bef6 to your computer and use it in GitHub Desktop.
package com.companyx.controllers;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
@RestController
public class QueryController {
@RequestMapping(value = "/query", method = RequestMethod.GET)
@ResponseBody
public String query() {
return "{message: 'Hello! Querying at "
+ new Date().toString()
+ "'}";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment