title: Intergrating AEM/CQ5 and Spring Framework?
body: <p>I have been trying to integrate Spring framework within AEM6/CQ5.</p>
  
  <p>I am following this tutorial. <a href="http://neba.io/userguide.html" rel="nofollow">LINK</a></p>
  
  <p>As per the tutorial I have installed the NEBA package.
  All NEBA bundles are active in OSGi console.</p>
  
  <p>Then I created my own Maven CQ5 project, I added the dependencies of Neba annotations and Spring. My project was also successfully deployed in CQ5(bundle is active).</p>
  
  <p>I tried to use a ResourceModel annotation of NEBA. But this model does not appear in the model registry of NEBA.
  I mapped the ResourceModel to a content component that i created "linkComponent".</p>
  
  <p>When the user drags and drops this on any parsys the resource node has the properties <strong>linkName</strong> and <strong>linkURL</strong>.</p>
  
  <p>I tried accessing these values in JSP but I failed.</p>
  
  <p>Please See code below :
      package com.zensar.neba;</p>
  
  <pre><code>import org.apache.sling.api.resource.Resource;
  
  import io.neba.api.annotations.Path;
  import io.neba.api.annotations.ResourceModel;
  
  @ResourceModel(types = "zensar-neba/components/content/linkComponent")
  public class LinkComponent {
  
      private String linkName;
      private String linkURL;
  
      public String getLinkName() {
          return linkName;
      }
      public void setLinkName(String linkName) {
          this.linkName = linkName;
      }
      public String getLinkURL() {
          return linkURL;
      }
      public void setLinkURL(String linkURL) {
          this.linkURL = linkURL;
      }
  
  
  }
  </code></pre>
  
  <p>Please See JSP Code of <em>linkComponent</em> below:</p>
  
  <pre><code>&lt;%@include file="/libs/foundation/global.jsp"%&gt;
  &lt;%@taglib prefix="neba" uri="http://neba.io/1.0"%&gt;
  &lt;neba:defineObjects /&gt;
  Link Component
  &lt;a href="${m.linkURL}"&gt; Click Here ${m.linkName}&lt;/a&gt;
  </code></pre>
  
  <p>Then I tried creating an <strong>Controller</strong> using <strong>Spring annotation</strong> but I got <strong>"Path not found"</strong> what am I missing.</p>
  
  <p>Please see code below:</p>
  
  <pre><code>package com.zensar.neba;
  
  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.ResponseBody;
  
  @Controller
  public class DemoController {
      @RequestMapping("/echo/{param}")
      @ResponseBody
      public String echo(@PathVariable("param") String paramToEcho) {
         return "Hello "+ paramToEcho;
      }
  }
  </code></pre>
  
  <p>I called the controller link this : <strong><em><a href="http://localhost:4502/bin/mvc.do/echo/Oliver" rel="nofollow">http://localhost:4502/bin/mvc.do/echo/Oliver</a></em></strong></p>
  
  <p><strong>IMPORTANT NOTE:
  All my bundles are active</strong></p>