We don't know more about intentions of attacker, who has been arrested.
Police and military forces have been targets of attacks themselves.
A knife-wielding man attacked a soldier on patrol as part of an anti-terror operation in Paris on Friday but did not cause any injuries, police said. "This new attack legitimate fully what we want to do, that is to say, to make this device even more unpredictable, even more undetectable to potential attackers", she continued. This is the seventh attack against the patrolling soldiers, Europe 1 radio reported.
French defence minister Florence Parly said the fact that the attacker was swiftly brought under control Friday was "proof of the professionalism and efficiency of the Sentinelle soldiers in their mission to protect".
Recently, authorities said last month that six soldiers in Levallois, outside Paris, were hurt when a driver deliberately rammed into them.
Including the attacks today in Paris and Burgundy, France has already seen 10 terrorist incidents in 2017.
The incident, in which the soldier in question was not injured, was the latest of several attacks on troops deployed in large numbers to patrol sensitive places in France after a series of attacks by Islamist militants that have killed more than 230 people in France in the past three years.
France has been under a state of emergency since a series of coordinated attacks in Paris in November 2015 which left 130 people dead. One officer was hit in the head with the hammer, prompting police to fire at the attacker.