Baby eating problems

My son is 7 months old and I’ve tried for the past month I’ve tried giving him baby food and he absolutely hates it. I’ve tried green beans, sweet peas, banana, pears and baby cereal. He always spits it out. Anyone have any advice on this?