当前位置: 首页 > 知识库问答 >
问题:

我没有找到“导入org.springframework.jbdc.core.jsbctemplate”[重复]

龚志
2023-03-14

我搜索了一个小时来找到问题的解决方案,我使用maven to pom.xml来查找这个导入的库org.springframework.jdbc.core.jdbctemplate

我的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.sample</groupId>
	<artifactId>test1</artifactId>
	<name> Spring boots test</name>
	<version>0.0.2-SNAPSHOT</version>
	<dependencies>
		<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
			<version>2.0.5.RELEASE</version>
		</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>3.2.1.RELEASE</version>
</dependency>
	</dependencies>
	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<java.version>1.8</java.version>
	</properties>

</project>

结果是:-

[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< org.sample:test1 >--------------------------
[INFO] Building Spring boots test 0.0.2-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/spring-jdbc/3.2.1.RELEASE/spring-jdbc-3.2.1.RELEASE.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.626 s
[INFO] Finished at: 2018-10-21T08:41:16+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project test1: Could not resolve dependencies for project org.sample:test1:jar:0.0.2-SNAPSHOT: Failed to collect dependencies at org.springframework:spring-jdbc:jar:3.2.1.RELEASE: Failed to read artifact descriptor for org.springframework:spring-jdbc:jar:3.2.1.RELEASE: Could not transfer artifact org.springframework:spring-jdbc:pom:3.2.1.RELEASE from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

共有1个答案

麹承
2023-03-14

伙计,你可以做很多事情。

>

  • 检查maven存储库中org>springframework>bootspring-boot-starter的jar

    有时下载可能会中断,或者由于失败而无法正确下载,在这种情况下,删除org>springframework>boot下的spring-boot-starter并重新构建

    您可以再次清理和验证maven项目(我建议从控制台执行此操作,请转到pom.xml所在的文件夹并执行MVN clean verify)

  •  类似资料:
    • 我下载了pygame,但VS代码显示,在问题部分,它是在终端中,它显示“ModuleNotFoundError:没有名为'pygame'的模块” 是什么原因导致它无法导入? 编辑:我补充了一些细节

    • 我使用hadoop 2.7.2,hbase 1.4.9,火花2.2.0,scala 2.11.8和java 1.8的hadoop集群是由一个主和两个从。 当我在启动集群后运行spark shell时,它工作正常。我正试图通过以下教程使用scala连接到hbase:[https://www.youtube.com/watch?v=gGwB0kCcdu0][1] . 但当我试图像他那样通过添加那些类似

    • 我试图在EclipseIDE中使用Java编写一个插件。我必须在类中扩展JavaPlugin,但它说它不存在,我需要用它创建一个新类。我试着手动导入JavaPlugin,结果发现它不是一个包。 我试过导入org。巴基特。插件。JAVAJavaPlugin,但这似乎不起作用 现在应该是JConsolePlugin吗?当我悬停在问题上时,它要么说“创建类‘JavaPlugin’要么说“更改为JCons

    • 我必须使用谷歌云语音API在Xamarin.iOS应用程序中实现语音转换文本功能。 首先,我尝试使用google.cloud.speech.v1 Nuget包,但是gRPC库似乎不能与Xamarin一起工作(https://github.com/gRPC/gRPC/issues/1620,https://forums.Xamarin.com/discussion/94534/how-to-use-

    • 问题内容: 我对React和React Native还是相当陌生,并且正在使用React NativeBase。 我设法在单个文件中完成以下工作,但是现在我只是试图将我的代码分成单独文件中的多个组件。 问题是,我的导入组件未显示。我已经为此苦苦挣扎了一段时间,但我看不到自己在做错什么……可能真的很愚蠢。 这是我的代码: 代码/index.ios.js 代码/ main.js 我正在使用此运行: 因

    • 我正在学习用python编程,我在从包中的模块导入时遇到了问题。我使用的是Visual studio代码和Python 3.8.2 64位。 我的项目目录 在<code>电子商务/产品中。py文件我有: 这样我就可以从< code > ecommerce/Database . py 文件中导入< code>Database类。但是我出错了