Base rest server in java