You've tried shouting at him to stop, but this only makes him more excited. Likewise, you smacked his rump but in a bizarre reaction, he redoubled his efforts at attacking your T-shirt. While this isn't a serious concern right now, what does worry you is that this behavior will continue into adulthood and he might accidentally hurt someone.
You know this behavior needs nipping in the bud... but how?
Therefore it's crucial to teach a puppy not to bite or 'bite inhibition'. This makes it second nature for him to never put his teeth on human skin, and makes for a much more reliable adult dog.