First, the description of the problem
in order not to waste your time, you can look at this a few words, and then decide whether or not to continue reading it.
This blog can solve the problem is
an error generated when the eclipse written by someone else to import a web project.
In other words, how a people's right to import eclipse web projects
suitable for white, and beginners
Let's carry out the body of
a preparation for a good web project download
Here is the download or downloaded from a web project on GitHub
Second, open the eclipse project import the web
of course how to import the correct item you can go to Baidu
Third, the most important thing is after import
1 error First, look for what are likely to occur, and then you choose to modify according to your actual situation
(1) different versions of the jdk
(2) different versions of MySQL
( 3) different version of tomcat
(4) to load the .jar version of the package drive connector of different
tomcat of error may be generated (5) during
various problems in short, is caused by different version,
these are what you want to modify or you want to see
Points to solve the problem
(1) different versions of jdk
(3) different version of tomcat
(2) different versions of MySQL
here I am mainly talking about the difference before and after versions MySQL5
Load the driver prior to version 5 of
Class.forName ( "com.mysql.jdbc.Driver");
after 5 versions load the driver
Class.forName ( "com.mysql.cj.jdbc.Driver");
Create a connection prior to version 5
DriverManager.getConnection ( "jdbc: mysql: // localhost: 3306 / database name", "username", "password");
created after version 5 is connected
DriverManager.getConnection ( "jdbc: mysql: // localhost: 3306 / database name useSSL = false & serverTimezone = UTC " ," username "," password ");?
The difference between the old and new versions of MySQL If you want to know more can Baidu
To modify the above code, the pool is not in connection, there is DButi layer or in dao
The connector .jar version of the package (4) to load a different driver
if your database version is basically different to go through this step
first delete the original project
He then delete your database and matching bag copied
right-click on it buildpath
May be produced (5) during the tomcat error
if your tomcat error or not start
solving method, first
Task Manager -> Details -> find Javax, the right end of the task
(usually this is not it, this error the reason is that the port number is occupied)
then uninstall and then reinstall the eclipse tomcat you will be able to