@Override
public IResource getResource()
{
return new RestResourceFullAnnotated(
new JsonTestWebSerialDeserial(), WicketApplication.this);
}
});
mountResource("/api2", new ResourceReference("regExpRestResource")
{
@Override
public IResource getResource()
{
return new RegExpRestResource(new JsonTestWebSerialDeserial(),
WicketApplication.this);
}
});
mountResource("/api3", new ResourceReference("multiFormatRestResource")
{
@Override
public IResource getResource()
{
MultiFormatSerialDeserial multiFormat = new MultiFormatSerialDeserial();
multiFormat.registerSerDeser(new JsonTestWebSerialDeserial(),
RestMimeTypes.APPLICATION_JSON);
multiFormat.registerSerDeser(new XmlTestWebSerialDeserial(),
RestMimeTypes.APPLICATION_XML);
return new MultiFormatRestResource(multiFormat);