Maptruct在我的IDE中本地工作,没有任何问题。 但是似乎构建服务器未使用mapstruct spi配置,因为它无法访问自定义getter和setter方法。 该配置位于从工件下载的另一个jar中。 我试图用提供的配置添加依赖项,但这无济于事。 有什么方法可以提供对配置的访问? 这是我项目中的pom.xml文件:
version: "3.7"
services:
spark-master:
image: cmishr4/spark:latest
container_name: spark-master
hostname: spark-master
ports:
- "8080:8080"
- "7077:7077"
volumes:
- ./../share:/share
privileged: true
networks:
- spark-network
environment:
- "SPARK_MASTER_PORT=7077"
- "SPARK_MASTER_WEBUI_PORT=8080"
command: "sh start-master.sh"
spark-worker:
image: cmishr4/spark:latest
depends_on:
- spark-master
ports:
- 8080
volumes:
- ./../share:/share
privileged: true
networks:
- spark-network
extra_hosts:
- "DESKTOP-PCH5L6D:10.0.75.1"
environment:
- "SPARK_MASTER=spark://spark-master:7077"
- "SPARK_WORKER_WEBUI_PORT=8080"
command: "sh start-worker.sh"
networks:
spark-network:
driver: bridge
ipam:
driver: default
调试日志:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<annotationProcessorPaths>
<path>
<groupId>com.different.jar</groupId>
<artifactId>custom_mapstruct_config</artifactId>
<version>${custom.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<compilerArg>
-Amapstruct.suppressGeneratorTimestamp=true
</compilerArg>
<compilerArg>
-Amapstruct.suppressGeneratorVersionInfoComment=true
</compilerArg>
<compilerArg>
-Amapstruct.unmappedTargetPolicy=WARN
</compilerArg>
</compilerArgs>
</configuration>
</plugin>
<dependency>
<groupId>com.different.jar</groupId>
<artifactId>custom_mapstruct_config</artifactId>
version>${custom.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
<scope>provided</scope>
</dependency>
config.jar包含META-INF / services文件夹,就像在mapstruct参考指南中一样。
我想念什么?