UMASS BOSTON recently spent $10,000 for a full-page ad in the Boston Sunday Globe extolling the virtues of ex-Boston mayor Marty Walsh as he was leaving for his new job in Washington as secretary of labor.

The Boston Public Library (BPL) wasn’t as generous as UMass Boston.  Still, the library spent $2,000 for a quarter-page ad in the Globe also praising Walsh.

The ads from UMass Boston and the Boston Public Library appeared along with various-size ads from 22 private entities in an 11-page advertising supplement to the March 28 Sunday Globe. Bank of America, for example, also purchased a full-page ad bidding farewell to Walsh.

UMass President Marty Meehan did not respond to a request for comment about a public school spending $10,000 to say a public goodbye to the mayor. DeWayne Lehman, a spokesman for UMass Boston, justified the expenditure, which is more than two-thirds of a single annual tuition.

“UMass Boston is of and for the City of Boston,” Lehman said. “We were delighted to join other institutions in expressing gratitude for the city’s support for UMass Boston.”

Three other major institutions of higher education in Boston — Boston University, Boston College, and Northeastern University — did not buy an ad.

A BPL spokesman defended the library’s $2,000 expenditure.

“Mayor Walsh routinely demonstrated his commitment to literacy and the library’s mission in many ways, not least of which was a more than $130 million capital investment in the Central Library and our branches,” said spokeswoman Lisa Pollack.  She noted the BPL is not funded exclusively by the city; she said the school also has additional budget lines that are not public money.

The UMass Boston full-page ad said in part: “As Mayor, you’ve been a beacon of opportunity to the people of Boston . . . You’ve served as staunch advocate for American working families everywhere.”

The BPL quarter-page ad read in part: “We pledge to continue the work you have started toward making Boston a more just, equitable, and literate city.”