mirror of
https://gitee.com/easii/mapstruct-plus.git
synced 2025-12-06 17:18:43 +08:00
- 解决当只有 @AutoMapMapper 注解时,没有生成转换器的问题
- 修改没有找到转换器时的异常描述
This commit is contained in:
parent
12ef55c71c
commit
d5c89c943d
@ -50,7 +50,7 @@ public class User {
|
||||
|
||||
```xml
|
||||
<properties>
|
||||
<mapstruct-plus.version>1.1.7</mapstruct-plus.version>
|
||||
<mapstruct-plus.version>1.1.8</mapstruct-plus.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@ -46,23 +46,22 @@ copyright: false
|
||||
<dependency>
|
||||
<groupId>io.github.linpeilie</groupId>
|
||||
<artifactId>mapstruct-plus-spring-boot-starter</artifactId>
|
||||
<version>1.1.7</version>
|
||||
<version>1.1.8</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
- gradle
|
||||
|
||||
```groovy
|
||||
implementation group: 'io.github.linpeilie', name: 'mapstruct-plus-spring-boot-starter', version: '1.1.7'
|
||||
implementation group: 'io.github.linpeilie', name: 'mapstruct-plus-spring-boot-starter', version: '1.1.8'
|
||||
```
|
||||
|
||||
## 更新日志
|
||||
|
||||
### 1.1.7
|
||||
### 1.1.8
|
||||
|
||||
- fixBug: [issue#8](https://github.com/linpeilie/mapstruct-plus/issues/11) Converter 转换已有对象不生效的问题
|
||||
- 添加寻找转换接口的缓存,转换速度更快
|
||||
- 使用 Java 17 打包,解决 Java 17 环境下编译警告的问题
|
||||
- 解决当只有 @AutoMapMapper 注解时,没有生成转换器的问题
|
||||
- 修改没有找到转换器时的异常描述
|
||||
|
||||
……
|
||||
|
||||
|
||||
@ -6,6 +6,11 @@ category:
|
||||
description: MapStructPlus release log
|
||||
---
|
||||
|
||||
### 1.1.8
|
||||
|
||||
- 解决当只有 @AutoMapMapper 注解时,没有生成转换器的问题
|
||||
- 修改没有找到转换器时的异常描述
|
||||
|
||||
## 1.1.7
|
||||
|
||||
- fixBug: [issue#8](https://github.com/linpeilie/mapstruct-plus/issues/11) Converter 转换已有对象不生效的问题
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<mapstruct.version>1.5.1.Final</mapstruct.version>
|
||||
<mapstruct-plus.version>1.1.7</mapstruct-plus.version>
|
||||
<mapstruct-plus.version>1.1.8</mapstruct-plus.version>
|
||||
<lombok.version>1.18.22</lombok.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@ -104,7 +104,8 @@ public class AutoMapperProcessor extends AbstractProcessor {
|
||||
@Override
|
||||
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
|
||||
boolean hasAutoMapper = annotations.stream().anyMatch(this::isAutoMapperAnnotation);
|
||||
if (!hasAutoMapper) {
|
||||
final boolean hasAutoMapMapper = annotations.stream().anyMatch(this::isAutoMapMapperAnnotation);
|
||||
if (!hasAutoMapper && !hasAutoMapMapper) {
|
||||
return false;
|
||||
}
|
||||
// 刷新配置
|
||||
|
||||
@ -66,7 +66,7 @@ public class Converter {
|
||||
return mapper.convert(map);
|
||||
}
|
||||
throw new ConvertException("cannot find converter from " + map.getClass().getName() + " to " +
|
||||
target.getClass().getSimpleName());
|
||||
target.getSimpleName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -17,7 +17,7 @@
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<mapstruct-plus.version>1.1.7</mapstruct-plus.version>
|
||||
<mapstruct-plus.version>1.1.8</mapstruct-plus.version>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user