I would never hit a dog. And in this situation, hitting can get the dog more excited. He wants to play with you and the hitting is attention. Courtney had good advice - he needs to be worn out more and continue with redirection and then timeout if he still won't stop.
ADCH Mikko (USDAA) SCH-B; (NADAC) EAC, EJC, TN-E, TG-E, VerO; (AKC) NAJ, CGC; (NACSW) NW1 - 9 year old GSD