Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-2963

RESTEasy-Spring is unable to set mediaTypeMappings in ResteasyDeployment by bean settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.DR8
    • 7.0.0.ER4
    • REST
    • None

      Description of problem:
      RESTEasy-Spring is unable to set mediaTypeMappings in ResteasyDeployment by bean settings.

      Reproducer is attached. Reproducer is based on TypeMappingTest from upstream TS.

      Spring replacement of ResteasyDeployment:

          <!-- Import basic SpringMVC Resteasy integration -->
          <import resource="classpath:springmvc-resteasy.xml" />
      
          <!-- override the bean definition for deployment -->
          <bean id="resteasy.deployment" class="org.jboss.resteasy.spi.ResteasyDeployment" init-method="start" destroy-method="stop">
              <property name="mediaTypeMappings">
                  <map>
                      <entry key="json" value="application/json" />
                      <entry key="xml" value="application/xml" />
                  </map>
              </property>
          </bean>
      

      How reproducible:
      Always

      Steps to Reproduce: (use attached reproducer)

      1. mvn test -Djboss.home=${EAP_HOME}

      Actual results:
      RESTEASY002010: Failed to execute: javax.ws.rs.NotFoundException: RESTEASY003210: Could not find resource for full path: http://localhost:8080/TypeMappingTest/test/noproduces.xml

              mstefank Martin Stefanko
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: