IVONA SpeechCloud Java SDK中凭据文件出现maven错误
我只是尝试在IntelliJ IDEA中实现IVONA SpeechCloud Java SDK(使用特定的示例文件SampleIvonaSpeechCloudCreateSpeech.java,该文件应该能够“按原样”运行),但不断得到一个关于AWS凭据文件的错误,该文件无法加载
在下载IVONA SpeechCloud Java SDK并使用Maven依赖从现有源代码创建新项目后,我更新了IVONA凭据。属性包含我的个人accessKey
和secretKey
的文件
我还更新了pom中的<dependencies>
字段。包含以下代码的xml文件:
<dependency>
<groupId>com.ivona</groupId>
<artifactId>ivona-speechcloud-sdk-java</artifactId>
<version>1.0.0</version>
</dependency>
有人知道如何修复Unable to load AWS credentials from the /resources/IvonaCredentials.properties file on the classpath
错误吗
# 1 楼答案
好吧,我在源文件中花了几个小时才弄明白这一点。您可以创建自己的提供程序类,在其中可以将凭据作为字符串参数传入
这是我的自定义凭证类“IvonaCredentials”
我就是这样称呼我的班级的