Israel's Defence Minister Yoav Gallant told troops that Hamas was being worn down but pursuit of the group will "continue for years".