Java tutorial
/* * Copyright (c) 2014 Andrey Paslavsky. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.paslavsky.springrest; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.Map; /** * Test interface #1 * * @author Andrey Paslavsky * @version 1.0 */ public interface TestClient1 { @RequestMapping(value = "/test1", method = RequestMethod.PUT) void test1(@RequestBody String message); @RequestMapping(value = "/test2", method = RequestMethod.GET) ResponseEntity<Map<String, String>> test2(@RequestHeader("OAuth") String oAuth); @RequestMapping(value = "/test3", method = RequestMethod.GET) ResponseEntity<Map> test3(); @RequestMapping(value = "/test4", method = RequestMethod.GET) ResponseEntity test4(); @RequestMapping(value = "/test5", method = RequestMethod.GET) ResponseEntity<Object> test5(); @ResponseBody @RequestMapping(value = "/test6", method = RequestMethod.GET) Object test6(); @ResponseBody @RequestMapping(value = "/test7/{path}", method = RequestMethod.GET) Map<String, String> test7(@PathVariable("path") String path, @RequestParam("size") int size); }