Merge pull request #72 from CatCccC/develop

mapstruct upgrade
This commit is contained in:
feihu.wang 2020-12-21 11:14:21 +08:00 committed by GitHub
commit dd45383fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 13 deletions

View File

@ -34,7 +34,7 @@
<springboot.version>2.2.5.RELEASE</springboot.version>
<tensorflow.version>1.12.0</tensorflow.version>
<es.version>7.6.1</es.version>
<mapstruct.version>1.3.1.Final</mapstruct.version>
<mapstruct.version>1.4.1.Final</mapstruct.version>
</properties>
@ -248,12 +248,7 @@
<!-- MapStruct START -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<!-- MapStruct end -->

View File

@ -30,11 +30,7 @@
<!-- MapStruct START -->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<artifactId>mapstruct</artifactId>
</dependency>
<!-- MapStruct end -->
</dependencies>
@ -45,6 +41,19 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source> <!-- depending on your project -->
<target>${java.version}</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<!-- other annotation processors -->
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -8,7 +8,7 @@ import org.mapstruct.Mapping;
@Mapper(componentModel = "spring")
public interface AbstractionMapping extends BaseMapping<AbstractionPO, AbstractionVO> {
@Mapping(target = "dataCollectionNames", source = "")
@Mapping(target = "dataCollectionNames", ignore = true)
@Mapping(target = "ruleDefinition", expression = "java(com.pgmmers.radar.util.JsonUtils.getJsonNode(var1.getRuleDefinition()))")
@Override
AbstractionVO sourceToTarget(AbstractionPO var1);