Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1287

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

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.14.Final
    • Fix Version/s: 3.1.0.Beta2, 3.0.20.Final
    • Component/s: None
    • Labels:
      None

      Description

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mstefank Martin Stefanko
                  Reporter:
                  mkopecky Marek Kopecky
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: