-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Is there are additional steps to do?
message Foo {
// ...
google.protobuf.Timestamp modified_at = 4;
}data class FooDto(
// ...
val modifiedAt: Instant,
)@Mapper(
config = GrpcDtoMapperConfig::class,
)
interface AdminDbDtoMapper {
fun map(src: FooDto): Foo
}@MapperConfig(
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS,
collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED,
unmappedSourcePolicy = ReportingPolicy.ERROR,
unmappedTargetPolicy = ReportingPolicy.ERROR,
)
interface GrpcDtoMapperConfigplugins {
id("org.springframework.boot") version "3.0.2"
id("io.spring.dependency-management") version "1.1.0"
kotlin("jvm") version "1.8.10"
kotlin("plugin.spring") version "1.8.10"
kotlin("plugin.jpa") version "1.8.10"
kotlin("plugin.allopen") version "1.8.10"
kotlin("kapt") version "1.8.10"
}
// ...
kapt {
arguments {
arg("mapstruct.defaultComponentModel", "spring")
}
}
dependencies {
implementation("org.mapstruct:mapstruct:1.5.3.Final")
kapt("org.mapstruct:mapstruct-processor:1.5.3.Final")
kapt("no.entur.mapstruct.spi:protobuf-spi-impl:1.42")
// ...Error
foo.java:22: error: Can't map property "Instant ..modifiedAt" to "Timestamp ..modifiedAt". Consider to declare/implement a mapping method: "Timestamp map(Instant value)"..
Metadata
Metadata
Assignees
Labels
No labels