>>1684675He's playing with you not dominating you like the other anon said.
In my experience they respond well to one of two things:
Making a high pitched "ow!" noise, pulling your hand away abruptly, and then completely avoiding contact for like ten seconds - or
Immediately saying "NO" in a nice deep bark and grabbing their muzzle, holding it, staring at their eyes
Obviously both of these require that you are engaged one on one with your dog. If he's biting you while you're walking around and shit you need to spend more time down on their level, it's hard to really train when you are moving around and not engaged directly.
Definitely encourage healthy play though, show him it's ok to get physical (without biting) when YOU are engaged, not when he's feeling ignored.