mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-29 14:49:38 +00:00
Fixed issue with Atom export
This commit is contained in:
parent
97e1890867
commit
47ddd6f934
2 changed files with 3 additions and 3 deletions
|
@ -73,7 +73,7 @@ public class VisitController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/owners/*/pets/{petId}/visits", method=RequestMethod.GET)
|
@RequestMapping(value="/owners/*/pets/{petId}/visits", method=RequestMethod.GET)
|
||||||
public ModelAndView showVisits(@PathVariable int petId) {
|
public ModelAndView showVisits(@PathVariable int petId) {
|
||||||
ModelAndView mav = new ModelAndView("visits");
|
ModelAndView mav = new ModelAndView("visitList");
|
||||||
mav.addObject("visits", this.clinicService.findPetById(petId).getVisits());
|
mav.addObject("visits", this.clinicService.findPetById(petId).getVisits());
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<constructor-arg>
|
<constructor-arg>
|
||||||
<map>
|
<map>
|
||||||
<entry key="xml" value="application/vnd.springsource.samples.petclinic+xml"/>
|
<entry key="xml" value="application/vnd.springsource.samples.petclinic+xml"/>
|
||||||
<entry key="atom" value="#{visitsList.contentType}"/>
|
<entry key="atom" value="#{visitList.contentType}"/>
|
||||||
</map>
|
</map>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
</bean>
|
</bean>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
p:suffix=".jsp" p:order="2"/>
|
p:suffix=".jsp" p:order="2"/>
|
||||||
|
|
||||||
<!-- - The AtomView rendering a Atom feed of the visits -->
|
<!-- - The AtomView rendering a Atom feed of the visits -->
|
||||||
<bean id="visitsList" class="org.springframework.samples.petclinic.web.VisitsAtomView"/>
|
<bean id="visitList" class="org.springframework.samples.petclinic.web.VisitsAtomView"/>
|
||||||
|
|
||||||
<bean id="vets/vetsList" class="org.springframework.web.servlet.view.xml.MarshallingView">
|
<bean id="vets/vetsList" class="org.springframework.web.servlet.view.xml.MarshallingView">
|
||||||
<property name="marshaller" ref="marshaller"/>
|
<property name="marshaller" ref="marshaller"/>
|
||||||
|
|
Loading…
Reference in a new issue