Patterned wafer bonding using ultraviolet adhesive