Gov. Charlie Baker on Thursday signed a $187.5 million spending bill closing the books on the 2016 fiscal year, vetoing two sections relating to adult education and the Department of Public Safety's retained revenue.

"I appreciate the Legislature's collaboration in enabling the Commonwealth to end fiscal year 2016 in balance and I am pleased to sign the vast majority of this bill into law, with the exception of two issues," Baker wrote in a message to lawmakers.

Baker vetoed $25,000 for Lawrence's Casa Dominicana Inc., an earmark within the Department of Elementary and Secondary Education's adult basic education appropriation, writing that the earmark had "already been funded and paid out."

The governor also rejected an outside section increasing both the revenue ceiling and authorized spending for the Department of Public Safety's retained revenue appropriation. He said the increases were unnecessary.

The biggest spending item in the bill is $164 million for MassHealth. Other appropriations included $3.8 million in new funding for elder home care services, $1.2 million to pay for operations at the new state office that will oversee the app-based ride-hailing industry, and $8.75 million for the student and school assessment in the Department of Elementary and Secondary Education, where officials are working to develop a new standardized test for Massachusetts students.

The legislation renames a Brookline Avenue overpass as the “David Ortiz ‘Big Papi Bridge,” in honor of the retiring Red Sox slugger. Baker and House Speaker Robert DeLeo joined Red Sox players and fans at Fenway Park on Sunday to celebrate the bridge and Ortiz’s career.

According to the Massachusetts Taxpayers Foundation, the bill includes $91 million of the $111 million in budget-balancing solutions recommended by Baker. The biggest involves drawing up to $60 million from the state's Convention Center Fund to use for general spending purposes, a move that has sparked debate whether Baker will continue to oppose expansion of the Boston Convention and Exhibition Center expansion.

The supplemental budget, based on a bill Baker filed in July, hit the governor's desk a week ago after it began its move through the Legislature that morning. It includes more than three dozen outside sections, including language relating to scholarships, preparation of the Nov. 8 election ballots, veterans agents and veterans housing.