A business student stuck his fingers up at gardaí and spat at them while they were dealing with an “aggressive crowd” in Dublin city centre.