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 there are coworkers or bosses you want to invite but are 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. Just don't hand them their invites at work or make a big deal out of it so nobody's feelings are 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 him or her if you have a friendly relationship. It doesn't hurt as a thoughtful gesture, but you're certainly not required.