Целью является хранение встроенных объектов Java (
Код: Выделить всё
Embedding
Вот класс Embedding:
Код: Выделить всё
public class Embedding {
@ProtoField(number = 1, collectionImplementation = ArrayList.class)
List latentScores;
@ProtoField(number = 2)
String document;
@ProtoFactory
public Embedding(List latentScores, String document) {
this.latentScores = latentScores;
this.document = document;
}
// ...
}
Код: Выделить всё
@ProtoSchema(
includeClasses = {Embedding.class},
schemaFileName = "embedding.proto",
schemaFilePath = "proto"
)
public interface EmbeddingSchema extends GeneratedSchema {
}
Код: Выделить всё
\build\generated\sources\annotationProcessor\java\main\cynicdog\io\data\
Однако не удается построить с сообщениями об ошибках, как показано ниже:
Код: Выделить всё
Vertx-Kubernetes-Integration-Templates\clustered-embedding-stores\backend\build\generated\sources\annotationProcessor\java\main\cynicdog\io\data\EmbeddingSchemaImpl.java:16: error: package org.infinispan.protostream.annotations.impl.processor does not exist
@org.infinispan.protostream.annotations.impl.processor.OriginatingClasses({
^
Я очистил кеши Gradle и пересобрал зависимости и проект, но Я по-прежнему сталкиваюсь с ошибкой, указывающей, что infinispan.protostream.annotations.impl.processor не может быть найден. Я также заметил, что во внешних библиотеках моей IDE этот модуль фактически отсутствует.
Вот build.gradle части зависимостей проекта и спецификации версии:
Код: Выделить всё
ext {
vertxVersion = '4.5.11'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(20)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("io.vertx:vertx-web:${vertxVersion}")
implementation("io.vertx:vertx-web-client:${vertxVersion}")
implementation("io.vertx:vertx-infinispan:${vertxVersion}")
implementation("io.vertx:vertx-health-check:${vertxVersion}")
// https://mvnrepository.com/artifact/org.infinispan.protostream/protostream
implementation 'org.infinispan.protostream:protostream:5.0.12.Final'
// https://mvnrepository.com/artifact/org.infinispan.protostream/protostream-processor
annotationProcessor 'org.infinispan.protostream:protostream-processor:5.0.5.Final'
testImplementation 'org.infinispan:infinispan-commons:15.0.0.Final'
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
https://github.com/CynicDog/Vertx-Kubernetes- Integration-Templates/blob/protostream-integration/clustered-embedding-stores/backend/src/main/java/cynicdog/io/Main.java
Я очень ценю ваше руководство и поддержку, которые помогли мне решить эту проблему и рассказали мне больше об Infinispan!
Подробнее здесь: https://stackoverflow.com/questions/792 ... schemaimpl