简体   繁体   English

Hibernate + Maven + MySQL连接器

[英]Hibernate + Maven + MySQL Connector

I have a little bit of a problem here. 我这里有点问题。

When I started a new project in Eclipse for instance, I add a new dependency with Maven to manage the MySQL connector dependency. 例如,当我在Eclipse中启动新项目时,我使用Maven添加了一个新的依赖项来管理MySQL连接器的依赖项。

But when I configure a new Driver Definition, it says that it is unable to locate JAR/zip file of the driver definition mysql-connector-java. 但是,当我配置新的驱动程序定义时,它表示无法找到驱动程序定义mysql-connector-java的JAR / zip文件。 But as long as I understand it is manage by Maven so it should be anywhere on the Eclipse project right? 但是,据我了解,它是由Maven管理的,因此它应该在Eclipse项目中的任何地方正确吗? If I have to downloaded manually and save it on my local drive what is the use of manage that dependency with Maven? 如果必须手动下载并将其保存在本地驱动器上,那么使用Maven管理该依赖项有什么用?

Not sure about maven, but I use Gradle... In these cases, what happens, there is a .gradle folder available. 不确定maven,但我使用Gradle ...在这些情况下,会发生什么情况,没有可用的.gradle文件夹。

We normally delete the ...users/.gradle/files/cache/{project} contents from the same path and do the gradle refresh. 通常,我们从同一路径中删除...users/.gradle/files/cache/{project}内容,并进行gradle刷新。 You can try with the same. 您可以尝试相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM