FORT DIX, New Jersey — President Barack Obama said on Monday he planned to sign a $1.1 trillion spending bill that was passed over the weekend by Congress to lift the threat of a government shutdown.

Obama, speaking at a military base in New Jersey, said it was critical that lawmakers from both parties supported the bill, which included payouts for the military.

“That’s why it was so important that folks in Congress, Democrats and Republicans, came together and passed legislation that I’m going to sign to keep our government open and funded for the coming year, and that includes military operations,” he said.