minor work

This commit is contained in:
Eugen
2013-05-23 11:13:36 +03:00
parent ff3b2dfc53
commit e84500c4c4
3 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
package org.baeldung.spring.web;
import java.io.Serializable;
public class Foo implements Serializable {
public Foo() {
super();
}
}

View File

@@ -0,0 +1,29 @@
package org.baeldung.spring.web.controller;
import javax.servlet.http.HttpServletResponse;
import org.baeldung.spring.web.Foo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
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.util.UriComponentsBuilder;
@Controller
@RequestMapping(value = "/foo")
public class FooController {
public FooController() {
super();
}
// API
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public Foo findOne(@PathVariable("id") final Long id, final UriComponentsBuilder uriBuilder, final HttpServletResponse response) {
return new Foo();
}
}