我正在尝试使用以下代码:
AmazonSQS amazonSqs = new AmazonSQSClient(new ClasspathPropertiesFileCredentialsProvider());
我的pom.xml
文件中有java sdk:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>LATEST</version>
</dependency>
但它不会让我构建我的java应用程序,并产生以下错误:
Error creating bean with name 'videoTranscoderService' defined in file
[XXX/VideoTranscoderService.class]: Instantiation
of bean failed; nested exception is java.lang.NoClassDefFoundError:
com/amazonaws/ClientConfigurationFactory: com.amazonaws.ClientConfigurationFactory
-> [Help 1]
我无法理解它是如何找不到类ClientConfigurationFactory
的,因为它应该包含在Java SDK中吗?我感谢你们给我解决这个问题的任何帮助!
答案 0 :(得分:1)
com.amazonaws.ClientConfigurationFactory位于aws-java-sdk-core中,您需要将其添加到pom.xml中的依赖项列表