I have a small problem to access some controllers. When I send a request to /
, I a get an HTTP 404, and the same for the movies
path.
p
Try to change your controller annotations to something like this:
@Controller
@RequestMapping(value="/movies", produces="application/json)
public class MovieController{
@RequestMapping(value="/", method=RequestMethod.GET)
public MyResponseObject getMovies(){
//you can return a POJO object if you are using a Jackson Mapper
return new MyResponseObject("foo", "bar");
}
}