title: How does Spring MVC relate to Service, Controller and Data Access layers in a web application?
body: <p>I understand the <a href="http://www.tutorialspoint.com/design_pattern/mvc_pattern.htm" rel="noreferrer">MVC Pattern</a> and also how <a href="http://www.tutorialspoint.com/spring/spring_web_mvc_framework.htm" rel="noreferrer">Spring MVC</a> implements it.</p>
  
  <p>However, how do the <code>Rest controller</code>, <code>Data Access Layer</code> and <code>Service Layer</code> fit into this pattern?</p>
  
  <p>Is it:</p>
  
  <ul>
  <li><p><strong>Model</strong> = Database (e.g. Oracle/MySQL) and <a href="http://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/repositories.html" rel="noreferrer">Repositories</a> classes</p></li>
  <li><p><strong>Controller</strong> = <code>Service</code> (buisness logic) and Rest <code>Controller</code> classes</p></li>
  <li><p><strong>View</strong> = <code>JSP</code> / <code>FreeMarker</code>? </p></li>
  </ul>