Have you tried a prat fall? PIck the good time to do this like walking in a hallway. When he bites at your leg, fake a fall smacking the wall with your hands. The trick is to let him think his biting suddenly made a huge noise, with lots of no's. Also- ignore him after you do it. No consoling- you are " flat out irratated".. no eye contact of reassurance etc. I had a shepherd that was so bad, I even raised my lips like a growl ... He left my legs alone after that.. Another one is to stomp your feet... ( dont step on his paws..)
** or- stop and make him sit.. Wait like count to 10.. release him and start to walk, if he does it again- stop make him sit.. Pretty soon he will figure out he is getting no where with this..