Spain made it three friendly wins in just over a week with a narrow win over China but had to wait until six minutes from time to find the winner through David Silva.
It was the Chinese who had the better of the first period and Zheng Zhi twice should have put the Asians in front, as he fluffed his lines after rounding Iker Casillas early on and was then denied by a wonderful reaction save from the Real Madrid keeper 15 minutes before half-time.
The world champions, though, were much improved after the break and were desperately unlucky not to be in front as Raul Albiol and Andres Iniesta rattled the crossbar and Zeng Cheng made fine saves to deny Iniesta, Silva and Fernando Torres.
However, the winner did eventually arrive on 84 minutes when, after a wonderful run past four defenders, Iniesta squared for Silva to roll home the easiest of finishes.
Vicente Del Bosque had been able to select Barcelona and Athletic Bilbao players for the first time in the build-up to the Euros after their participation in the Copa del Rey final last week, but he chose to field just Xavi and Sergio Busquets from the start.
And the former Real Madrid boss would not have been impressed with his side's first-half display as they lacked a cutting edge going forward and were easily opened up on the counter-attack on numerous occasions.
Zheng had the first clear chance of the match on seven minutes as he capitalised on a mistake from Xabi Alonso to run through one-on-one with Casillas, but after rounding the keeper the Chinese captain delayed and then weakly pulled his shot into the side-netting.
The hosts nearly responded immediately as Silva's low cross found Alvaro Negredo free inside the area, but the Sevilla striker's bundled effort was knocked away by Cheng.
China continued to create opportunities and after Zheng's goalbound header had been deflected wide by Sergio Ramos and Casillas had parried Jao Hunmin's speculative effort, their best chance arrived on the half-hour.
A lightning-quick break from a Spanish corner found Zheng free at the far post but Casillas just managed to block the former Celtic midfielder's effort with his trailing leg.
Del Bosque made four changes at the interval as Victor Valdes, Jesus Navas, Iniesta and Torres replaced Casillas, Xavi, Busquets and Negredo and Iniesta's introduction in particular made a huge difference as Spain created chances at will in the second half.
The Barcelona midfielder was first to threaten as his sidefooted effort was brilliantly tipped over by Cheng, before the keeper made just as good a reflex save to turn away Silva's driven effort.
Albiol then headed against the bar when it appeared easier to score from five yards before an audacious piece of skill from Iniesta saw him control a cross from the right, flick the ball past two defenders and slam a shot back off the upright.
Moments later Torres failed to build on his goal against South Korea on Wednesday as he blazed wildly over when well-placed inside the area and it seemed the goal was never going to come when Silva was again denied by a brilliant save from Cheng when through on goal with 14 minutes remaining.
However, Iniesta had one final piece of magic left in him as he danced away from four Chinese defenders down the left and pulled the ball back for Silva to pass the ball into the unguarded net.
The European champions will now travel to their base just outside Gdansk on Wednesday before beginning the defence of their title against Italy on Saturday.