We study the partition function of two-dimensional lattice bosons at T=0 and derive a dual representation which is isomorphic to a bulk superconductor with fluctuating-gauge field in an applied magnetic field. This allows us to relate boson ground states to thermodynamic phases of the superconductor. A density-wave Bose insulator corresponds to an Abrikosov flux-lattice phase, whereas boson superfluidity implies a nonsuperconducting flux-line liquid phase. By analogy with a boson supersolid, we suggest the possibility of an exotic Abrikosov flux-lattice phase with no superconducting long-ranged order. © 1989 The American Physical Society.