Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.movietime.controller;
- import java.util.List;
- import javax.annotation.Resource;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.servlet.ModelAndView;
- import com.movietime.entities.Movie;
- import com.movietime.dataAccessLayer.MovieService;;
- /**
- * @author Attila
- *
- * Presentation layer (MVC) / Controller
- */
- @Controller
- public class HelloController {
- @Resource
- MovieService service;
- @RequestMapping("/index")
- public ModelAndView welcomePage() {
- List<Movie> result = service.findByTitle("The eternal sunshine of");
- System.out.println(result.get(0));
- return new ModelAndView("index");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement