Boyfriend has been lashing out lately.

We were walking and i have this key chain which is pretty much a thin and light shoe string. Well i was holding the keys and just swinging it lightly in the air after i checked him in. He seemed happy at first until I started doing it than he was like stop! And i was like why I'm not bothering you and I continued he than grabs my arm kind of hard and shifted me to the otherside of him rough like. I didn't know what to say, because i have never been in this situation and he apologized later saying he know he was wrong for it. One time before he lashed out and smacked me in the back of my neck, but i know that one was an accident but why is hitting a first reaction?? We have been dating for almost 8 months and I am really worried this can head for domestic abuse. I love him and i know he loves me but this can't be good.