The 29-year-old Irishman was the subject of three failed bids from Cardiff City during the January transfer window.
"I was more than happy to sign again and I have appreciated every minute that I have been here," said Hayes, who moved to Pittodrie in 2012.
"I am still enjoying it as well, working under the manager."
Dublin-born Hayes has added 12 months to his previous deal and boss Derek McInnes will hope others follow his lead.
Niall McGinn, Ryan Jack, Ash Taylor, Andy Considine and Peter Pawlett are all due to be out of contract at the end of this season.
"When I signed the last extension, I think it was three years ago, I always said that as long as he [McInnes] was here I would be happy to stay and I think that is the same with a lot of the boys," added Hayes.
The winger spent three seasons at Inverness Caley Thistle before joining the Dons and has scored six goals in this campaign.
Aberdeen winger Jonny Hayes has signed a contract extension until the summer of 2019.