I am looking to use thrift for my web service calls. From what I've read so far from thrift documentation is that I'll have to write a thrift file containing my POJOs and services that I want to expose. This file then needs to be compiled using a thrift compiler to generate the Java classes. And then client and servers have to be written using these.
Is there a simpler way to achieve this (any annotation based or Spring framework integrations available)?
Nope, there's no custom binding between spring and thrift. Once you've created your .thrift
files, you will generate Java classes that will form the thrift communication layer.
For example, I've created a Java server that calls SQL over hibernate (this is one layer) and returns data over thrift (another layer). Unfortunately, there has to be some Java code that will process moving abstract data from one layer into another.