Mean boyfriend

My boyfriend tells me to grow up whenever I get mad about something or when I get anxiety about stuff. It pisses me off and hurts me. Why does he do this? How should I react