Java Spring web services for fetching token from database