Environment :Eclipse+Tomcat7 (or 8) +Jdk8+MySQL5.5
Note that the software version should be consistent, for example, Tomcat version 7 or 8, JDK version 8, MySQL version 5.5, 5.6, 5.7 and so on, many people do not look at the software version, a sudden operation, resulting in the subsequent project can not run. Also, be sure to finish the tutorial, finish the tutorial, finish the tutorial.
If the picture is not clear, click on the picture to enlarge it and make it bigger
Check the database VERSION: SELECT VERSION();
Steps to import the project and run it:
I. Import the project process
1. First click File-> Import
2, Choose existing projects into workspace
3. ① Select a directory, ② select a project, ③ Click Finsh
4. After successful import, javaWeb projects typically have a ball in the upper left corner. If yes, the import is successful; if no, the import is not successful. The import method may be incorrect or the environment is not paired
5. You can also modify the configuration to solve this problem
Eclipse configuration
Configure Project Facets, right-click the item, select Properties, and select Project Facets
First, make sure the Java option is selected, then if the Dynamic Web Module is not selected, select it, and a Furter Configuration availabe will be displayed. (If not, select apply, And then cancel, then apply, and then hit middle.
6. Note that after clicking Further Configuration availabe in the Dynamic Web Module, you need to set Content Directory to SRC /main/webapp
If an exclamation mark appears in the project, note that the configuration of the imported project is not the same as your Eclipse configuration. If no exclamation mark appears, do not change it
In the Java Build Path, select Libraries, select the JRE that reported the error, unbound has the error, then click Edit and replace it with JDK1.8. After the replacement is successful, the exclamation mark is not reported. If exclamation marks still appear, do your own search