The Europeans, who had won one and lost one of their opening two games in Group B, were soon in front and commanded a three-goal lead after eight minutes.
Spain continued to dominate but their advantage was reduced to two by half-time, with the first period ending 16-14.
But Valero Rivera Lopez's men snuffed out any chance of a comeback from the Asians by continuing at full pelt in the second half, stretching their legs to a 28-22 lead with 10 minutes remaining.
Republic of Korea enjoyed a prolific final few minutes to reduce their deficit to four and take a bit of shine off the Spanish victory, which was underpinned by Cristian Ugalde Garcia's six.
Lee Jae Woo was top-scorer for the Republic of Korea team, who sit bottom of the pile with three defeats to their name.