The solution to the problem that the mysql driver jar package cannot be found: first search for Maven-related information in settings; then configure the downloaded Maven path and configuration file on the Maven page; finally click Apply application and click OK. Can.
Recommended: "mysql tutorial"
Problem description: Mysql is configured in the project's pom.xml Dependency, when running the test class, an error message shows that the driver package of mysql cannot be found. It can be seen that the jar package of mysql is not loaded in maven.
The error is reported as shown below:
Solution ideas and methods:
1. First search for maven-related information in settings: the displayed configuration is IDEA’s default maven
1.1 General development requires you to manually configure the maven path and configuration file yourself:
1.1.1 Download the official address of maven: http://maven.apache.org/download.cgi
1.1.2 Download and unzip it to the D drive
2. Then configure the maven path and configuration file just downloaded on the maven page
3. Clickin the lower right corner ApplyApply, then clickOK.
4. Reload the dependencies in the project. After loading, you will find that the jar packages with added dependencies will all be under External Libraries:
The above problems were all encountered during the graduation design process. , record the problem after solving it to avoid recurrence.
The above is the detailed content of How to solve the problem that the mysql driver jar package cannot be found. For more information, please follow other related articles on the PHP Chinese website!