Merge pull request !13 from easii/1.4.2
This commit is contained in:
easii 2024-06-15 09:22:45 +00:00 committed by Gitee
commit 2995c42007
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
18 changed files with 62 additions and 8256 deletions

View File

@ -188,7 +188,7 @@ public class User {
```xml
<properties>
<mapstruct-plus.version>1.4.1</mapstruct-plus.version>
<mapstruct-plus.version>1.4.2</mapstruct-plus.version>
</properties>
<dependencies>
<dependency>

View File

@ -62,19 +62,19 @@ footer:
<dependency>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus-spring-boot-starter</artifactId>
<version>1.4.1</version>
<version>1.4.2</version>
</dependency>
```
- gradle
```groovy
implementation group: 'io.github.linpeilie', name: 'mapstruct-plus-spring-boot-starter', version: '1.4.1'
implementation group: 'io.github.linpeilie', name: 'mapstruct-plus-spring-boot-starter', version: '1.4.2'
```
## 更新日志
### 1.4.1
### 1.4.2
- feat: `AutoMapper` 注解增加 `mapperNameSuffix` 属性,支持配置生成的转换接口名称增加后缀,默认规则下生成的反向转换接口同时生效;
- feat : 适配 `Mapper` 注解的 `unmappedSourcePolicy``unmappedTargetPolicy``typeConversionPolicy``collectionMappingStrategy``nullValueMappingStrategy``nullValueIterableMappingStrategy``nullValuePropertyMappingStrategy``nullValueCheckStrategy``mappingControl` 属性;
@ -132,6 +132,7 @@ implementation group: 'io.github.linpeilie', name: 'mapstruct-plus-spring-boot-s
- [RuoYi-Vue-Plus](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages)
- [RuoYi-Cloud-Plus](https://gitee.com/JavaLionLi/RuoYi-Cloud-Plus/wikis/pages)
- [Stream-Query](http://stream-query.dromara.org/)允许完全摆脱Mapper的mybatis-plus🌽体验可以使用类似“工具类”🔧这样的静态函数进行数据库操作
## 联系我

View File

@ -70,7 +70,7 @@ implementation group: 'io.github.linpeilie', name: 'mapstruct-plus-spring-boot-s
## Change Log
### 1.4.1
### 1.4.2
Sure, here is the translated update document:

View File

@ -194,7 +194,7 @@ eg:
### typeConversionPolicy
> since `1.4.1`
> since `1.4.2`
- **Description**How lossy (narrowing) conversion, for instance: long to integer should be reported.
- **Type**`ReportingPolicy`
@ -207,7 +207,7 @@ eg:
### collectionMappingStrategy
> since `1.4.1`
> since `1.4.2`
- **Description**The strategy to be applied when propagating the value of collection-typed properties. By default, only JavaBeans accessor methods (setters or getters) will be used, but it is also possible to invoke a corresponding adder method for each element of the source collection (e. g. orderDto.
- **Type**`CollectionMappingStrategy`
@ -221,7 +221,7 @@ eg:
### nullValueIterableMappingStrategy
> since `1.4.1`
> since `1.4.2`
- **Description**The strategy to be applied when null is passed as source argument value to an IterableMapping. If no strategy is configured, the strategy given via `nullValueMappingStrategy()` will be applied, using `NullValueMappingStrategy`.`RETURN_NULL` by default.
- **Type**`NullValueMappingStrategy`
@ -233,7 +233,7 @@ eg:
### nullValueMapMappingStrategy
> since `1.4.1`
> since `1.4.2`
- **Description**he strategy to be applied when null is passed as source argument value to a MapMapping. If no strategy is configured, the strategy given via `nullValueMappingStrategy()` will be applied, using `NullValueMappingStrategy`.`RETURN_NULL` by default.
- **Type**`NullValueMappingStrategy`
@ -245,7 +245,7 @@ eg:
### nullValueCheckStrategy
> since `1.4.1`
> since `1.4.2`
- **Description**Determines when to include a null check on the source property value of a bean mapping.
- **Type**`NullValueCheckStrategy`
@ -257,7 +257,7 @@ eg:
### mappingControl
> since `1.4.1`
> since `1.4.2`
- **Description**Allows detailed control over the mapping process.
- **Type**`Class`
@ -265,7 +265,7 @@ eg:
### unexpectedValueMappingException
> since `1.4.1`
> since `1.4.2`
- **Description**Exception that should be thrown by the generated code if no mapping matches for enums. If no exception is configured, IllegalArgumentException will be used by default.
- **Type**`Class`
@ -273,7 +273,7 @@ eg:
### suppressTimestampInGenerated
> since `1.4.1`
> since `1.4.2`
- **Description**Flag indicating whether the addition of a time stamp in the @Generated annotation should be suppressed. i. e. not be added. The method overrides the flag set through an annotation processor option.
- **Type**`boolean`

View File

@ -81,7 +81,7 @@ When enums and the types they are used with are not in the same module, they can
In the `AutoMapper` annotation, you can specify the enum class list needed for the current conversion relationship through the `useEnums` attribute. These enums need to be annotated with `AutoEnumMapper`.
> This feature is supported starting from version 1.4.1.
> This feature is supported starting from version 1.4.2.
It is important to note that when two classes are in the same module, specification is not required, and they can be automatically converted. This feature mainly addresses the issue of inability to automatically convert between different modules.

View File

@ -6,7 +6,7 @@ category:
description: MapStructPlus release log
---
### 1.4.1
### 1.4.2
- **feat**: Added the `mapperNameSuffix` attribute to the `AutoMapper` annotation. This supports adding a suffix to the generated conversion interface name, and the reverse conversion interface will be effective under the default rules.
- **feat**: Adapted the `Mapper` annotation to support the following attributes: `unmappedSourcePolicy`, `unmappedTargetPolicy`, `typeConversionPolicy`, `collectionMappingStrategy`, `nullValueMappingStrategy`, `nullValueIterableMappingStrategy`, `nullValuePropertyMappingStrategy`, `nullValueCheckStrategy`, and `mappingControl`.

View File

@ -191,7 +191,7 @@ public class MapStructPlusConfiguration {
### typeConversionPolicy
> since `1.4.1`
> since `1.4.2`
- **说明**有损转换的处理策略例如long 转换为 int
- **类型**`ReportingPolicy`
@ -204,7 +204,7 @@ public class MapStructPlusConfiguration {
### collectionMappingStrategy
> since `1.4.1`
> since `1.4.2`
- **说明**:转换列表集合属性时的策略。
- **类型**`CollectionMappingStrategy`
@ -218,7 +218,7 @@ public class MapStructPlusConfiguration {
### nullValueIterableMappingStrategy
> since `1.4.1`
> since `1.4.2`
- **说明**:当将 `null` 作为源参数值传递给 `IterableMapping` 时要应用的策略。如果未配置策略,则将应用通过 `nullValueMappingStrategy()` 给出的策略。
- **类型**`NullValueMappingStrategy`
@ -230,7 +230,7 @@ public class MapStructPlusConfiguration {
### nullValueMapMappingStrategy
> since `1.4.1`
> since `1.4.2`
- **说明**:当将 `null` 作为源参数值传递给 `MapMapping` 时要应用的策略。如果未配置策略,则将应用通过 `nullValueMappingStrategy()` 给出的策略。
- **类型**`NullValueMappingStrategy`
@ -242,7 +242,7 @@ public class MapStructPlusConfiguration {
### nullValueCheckStrategy
> since `1.4.1`
> since `1.4.2`
- **说明**:确定何时对 bean 映射的源属性值进行 null 检查。
- **类型**`NullValueCheckStrategy`
@ -254,7 +254,7 @@ public class MapStructPlusConfiguration {
### mappingControl
> since `1.4.1`
> since `1.4.2`
- **说明**:允许对映射过程进行详细控制。
- **类型**`Class`
@ -262,7 +262,7 @@ public class MapStructPlusConfiguration {
### unexpectedValueMappingException
> since `1.4.1`
> since `1.4.2`
- **说明**:如果枚举没有匹配的映射,则生成的代码应抛出异常。如果没有配置异常,则默认使用 IllegalArgumentException 。
- **类型**`Class`
@ -270,7 +270,7 @@ public class MapStructPlusConfiguration {
### suppressTimestampInGenerated
> since `1.4.1`
> since `1.4.2`
- **说明**:标识是否应在 `@Generated` 注释中添加时间戳
- **类型**`boolean`

View File

@ -81,6 +81,6 @@ public void enumMapTest() {
`AutoMapper` 注解中,可以通过属性 `useEnums` 来指定,当前转换关系,需要依赖的枚举类列表。这些枚举需要被 `AutoEnumMapper`注解。
> 该特性从 1.4.1 开始支持
> 该特性从 1.4.2 开始支持
需要注意的是当两个类在同一个模块module无需指定可以自动转换。当前特性主要解决跨模块之间不能自动转换的问题。

View File

@ -6,7 +6,7 @@ category:
description: MapStructPlus release log
---
### 1.4.1
### 1.4.2
- feat: `AutoMapper` 注解增加 `mapperNameSuffix` 属性,支持配置生成的转换接口名称增加后缀,默认规则下生成的反向转换接口同时生效;
- feat : 适配 `Mapper` 注解的 `unmappedSourcePolicy``unmappedTargetPolicy``typeConversionPolicy``collectionMappingStrategy``nullValueMappingStrategy``nullValueIterableMappingStrategy``nullValuePropertyMappingStrategy``nullValueCheckStrategy``mappingControl` 属性;

View File

@ -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.4.1</mapstruct-plus.version>
<mapstruct-plus.version>1.4.2</mapstruct-plus.version>
<lombok.version>1.18.22</lombok.version>
<hutool.version>5.8.26</hutool.version>
<guava.version>32.1.3-jre</guava.version>

View File

@ -96,7 +96,7 @@ public class MapperConfigGenerator {
// nullValueIterableMappingStrategy
if (AutoMapperProperties.getNullValueIterableMappingStrategy() != null) {
CodeBlock nullValueIterableMappingStrategyCodeBlock = CodeBlock.builder().add("$T.$L",
ClassName.get("org.mapstruct", "NullValueIterableMappingStrategy"),
ClassName.get("org.mapstruct", "NullValueMappingStrategy"),
AutoMapperProperties.getNullValueIterableMappingStrategy()).build();
builder.addMember("nullValueIterableMappingStrategy", nullValueIterableMappingStrategyCodeBlock);
}
@ -104,7 +104,7 @@ public class MapperConfigGenerator {
// nullValueMapMappingStrategy
if (AutoMapperProperties.getNullValueMapMappingStrategy() != null) {
CodeBlock nullValueMapMappingStrategyCodeBlock = CodeBlock.builder().add("$T.$L",
ClassName.get("org.mapstruct", "NullValueMapMappingStrategy"),
ClassName.get("org.mapstruct", "NullValueMappingStrategy"),
AutoMapperProperties.getNullValueMapMappingStrategy()).build();
builder.addMember("nullValueMapMappingStrategy", nullValueMapMappingStrategyCodeBlock);
}

View File

@ -75,7 +75,7 @@ public @interface AutoMapper {
* reported. The method overrides an unmappedSourcePolicy set in a central
* configuration
*
* @since 1.4.1
* @since 1.4.2
*
* @return The reporting policy for unmapped source properties.
*/
@ -86,7 +86,7 @@ public @interface AutoMapper {
* reported. The method overrides an unmappedTargetPolicy set in a central
* configuration
*
* @since 1.4.1
* @since 1.4.2
*
* @return The reporting policy for unmapped target properties.
*/
@ -97,7 +97,7 @@ public @interface AutoMapper {
* reported. The method overrides an typeConversionPolicy set in a central
* configuration
*
* @since 1.4.1
* @since 1.4.2
*
* @return The reporting policy for unmapped target properties.
*/
@ -111,7 +111,7 @@ public @interface AutoMapper {
* Any setting given for this attribute will take precedence over {@link org.mapstruct.MapperConfig#collectionMappingStrategy()},
* if present.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy applied when propagating the value of collection-typed properties.
*/
@ -122,7 +122,7 @@ public @interface AutoMapper {
* If no strategy is configured, the strategy given via {@link MapperConfig#nullValueMappingStrategy()} will be
* applied, using {@link NullValueMappingStrategy#RETURN_NULL} by default.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy to be applied when {@code null} is passed as source value to the methods of this mapper.
*/
@ -134,7 +134,7 @@ public @interface AutoMapper {
* strategy is configured, the strategy given via {@link MapperConfig#nullValueIterableMappingStrategy()} will be
* applied, using {@link NullValueMappingStrategy#RETURN_NULL} by default.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy to be applied when {@code null} is passed as source value to an {@link IterableMapping} of
* this mapper.
@ -147,7 +147,7 @@ public @interface AutoMapper {
* configured, the strategy given via {@link MapperConfig#nullValuePropertyMappingStrategy()} will be applied,
* {@link NullValuePropertyMappingStrategy#SET_TO_NULL} will be used by default.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy to be applied when {@code null} is passed as source property value or the source property
* is not present.
@ -160,7 +160,7 @@ public @interface AutoMapper {
*
* Can be overridden by the one on {@link MapperConfig}, {@link BeanMapping} or {@link Mapping}.
*
* @since 1.4.1
* @since 1.4.2
*
* @return strategy how to do null checking
*/
@ -171,7 +171,7 @@ public @interface AutoMapper {
*
* @return the mapping control
*
* @since 1.4.1
* @since 1.4.2
*
* @see org.mapstruct.control.DeepClone
* @see org.mapstruct.control.NoComplexMapping

View File

@ -46,7 +46,7 @@ public @interface AutoMapping {
String numberFormat() default "";
/**
* @since 1.4.1
* @since 1.4.2
*/
String constant() default "";
@ -76,7 +76,7 @@ public @interface AutoMapping {
* Note that {@link #defaultValue()} usage will also be converted using this qualifier.
* <p>
*
* @since 1.4.1
* @since 1.4.2
*
* @return the qualifiers
* @see Qualifier
@ -141,7 +141,7 @@ public @interface AutoMapping {
*
* Can be overridden by the one on {@link org.mapstruct.MapperConfig}, {@link Mapper} or {@link BeanMapping}.
*
* @since 1.4.1
* @since 1.4.2
*
* @return strategy how to do null checking
*/
@ -155,7 +155,7 @@ public @interface AutoMapping {
*
* {@link NullValuePropertyMappingStrategy#SET_TO_NULL} will be used by default.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy to be applied when {@code null} is passed as source property value or the source property
* is not present.
@ -168,7 +168,7 @@ public @interface AutoMapping {
*
* @return the mapping control
*
* @since 1.4.1
* @since 1.4.2
*
* @see org.mapstruct.control.DeepClone
* @see org.mapstruct.control.NoComplexMapping

View File

@ -53,7 +53,7 @@ public @interface MapperConfig {
* How lossy (narrowing) conversion, for instance: long to integer should be
* reported.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The reporting policy for type conversion.
*/
@ -64,7 +64,7 @@ public @interface MapperConfig {
* accessor methods (setters or getters) will be used, but it is also possible to invoke a corresponding adder
* method for each element of the source collection (e.g. {@code orderDto.addOrderLine()}).
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy applied when propagating the value of collection-typed properties.
*/
@ -81,7 +81,7 @@ public @interface MapperConfig {
* If no strategy is configured, the strategy given via {@link #nullValueMappingStrategy()} will be applied, using
* {@link NullValueMappingStrategy#RETURN_NULL} by default.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy to be applied when {@code null} is passed as source value to an {@link IterableMapping}.
*/
@ -92,7 +92,7 @@ public @interface MapperConfig {
* If no strategy is configured, the strategy given via {@link #nullValueMappingStrategy()} will be applied, using
* {@link NullValueMappingStrategy#RETURN_NULL} by default.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy to be applied when {@code null} is passed as source value to a {@link MapMapping}.
*/
@ -109,7 +109,7 @@ public @interface MapperConfig {
*
* Can be overridden by the one on {@link Mapper}, {@link BeanMapping} or {@link Mapping}.
*
* @since 1.4.1
* @since 1.4.2
*
* @return strategy how to do null checking
*/
@ -120,7 +120,7 @@ public @interface MapperConfig {
*
* @return the mapping control
*
* @since 1.4.1
* @since 1.4.2
*
* @see org.mapstruct.control.DeepClone
* @see org.mapstruct.control.NoComplexMapping
@ -144,7 +144,7 @@ public @interface MapperConfig {
* </li>
* </ul>
*
* @since 1.4.1
* @since 1.4.2
*
* @return the exception that should be used in the generated code
*/
@ -156,7 +156,7 @@ public @interface MapperConfig {
*
* The method overrides the flag set through an annotation processor option.
*
* @since 1.4.1
* @since 1.4.2
*
* @return whether the addition of a timestamp should be suppressed
*/

View File

@ -82,7 +82,7 @@ public @interface ReverseAutoMapping {
* Note that {@link #defaultValue()} usage will also be converted using this qualifier.
* <p>
*
* @since 1.4.1
* @since 1.4.2
*
* @return the qualifiers
* @see Qualifier
@ -147,7 +147,7 @@ public @interface ReverseAutoMapping {
*
* Can be overridden by the one on {@link org.mapstruct.MapperConfig}, {@link Mapper} or {@link BeanMapping}.
*
* @since 1.4.1
* @since 1.4.2
*
* @return strategy how to do null checking
*/
@ -161,7 +161,7 @@ public @interface ReverseAutoMapping {
*
* {@link NullValuePropertyMappingStrategy#SET_TO_NULL} will be used by default.
*
* @since 1.4.1
* @since 1.4.2
*
* @return The strategy to be applied when {@code null} is passed as source property value or the source property
* is not present.
@ -174,7 +174,7 @@ public @interface ReverseAutoMapping {
*
* @return the mapping control
*
* @since 1.4.1
* @since 1.4.2
*
* @see org.mapstruct.control.DeepClone
* @see org.mapstruct.control.NoComplexMapping

8195
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,11 +12,11 @@
"docs:clean-dev": "vuepress dev docs --clean-cache"
},
"dependencies": {
"vue": "^3.4.27",
"vuepress": "2.0.0-rc.12",
"vuepress-theme-reco": "2.0.0-rc.14",
"@vuepress/bundler-vite": "2.0.0-rc.12",
"@vuepress/bundler-webpack": "2.0.0-rc.12",
"@vuepress/plugin-sitemap": "2.0.0-rc.12"
"vue": "^3.4.29",
"vuepress": "2.0.0-rc.13",
"vuepress-theme-reco": "2.0.0-rc.15",
"@vuepress/bundler-vite": "2.0.0-rc.13",
"@vuepress/bundler-webpack": "2.0.0-rc.13",
"@vuepress/plugin-sitemap": "2.0.0-rc.34"
}
}

View File

@ -18,7 +18,7 @@
</modules>
<properties>
<mapstruct-plus.version>1.4.1</mapstruct-plus.version>
<mapstruct-plus.version>1.4.2</mapstruct-plus.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>