fix mapstruct-plus配置

V0.5.x
jay 2023-06-04 16:41:59 +08:00
parent c872547596
commit b470be12c3
10 changed files with 121 additions and 45 deletions

View File

@ -23,6 +23,12 @@ public class MessageUtils {
* @return
*/
public static String message(String code, Object... args) {
return MESSAGE_SOURCE.getMessage(code, args, LocaleContextHolder.getLocale());
// TODO: 国际化
try{
return MESSAGE_SOURCE.getMessage(code, args, LocaleContextHolder.getLocale());
} catch (Exception e) {
return code;
}
}
}

View File

@ -47,11 +47,20 @@
<artifactId>hutool-core</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.mapstruct</groupId>-->
<!-- <artifactId>mapstruct</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.github.linpeilie</groupId>-->
<!-- <artifactId>mapstruct-plus-spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
@ -90,16 +99,22 @@
<source>${java.version}</source> <!-- depending on your project -->
<target>${java.version}</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.4.2.Final</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus-processor</artifactId>
<version>${mapstruct-plus.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
<!-- other annotation processors -->
</annotationProcessorPaths>
</configuration>

View File

@ -0,0 +1,15 @@
package cc.iotkit.data.config;
import io.github.linpeilie.annotations.ComponentModelConfig;
import io.github.linpeilie.annotations.MapperConfig;
/**
* @Author: jay
* @Date: 2023/6/4 14:21
* @Version: V1.0
* @Description: mapperstruct
*/
//@MapperConfig
@ComponentModelConfig(componentModel = "default")
public class AutoMapperConfig3 {
}

View File

@ -30,10 +30,9 @@
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus</artifactId>
</dependency>
<dependency>
<groupId>cc.iotkit</groupId>
<artifactId>iot-temporal-service</artifactId>
@ -56,16 +55,21 @@
<source>${java.version}</source> <!-- depending on your project -->
<target>${java.version}</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.4.2.Final</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus-processor</artifactId>
<version>${mapstruct-plus.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
<!-- other annotation processors -->
</annotationProcessorPaths>
</configuration>

View File

@ -44,10 +44,10 @@
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.mapstruct</groupId>-->
<!-- <artifactId>mapstruct</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>cn.hutool</groupId>

View File

@ -48,10 +48,9 @@
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-http</artifactId>

View File

@ -32,17 +32,17 @@
<dependencies>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.4.2.Final</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.mapstruct</groupId>-->
<!-- <artifactId>mapstruct</artifactId>-->
<!-- <version>1.4.2.Final</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.4.2.Final</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.mapstruct</groupId>-->
<!-- <artifactId>mapstruct-processor</artifactId>-->
<!-- <version>1.4.2.Final</version>-->
<!-- </dependency>-->
</dependencies>

View File

@ -0,0 +1,15 @@
package cc.iotkit.manager.config;
import io.github.linpeilie.annotations.ComponentModelConfig;
import io.github.linpeilie.annotations.MapperConfig;
/**
* @Author: jay
* @Date: 2023/6/4 14:21
* @Version: V1.0
* @Description: mapperstruct
*/
@MapperConfig
@ComponentModelConfig(componentModel = "default")
public class AutoMapperConfig2 {
}

View File

@ -0,0 +1,15 @@
package cc.iotkit.system.config;
import io.github.linpeilie.annotations.ComponentModelConfig;
import io.github.linpeilie.annotations.MapperConfig;
/**
* @Author: jay
* @Date: 2023/6/4 14:21
* @Version: V1.0
* @Description: mapperstruct
*/
@MapperConfig()
@ComponentModelConfig(componentModel = "default")
public class AutoMapperConfig {
}

11
pom.xml
View File

@ -35,7 +35,7 @@
<hutool.version>5.8.18</hutool.version>
<redisson.version>3.20.1</redisson.version>
<lock4j.version>2.2.4</lock4j.version>
<mapstruct-plus.version>1.2.1</mapstruct-plus.version>
<mapstruct-plus.version>1.2.5</mapstruct-plus.version>
<alibaba-ttl.version>2.14.2</alibaba-ttl.version>
<poi.version>5.2.3</poi.version>
<easyexcel.version>3.2.1</easyexcel.version>
@ -44,6 +44,8 @@
<jap-comment.version>1.0.0</jap-comment.version>
<knife4j.version>2.0.9</knife4j.version>
<validateion.version>1.1.0.Final</validateion.version>
<lombok.version>1.18.26</lombok.version>
</properties>
<dependencyManagement>
@ -119,7 +121,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
<version>${lombok.version}</version>
</dependency>
<dependency>
@ -285,6 +287,11 @@
<version>${graalvm.version}</version>
</dependency>
<dependency>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus</artifactId>
<version>${mapstruct-plus.version}</version>
</dependency>
<dependency>
<groupId>io.github.linpeilie</groupId>
<artifactId>mapstruct-plus-spring-boot-starter</artifactId>