I get asked from a good chunk of apprentices, "how do you deal with working under someone who's a complete asshole everyday?" This is something that most people will have to deal with at one point or another, so lets go into it a little bit.
First and foremost I need to point out that for your entire life, you will be coming across people that don't vibe with you. You will undoubtedly have to suffer through being around people who treat you with disrespect. Sometimes it may be family members, sometimes bosses, co-workers, teachers, friends, etc. This is a skill you need to learn to hone.
We teach people how to treat us. When we allow someone to act a certain way towards us, they will develop a habit of thinking that way is acceptable and will continue to do it over time. So from the jump you should have this in the back of your mind when thinking about how to react when somebody treats you unfavorably. The next thing to realize is that people are always on a path of least resistance to their own happiness. Plainly put, people will always do what makes them happiest to do. So when someone is being an asshole to you, it probably makes them feel better than it does to be kind to you. Something about their own self-esteem is elevated when they berate you.
Not everyone has the same level of emotional or social maturity. Some people develop a widened consciousness at an early age, some don't develop until much later in life, and others don't mature at all. So realize that the way people treat you says more about them than it does about you. If somebody cuts you off in traffic, it's not about you. They have an idea that their priorities are more important than yours, and they don't care about what your priorities are. So they make a decision that basically puts a middle finger up in front of your face, so that they can be happy. Same goes for being an electrical apprentice. Some Journeymen or Master Electricians don't like to teach, but are stuck with a fresh new apprentice who''s never used a tool in their life. This pisses that guy off, and rather than thinking about the development of the apprentice and caring about teaching them, they're stuck in their own head and thinking fucked up thoughts about how they're getting the shit end of the deal. So they take it out on you. Or some people are really likable and some are not. The not-so-likable person may be jealous that the likable person gets more attention than they do. And if this person happens to be a middle child with years of being treated by their parents as a "stand by" kid, they may have a lifetime of hating people that get lots of attention and they'll come unglued on you. Some people see you as attractive, and think that they're not - so again they will try to belittle you so you feel ugly.
My point here is that there's always a reason that someone is being an asshole to you. It doesn't come from nowhere. It's a trained behavior that has taken years of treating others the same to get to the level of professional jerk that this person has reached. Just know it is not about you; they are a hurt person, and the only way they know how to balance the scale is by putting their pain on to someone else's shoulders so their own shoulders get lightened up for a little while.
My advice is to just keep being you. Don't let people phase you and take you off of your path. If you go through life constantly worrying about the way other people treat you, you're going to start a bad habit of thinking that you're not good enough. Don't let them have that power over you. Don't let their sickness or immaturity penetrate your mind and mess with your emotions. Just be strong in who you are, put on a smile, shake the haters off, and kill them with kindness. Also if you do the best work of your life everyday, after awhile they'll have no choice but to shut their mouths. You'll be respected by everyone else around, so their opinion of you will no longer be validated.
The last thing I'm going to say is this....THEY WILL CONTINUE TO TREAT YOU LIKE SHIT OR NOT, NO MATTER HOW YOU ACT. So if you let them get in your head and bring you down, or if you don't...either way they're going to keep being them. So its really your choice. Will you let their poisonous attitude affect you or not? It's really that easy.