It's just a theory of mine, but I think people who lie in situations like these do it to get attention. They feel like their real life is boring and nobody would like them. So they lie, and people are interested in what they say, so it makes them feel good and perpetuates the cycle.
Don't take it personally, it is something about him, not you. So to get upset won't help

It would be like getting upset that he had red hair.
If your aim is to not hear the stories, then the key is he tells them to get attention. He wants to have you pay attention to him, to be excited or interested in him. So be specific. If he starts telling a story about a bar fight, gently interrupt him and say "Bar fight stories bother me, please don't tell me any more." If he starts talking about an ex, gently interrupt him and say "Thinking about ex-s upset me, I need to keep them in the past." So gently but firmly indicate that you will not listen to that thread. And then immediately switch to a factual topic like "so are you coming to the holiday party?" That's the key. Show him you *can* be interested in him, in factual topics. That way it's like puppy training. You are showing him he can get attention in a good way. If he tries to get it in an unhealthy way, shut down immediately.
You can't use negative reinforcement - that is a form of attention. You have to go with
1) positive attention in a good topic area
2) **NO** attention in a not-good topic area