FORT DRUM, N.Y.—President Trump signed into law Monday a defense-spending bill that received widespread bipartisan backing for its efforts to counter Chinese aggression and support U.S. military servicemen and women.

Mr. Trump, in signing the John S. McCain National Defense Authorization Act at the Army’s Fort Drum post in upstate New York, praised the branch as an “unstoppable force.”

“America...