导入 google 视觉和存储时出错
Error importing both google visions and storage
我正在使用 spring 引导,无法同时导入 google 存储和 Vision。我目前有 com.google.cloud.spring.storage.*;
但至于幻象,com.google.cloud.visions
或 com.google.cloud.spring.visions
不存在。如何正确添加我的 pom.xml 以便同时拥有视野和 google 存储空间?
...
<properties>
<java.version>11</java.version>
<spring-cloud-gcp.version>3.2.0</spring-cloud-gcp.version>
<spring-cloud.version>2021.0.1</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-storage</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-vision</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-dependencies</artifactId>
<version>1.2.8.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>spring-cloud-gcp-dependencies</artifactId>
<version>${spring-cloud-gcp.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>25.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
这里还有一大堆填充文本,因为 Whosebug 不会让我 post 因为它认为大部分 post 是代码,这里没有足够的细节:)
如@DazWilkin 所述,
根据您提供的文件内容,spring-cloud-gcp-starter-storage的group_id是org.springframework.cloud. Groupid是项目的唯一标识,使用它可以在所有项目中唯一标识一个项目。
我正在使用 spring 引导,无法同时导入 google 存储和 Vision。我目前有 com.google.cloud.spring.storage.*;
但至于幻象,com.google.cloud.visions
或 com.google.cloud.spring.visions
不存在。如何正确添加我的 pom.xml 以便同时拥有视野和 google 存储空间?
...
<properties>
<java.version>11</java.version>
<spring-cloud-gcp.version>3.2.0</spring-cloud-gcp.version>
<spring-cloud.version>2021.0.1</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-storage</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-vision</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-dependencies</artifactId>
<version>1.2.8.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>spring-cloud-gcp-dependencies</artifactId>
<version>${spring-cloud-gcp.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>25.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
这里还有一大堆填充文本,因为 Whosebug 不会让我 post 因为它认为大部分 post 是代码,这里没有足够的细节:)
如@DazWilkin 所述, 根据您提供的文件内容,spring-cloud-gcp-starter-storage的group_id是org.springframework.cloud. Groupid是项目的唯一标识,使用它可以在所有项目中唯一标识一个项目。