Can't stress enough how important this is. Every time you justify an action - you are trying to prove your worth. Especially in a relationship. Every time you make excuses to someone - you are trying to prove your worth.
The first step is to learn who you are. I hear a lot of people say they know themselves but they actually don't. What's your character like? Your personality? Are you honest? Do you have integrity? What do you value in others? Do you fall in love based on looks or something else? If you say that you don't like something, is it because you tried it and now you have an opinion that you can elaborate or are you following the opinion of the majority?
Being able to answer all these questions takes years of introspection and soul searching, but once you know the answers, you stop taking shit from others. You know exactly what you bring to the table. If you don't want meaningless relationships, you don't fall for them anymore.
Knowing yourself and understanding your past, present and potential future is the greatest gift you can give to yourself.