Hi there ~
Your boyfriend probably had herpes
. It might be best to confirm this by getting himself tested for the same as well as other sexually transmitted diseases (STDs). I hope you also get yourself test for the same since you have been in relationship with him and assuming that this is a monogamous relationship. Please seek the help of your doctor if your test is positive for any infection. I hope this helps.
Take care and have a lovely day!