How to marshall non-string objects with JAXB and Spring
- by lesula
I was trying to follow this tutorial in order to create my own restful web-service using Spring framework.
The client do a GET request to, let's say
http://api.myapp/app/students
and the server returns an xml version of the object classroom:
@XmlRootElement(name = "class")
public class Classroom {
private String classId = null;
…