Implement a rest framework with java