I have configure external Maven 3.9 to spring tool suit.
I did all possible way what was mentioned in different post from stackover flow but failed to overcome below
Go to properties of you project , in Project Facets.
The Window on the right, select Runtimes : then you will have your JRE (JRE 7 or 8) check the box and you will have it in the left the box checked Java : choose your version of Java : 1.8 and you'll see that Dynamic Web Module will disappear. After that uncheck the choosen runtime jre and the Dynamic Web Module will reappear . here you have to choose your version 3.1 without the error then -> Apply OK