SPR-5460: Add AtomView sample to PetClinic

This commit is contained in:
Arjen Poutsma
2009-02-06 09:12:08 +00:00
parent ce83ebf0de
commit b96a7a7a8c
8 changed files with 407 additions and 24 deletions

View File

@@ -94,6 +94,14 @@
</spring:url>
<a href="${fn:escapeXml(visitUrl)}">Add Visit</a>
</td>
<td></td>
<td>
<spring:url value="{ownerId}/pets/{petId}/visits" var="feedUrl">
<spring:param name="ownerId" value="${owner.id}"/>
<spring:param name="petId" value="${pet.id}"/>
</spring:url>
<a href="${fn:escapeXml(feedUrl)}" rel="alternate" type="application/atom+xml">Atom Feed</a>
</td>
</tr>
</table>
</c:forEach>

View File

@@ -57,6 +57,18 @@
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/jsp/"
p:suffix=".jsp"/>
<!--
- The BeanNameViewResolver is used to pick up the visits view name (below).
- It has the order property set to 1, which means that this will
- be the first view resolver to be used.
-->
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" p:order="1"/>
<!--
- The AtomView rendering a Atom feed of the visits
-->
<bean id="visits" class="org.springframework.samples.petclinic.web.VisitsAtomView"/>
<!--
- Message source for this context, loaded from localized "messages_xx" files.
- Could also reside in the root application context, as it is generic,