President-elect Donald J. Trump made a public show of support for his choice to lead the Defense Department.