Can I spray paint a crib?

I’m been looking into painting my brown used crib white. I saw someone online use spray paint, with a really good non-toxic topcoat. Would that be okay? I’m only worry is the baby getting older and chewing on it and eating paint.