Spring+jax appears java.io.Serializable is an interface, and JAXB can ' t handle interfaces
The reason is that there is a baseentity virtual class in my WebService method
Public Abstract class extends Serializable> {public abstract ID getId (); Public Abstract void setId (ID ID);
Where the return value of the Get method is implemented with the Serializable interface
Daoteng a long time to find the solution on the Internet as follows
@XmlAccessorType (Xmlaccesstype.field) public abstract class Abstractentity<id extends serializable> {@ Xmltransientpublic abstract ID getId ();p ublic abstract void setId (ID ID);
@Xmlaccessortype
controls whether fields or Javabean properties are serialized by default. This method defaults to Xmlaccesstype.public_member
Xmlaccesstype
Property
FIELD Each non-static, non-transient field in the jaxb binding class is automatically bound to XML unless annotated by xmltransient. |
NONE all fields or properties cannot be bound to XML unless they are annotated specifically with some JAXB annotations. |
Each fetch method/set method pair in the &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;JAXB binding class will be automatically bound to XML unless annotated by xmltransient.
public_member & nbsp; each public Get method/set method pair and each public field will be automatically bound to XML unless annotated by xmltransient. |
Spring+jax appears java.io.Serializable is an interface, and JAXB can ' t handle interfaces