我正在使用 Impinj Octane SDK 3.7.0 和 Java Spring boot。我想将包导入我的解决方案,但我发现它有几个问题。这是我到目前为止所做的:
mvn install:install-file -Dfile=OctaneSDKJava-3.7.0.0-jar-with-dependencies.jar -DgroupId=com.impinj -DartifactId=octane -Dversion=3.7.0.0 -Dpackaging=jar
它构建成功,我可以使用 Octane SDK 的类,但是当我运行程序时,会出现以下错误:
试图调用不存在的方法。尝试是从以下位置进行的:
org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration$StandardGsonBuilderCustomizer.customize(GsonAutoConfiguration.java:90)
以下方法不存在:
'com.google.gson.GsonBuilder com.google.gson.GsonBuilder.setLenient()'
该方法的类 com.google.gson.GsonBuilder 可从以下位置获得:
jar:file:/C:/Users/hyc/.m2/repository/com/impinj/octane/3.7.0.0/octane-3.7.0.0.jar!/com/google/gson/GsonBuilder.class
类层次结构是从以下位置加载的:
com.google.gson.GsonBuilder: file:/C:/Users/hyc/.m2/repository/com/impinj/octane/3.7.0.0/octane-3.7.0.0.jar
行动:
更正应用程序的类路径,使其包含一个兼容的 com.google.gson.GsonBuilder 版本
为了使它工作应该做什么?