If you remember the JSON and XML plugin written in Chapter 5, which was called API plugin, there was a possible improvement at the end of the recipe: adding the XML annotations is cumbersome and a lot of work, so why not add them automatically, so every entity defined in your application does not need the usually required annotations for XML processing with JAXB.
The source code of the example is available at
As usual, write a test first, which actually ensures that the annotations are really added to the model. In this case they should not have been added manually to the entity, but with the help of bytecode enhancement:
public class XmlEnhancerTest ...