I can use some pointers from the Spring experts.
I have been experimenting with using the MESE scaffolding tools for a new project. I am new to Spring and this has been helping me to generate working examples to learn from. So far so good. Now I noticed some odd behavior when I generate a code with REST and JSON support enabled AND there are multiple tables specified (maybe a EMPLOYEE and MANAGER table). In this case some of the RESTful services return JSON and others return XML. For example, this returns JSON:
http://localhost:8080/testApp1/Employee/123
where as this returns XML:
http://localhost:8080/testApp1/Employee/123/manger
In the code that gets generated by the scaffolding tools, how is the view specified? I looked in the web-context.xml that gets generated and that has some viewResolvers, but I don’t understand how it fits together. I assume the some entities are defaulting to XML output and others have JSON explicitly specified. Ultimately my services will have an output=outputType parameter on the URL so the user can specify xml, json, or csv. How should I approach this, using the scaffolded code as a basis.
Thanks for any advice!
Andy