Unfortunately, for some reason I wasn't able to search the forum.The
version has obvioulsy been around(!) for a long time. There is a ballad c1670, called
The Willow (or VVillovv!) Green or The distressed lovers complaint
in the Douce collection, which refers to the green willow in similar circumstances:
And cunningly from me is parted
which makes me wear the willow greenThe song All around my hat appears on several other Bodleian Ballad library images under the title 'The Green Willow' (sometimes referring to a cap, not hat), but no tune is given in any of them.
There is also a political parody called The Disappointed One, starting with the 'All around my Hat' verse, unfortunately not dated.