现在,我有一个使用 Maven 构建的 Spring Boot 应用程序。在 IntelliJ 中,我将运行它,它会给我这个错误日志。最后一个错误说The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials。但我确实有它们。在我的环境变量中,我GOOGLE_APPLICATION_CREDENTIALS指向了我的credentials.json.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ …Run Code Online (Sandbox Code Playgroud) 在 Maven 中,我有很多 IntelliJ 导入的依赖项。我也有一个CSVReader
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.2</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
在使用它的类中,我有import com.opencsv.CSVParser;. 它说“无法解析符号 CSVParser”。它给了我一个将库添加到类路径的选项。我很犹豫是否要这样做,因为上次我这样做,它解决了错误,但不允许我运行我的 Spring Boot 应用程序。为什么不能像其他库一样导入该库?