It provides $717 billion for military funding, which Trump described as historic.
If President Donald Trump had wanted to make a gracious mention of John McCain, the ailing Republican senator from Arizona, he could have done it Monday, when the president signed the $716 billion military spending bill named in McCain's honor.
Presidents have used signing statements since the 19th century to express reservations about bills they signed.
Sen. Lindsey Graham, R-S.C., and other lawmakers have criticized the idea of reducing troop levels. The new recruits will bring the total strength of the Army to 487,500 soldiers; Navy, 335,400 sailors; 186,100 in the Marine Corps; and 329,100 in the Air Force.
The measure authorizes a 2.6 percent pay raise for troops - the largest in almost a decade. Mr. Trump blasted her on Twitter as a "lowlife" and "not smart".
According to the White House, the bill authorizes an increase of 15,600 troops, funding for 77 F-35 fighter jets and funding for 13 new battleships.
MSNBC's Andrea Mitchell condemned President Donald Trump's failure to mention Sen.More news: Chad Kelly’s Debut Creates QB Conundrum In Denver
The president also said the measure will help to create the new U.S. Space Force, which he said is necessary to counter military moves by China and others in orbit.
Trump has openly mocked and criticized McCain in a feud that began in 2015 when the president said McCain was not a war hero.
"Serving as chairman of the Senate Armed Services Committee and working on behalf of America's fearless service members has been one of the greatest honors of my life".
The act sets active duty end strength for the Army at 487,500 in fiscal 2019, which begins October 1, 2018.
This year's NDAA authorizes about $639 billion for the base budget of the Pentagon and defence programmes of the Energy Department.
U.S. legislation temporarily banning deliveries of the Lockheed Martin F-35 Lightning II Joint Strike Fighter (JSF) to Turkey became law on 13 August.
The NDAA also requires certification that the United Arab Emirates and Saudi Arabia are bringing the Yemen conflict to an end, and if not, stops U.S.in-flight refueling services for the pro-government coalition.