Do I Have to Invite My Boss and Coworkers?
In short, you should never feel obligated to invite anyone to your wedding (even if they do control your paycheck). The easiest way to avoid any drama is to not invite any coworkers at all to your wedding. That way, if anyone asks or you suspect one of your coworkers is itching for an invite, you have an easy out. On the other hand, if you have coworkers or bosses you want to invite but you're worried about an awkward exchange at work with others, there are really two ways you can go.
If you consider some of your coworkers to be friends (like you hang out outside of the office and text each other about non-work things) and everyone knows it, then there should be no problem inviting just them. One thing, though: Don't hand them their invites at work or make a big deal out of it so nobody's feelings get hurt.
However, if you work on a smaller team and are considering inviting a handful of co-workers (that you aren't friends with outside of work), then it gets tricker. In that case, you really should think of your invite list in circles. So either invite the entire team or skip them altogether.
As for your boss, invite them if you have a friendly relationship. It doesn't hurt as a thoughtful gesture, but you're certainly not required to (and there's a chance they'll RSVP no, anyway).