Spring MVC - Jaxb2Marshaller Examples

Code Snippets Spring MVC 

    @Bean("xmlView")
public View marshallingView() {
Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
marshaller.setClassesToBeBound(User.class);

MarshallingView view = new MarshallingView();
view.setMarshaller(marshaller);
return view;
}
Original Post




See Also