Skip to main content

Posts

Showing posts with the label generation

CXF JSON Generation remove @ prefix

Working with CXF-RS if you want to generate the json response along with xml than it becomes pain in cases where your xml is a mixture of attributes and elements. Problem comes because of default jettison json provider which is configured in cxf-rs. The jettison appends the '@' prefix  with the attributes. However, I needed json free from any prefixes. To achieve this i had configure jackson as json provider like this:                <jaxrs:providers>             <ref bean="jaxbProvider" />             <ref class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>         </jaxrs:providers>                         That's it and you should be free from prefixes.

Spring Roo is amazing

Developer spend 75% of their time working on boiler-plate code. Spring Roo do amazing job of doing that for you and gets you started really-2 fast. After that you can follow the application curve if writing the business logic. Why Roo? Define the class and its relation it will generate the DB using hibernate  you can generate the controller's ( and UI) from the same classes with CURD operation supported test code is also gets generated  code generated is clean and easy to modify dependency resolution happens through maven once you are done projects are eclipse ready easy to get rid of metadata for production  Other tools: I came across Grails but i needed a framework which will generate the java so roo was the better choice for me Video helped me get started:  http://s3.springsource.com/MRKT/roo/2010-01-Five_Minutes_Roo.mov