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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.1.0.Beta2, 3.0.20.Final
    • 3.0.14.Final
    • None
    • 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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: