Added logic to stage using spring jdbc