title: RESTEasy's SpringContextLoaderListener not scanning @Path
body: <p>I'm trying to implements RESTEasy + Spring, but @Autowire not working. I found some reference that I need to use org.jboss.resteasy.plugins.spring.SpringContextLoaderListener and disable resteasy auto scan. I've tried, but now my web service is not recognize. What do I do wrong? Here is my web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
  &lt;display-name&gt;APF Web Service&lt;/display-name&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
          classpath:applicationContext.xml
      &lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
      &lt;param-value&gt;Development&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;!-- REST configuration --&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;
          org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
      &lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;!-- RESTEasy &lt;-&gt; Spring connector (RESTEasy can access Spring beans) --&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;org.jboss.resteasy.plugins.spring.SpringContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;resteasy-servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;
          org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
      &lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;resteasy-servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/json/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;resteasy.servlet.mapping.prefix&lt;/param-name&gt;
      &lt;param-value&gt;/json&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;!--&lt;context-param&gt;--&gt;
      &lt;!--&lt;param-name&gt;resteasy.resources&lt;/param-name&gt;--&gt;
      &lt;!--&lt;param-value&gt;ApplicationSvc&lt;/param-value&gt;--&gt;
  &lt;!--&lt;/context-param&gt;--&gt;
  
  &lt;!-- End of REST configuration --&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Here is my web service</p>
  
  <pre><code>@Service
  @Path("/json")
  public class ApplicationSupportSvc {
  
      @Autowired
      private MobileSurveyApkRepo mobileSurveyApkRepo;
  
      @GET
      @Path("/latest")
      @Produces(MediaType.APPLICATION_JSON)
      @Transactional
      public ApkResponse getLatestApk() {
  
          return mobileSurveyApkRepo.getLatestApk();
      }
  
  }
  </code></pre>
  
  <p>And here is my applicationContext.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:context="http://www.springframework.org/schema/context"
     xmlns:aop="http://www.springframework.org/schema/aop"
     xmlns:tx="http://www.springframework.org/schema/tx"
     xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context-3.1.xsd
          http://www.springframework.org/schema/aop
          http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
          http://www.springframework.org/schema/tx
          http://www.springframework.org/schema/tx/spring-tx.xsd"&gt;
  
  &lt;context:component-scan base-package="some.package" /&gt;
  &lt;context:annotation-config /&gt;
  &lt;aop:config proxy-target-class="true"&gt;&lt;/aop:config&gt;
  
  &lt;bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"&gt;
      &lt;property name="jndiName" value="jdbc/SomeConn" /&gt;
  &lt;/bean&gt;
  
  &lt;!-- Hibernate session factory --&gt;
  
  &lt;bean id="sessionFactory"
        class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;
  
      &lt;property name="dataSource" ref="dataSource"/&gt;
  
      &lt;property name="hibernateProperties"&gt;
          &lt;value&gt;
              &lt;![CDATA[
  
              hibernate.dialect=org.hibernate.dialect.SQLServerDialect
              hibernate.default_schema=FIN
              hibernate.hbm2ddl.auto=update
              hibernate.hbm2ddl.keywords=auto-quote
              hibernate.show_sql=true
              javax.persistence.validation.mode=none
  
              ]]&gt;
          &lt;/value&gt;
      &lt;/property&gt;
  
      &lt;property name="packagesToScan"&gt;
          &lt;list&gt;
              &lt;value&gt;some.package&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  
      &lt;property name="mappingLocations"&gt;
          &lt;list&gt;
              &lt;value&gt;classpath:jbpm.execution.hbm.xml&lt;/value&gt;
              &lt;value&gt;classpath:jbpm.history.hbm.xml&lt;/value&gt;
              &lt;value&gt;classpath:jbpm.task.hbm.xml&lt;/value&gt;
              &lt;value&gt;classpath:jbpm.repository.hbm.xml&lt;/value&gt;
              &lt;value&gt;classpath:jbpm.identity.hbm.xml&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  
  &lt;/bean&gt;
  
  &lt;bean id="transactionManager"
        class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
      &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
  &lt;/bean&gt;
  
  &lt;tx:annotation-driven transaction-manager="transactionManager" mode="aspectj" /&gt;
  
  &lt;!-- End of Hibernate session factory --&gt;
  
  &lt;!-- jBPM4 Bean Definitions --&gt;
  &lt;bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper"&gt;
      &lt;property name="jbpmCfg"&gt;
          &lt;value&gt;jbpm.cfg.xml&lt;/value&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="processEngine" factory-bean="springHelper"
        factory-method="createProcessEngine" /&gt;
  
  &lt;bean id="repositoryService" factory-bean="processEngine"
        factory-method="getRepositoryService" /&gt;
  
  &lt;bean id="executionService" factory-bean="processEngine"
        factory-method="getExecutionService" /&gt;
  
  &lt;bean id="taskService" factory-bean="processEngine"
        factory-method="getTaskService" /&gt;
  
  &lt;bean id="historyService" factory-bean="processEngine"
        factory-method="getHistoryService" /&gt;
  
  &lt;bean id="managementService" factory-bean="processEngine"
        factory-method="getManagementService" /&gt;
  
  &lt;!-- End of jBPM4 Bean Definitions --&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>I'm using RESTEasy 3.0.6 and Spring 4.0.3, with JBOSS EAP 6.2</p>