MapStruct #SuperBuilder Return type error not cast - spring

BaseDto:
#Data
#NoArgsConstructor
#SuperBuilder
public class BaseDto{
// Some fields
}
TestDto:
#Data
#NoArgsConstructor
#SuperBuilder
public class TestDto extends BaseDto {
// Some fields
}
Base Mapper:
#MapperConfig(
componentModel = "spring"
)
public interface BaseMapper<E extends BaseEntity, DTO extends BaseDto> {
DTO toDto(E entity);
....
}
Mapper Generate Impl:
#Component
public class TestMapperImpl implements BaseMapper {
#Override
public TestDto toDTO(Test entity) {
BaseDtoBuilder<?, ?> testDto= BaseDto.builder();
if ( entity != null ) {
if ( entity.getId() != null ) {
testDto.id(entity.getId() );
}
}
return testDto.build();
}
}
Mapper create Impl class automatically. Problem is return type.
BaseDtoBuilder<?, ?> testDto= BaseDto.builder();
return testDto.build();
Intelij give error return type, it must be cast as TestDto. Because of mapper return BaseDto. How can i solve this problem?
Note: if use #Builder, there is no error working fine, this time I can't access parent properties.

I solve problem with this configuration: MapStruct and Lombok not working together
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.version}</version>
</path>
<!-- This is needed when using Lombok 1.18.16 and above -->
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
<!-- Mapstruct should follow the lombok path(s) -->
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
thanks for your help xerx593

Related

mvn spring-boot:run "No primary or single public constructor found...TemplateLineItemInput" but only from commandline?

I've got an up-the-middle Spring Boot + Lombok project that works like a champ from the IDE but errors strangely when I run it from the command line through mvn spring-boot:run. Its a pretty recent version Spring Boot...
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
Lombok is unremarkable and came from the Spring Initializr thing (https://start.spring.io/).
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
The JavaBean its complaining about is equally boring...
import lombok.Builder;
import lombok.Data;
import java.math.BigDecimal;
#Data
#Builder(toBuilder = true)
public class TemplateLineItemInput {
private final String partMasterId;
private final String partMasterIdPath;
private final String actionType;
private final BigDecimal actionQuantity;
}
The API of this Boot project is GraphQL but when I execute the following mutation from a mvn spring-boot:run invocation it always comes back as an error (nothing on the console...the framework is kicking it out somehow).
Request...
mutation createTemplateLineItem($tbomId: ID!) {
createTemplateLineItem(
tbomId: $tbomId
input: {
partMasterId: "2"
partMasterIdPath: "808863036.1"
actionType: "ADD"
actionQuantity: "2"
}) {
...TBomFrag
}
}
...
{
"partMasterId": "5025489768",
"tbomId": "a4688d22-9d99-41a2-9777-6acc75b2aab9",
"lineItemId": "9e460199-34fb-432c-b971-8cd8321d3283"
}
Response...
{
"errors": [
{
"message": "No primary or single public constructor found for class aero.blue.ems.boa.domain.TemplateLineItemInput - and no default constructor found either",
"locations": [
{
"line": 20,
"column": 3
}
],
"path": [
"createTemplateLineItem"
],
"extensions": {
"classification": "INTERNAL_ERROR"
}
}
],
"data": {
"createTemplateLineItem": null
}
}
My spring-boot-maven-plugin is configured like...
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.5.4</version>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>repackage</id>
<configuration>
<classifier>exec</classifier>
</configuration>
</execution>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
...also from Spring Initializr
When I run the Application from the IDE directly, no issue. The mutation works fine.
Is there something missing from my spring-boot:run config in the pom.xml or something? Did I have to clue the plugin into annotation processing? This is really confusing.
Please,
Check the following config on section plugins at you pom.xml project, as following here:
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>getting-started</artifactId>
<!-- ... -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
For more information about, check this link: https://docs.spring.io/spring-boot/docs/2.5.4/maven-plugin/reference/htmlsingle/
Ultimately this comes down to Lombok misconfiguration of my beans. The fix is to add the #AllArgsConstructor to the bean definition
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import java.math.BigDecimal;
#Data
#Builder(toBuilder = true)
#AllArgsConstructor
public class TemplateLineItemInput {
private final String partMasterId;
private final String partMasterIdPath;
private final String actionType;
private final BigDecimal actionQuantity;
}
How we figured this out was to "Delombok" the Bean and look at the resulting code. This observation matched the error message; there was no public constructor.
...
TemplateLineItemInput(String partMasterId, String partMasterIdPath, String actionType, BigDecimal actionQuantity) {
this.partMasterId = partMasterId;
this.partMasterIdPath = partMasterIdPath;
this.actionType = actionType;
this.actionQuantity = actionQuantity;
}
Somehow (I still don't fully get why), the #Builder(toBuilder=true) annotation had Lombok producing a package private constructor. Jackson needed something public.
Adding the #AllArgsConstructor annotation made that constructor public and all is well.
public TemplateLineItemInput(String partMasterId, String partMasterIdPath, String actionType, BigDecimal actionQuantity) {
this.partMasterId = partMasterId;
this.partMasterIdPath = partMasterIdPath;
this.actionType = actionType;
this.actionQuantity = actionQuantity;
}
Delombok was the key.

How Inyect dependency by interface mapper

I try to use mapstruct in java Spring to mapper object DTO to Object normal
I try to call the interface mapper since the service, but I have NullPointerException, seems the interface is not injected in service I used autowired and I quit this
Service
#Service
public class FollowService implements IFollowService{
#Autowired
IFollowRepository iFollowRepository;
private IUserMapper iUserMapper;
#Override
public UserDTOCount countFollowers(int userId) throws UserIdNotFoundException, UserNotFollowException {
return iUserMapper.toUserCount(iFollowRepository.getUserById(userId));
}
Mapper
#Mapper(componentModel = "spring")
public interface IUserMapper {
#Mappings({
#Mapping(source = "id" , target = "id"),
#Mapping(source = "name", target = "name"),
#Mapping(source = "followers", target = "followers", qualifiedByName = "followers")
})
UserDTOCount toUserCount(User user);
Error
processing failed; nested exception is java.lang.NullPointerException] with root cause
java.lang.NullPointerException: null
at com.reto1.demo.Service.FollowService.countFollowers(FollowService.java:54) ~[classes/:na]
I try to debug and I see the iUserMapper is Null, I dont know How call since service
Thanks!
The reason why the iUserMapper is null in your FollowService is because you are not injecting your mapper.
You need to add #Autowired in your service.
e.g.
#Service
public class FollowService implements IFollowService{
#Autowired
IFollowRepository iFollowRepository;
#Autowired
private IUserMapper iUserMapper;
#Override
public UserDTOCount countFollowers(int userId) throws UserIdNotFoundException, UserNotFollowException {
return iUserMapper.toUserCount(iFollowRepository.getUserById(userId));
}
}
Small remark: One small digression note from me. I would suggest not prefixing the interfaces with I. The IDEs can clearly show what is a class and what is an interface and it is also easier to see them in your tree structure as not everything is under "I"
After see many questions, I resolve the error this form
-First, add plugin in pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source> <!-- depending on your project -->
<target>1.8</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
<!-- other annotation processors -->
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
Second I added lombok
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.4.1.Final</version>
</path>
And finally, I add autowired
#Service
public class FollowService implements IFollowService{
#Autowired
IFollowRepository iFollowRepository;
#Autowired
IUserMapper iUserMapper;

Mapstruct 1.4.2.Final : NullValuePropertyMappingStrategy.SET_TO_DEFAULT not working as expected

I have recently updated my spring boot version from 2.3.0.RELEASE to 2.4.4 and also updated the Map Struct version to the latest from 1.3.1.Final to is 1.4.2.Final. lombok version used - 1.18.18
But one of the mapper which was working fine with 1.3.1 is not working anymore with 1.4.2 and the scenario is as below.
POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
......
<properties>
<!-- used for configuration meta data processor, please keep in sync with
spring boot parent version -->
<spring-boot.version>2.4.4</spring-boot.version>
<java.version>11</java.version>
<org.mapstruct.version>1.3.1.Final</org.mapstruct.version>
.....
</properties>
<dependencies>
........
........
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
........
........
</dependencies>
<build>
<finalName>dras_mt</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
........
........
</annotationProcessorPaths>
</configuration>
</plugin>
......
......
</plugins>
<pluginManagement>
.....
</pluginManagement>
</build>
</project>
Entity:
#Entity
#Data
public class TestEntity {
#Id
private Long id;
#NotNull
private String plntId;
#NotNull
private Boolean approvalNeeded = false;
}
Domain:
#Value
#Builder(toBuilder = true)
public class TestDomain {
private PlantDomain plantDomain;
#NonFinal
#Setter
private SomeInfo someInfo;
#NonFinal
#Setter
#Default
private Boolean approvalNeeded = false;
}
Mapper:
#Mapper(componentModel = "spring", uses = { ActaulPlantMapper.class })
public interface TestEntityMapper {
#Mapping(target = "someInfo", ignore = true)
#Mapping(source = "plntId", target = "plantDomain")
#Mapping(target = "approvalNeeded", nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.SET_TO_DEFAULT)
TestDomain fromEntity(TestEntity entity);
}
Generated Code with MapStruct 1.3.1
#Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2021-03-24T11:33:38+0530",
comments = "version: 1.3.1.Final, compiler: javac, environment: Java 11.0.9.1 (AdoptOpenJDK)"
)
#Component
public class TestEntityMapperImpl implements TestEntityMapper {
#Autowired
private ActualPlantMapper actualPlantMapper;
#Override
public TestDomain fromEntity(WareHouseOptionEntity entity) {
if ( entity == null ) {
return null;
}
TestDomainBuilder testDomain = TestDomain.builder();
testDomain.plantDomain( actualPlantMapper.fromSapId( entity.getPlntId() ) );
if ( entity.getApprovalNeeded() != null ) {
testDomain.approvalNeeded( entity.getApprovalNeeded() );
}
else {
testDomain.approvalNeeded( false );
}
return testDomain.build();
}
}
Generated Code with MapStruct 1.4.2
#Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2021-03-24T11:33:38+0530",
comments = "version: 1.3.1.Final, compiler: javac, environment: Java 11.0.9.1 (AdoptOpenJDK)"
)
#Component
public class TestEntityMapperImpl implements TestEntityMapper {
#Autowired
private ActualPlantMapper actualPlantMapper;
#Override
public TestDomain fromEntity(WareHouseOptionEntity entity) {
if ( entity == null ) {
return null;
}
TestDomainBuilder testDomain = TestDomain.builder();
testDomain.plantDomain( actualPlantMapper.fromSapId( entity.getPlntId() ) );
testDomain.approvalNeeded( entity.getApprovalNeeded() );
return testDomain.build();
}
}
As you see with 1.4.2 version the NullValuePropertyMappingStrategy.SET_TO_DEFAULT is not applied.
I have tried with other options like putting the NullValuePropertyMappingStrategy on class level which didn't help.
Any futher inputs is highly appreaciated.
The fact that NullValuePropertyMappingStrategy was working on 1.3 is a coincidence. The strategy should only be applicable to update methods i.e. methods with #MappingTarget.
If you want to keep defaults as defined in your source class I would suggest using NullValueCheckStrategy#ALWAYS

Spring Boot / MapStruct: Parameter 1 of constructor required a bean... Consider defining a bean of type

I don't know so much about Java, but I thought it should be enough to manage this little task...
I'm building a microservice, which provides Songs and list of songs via several Rest-Endpoints. But it doesn't just return a song when called, it also has to contact another service and enhance the song object with additional information. For this I implemented a Dto-Class and I use mapstruct to handle logic behind. I also did this in other projects with no problems. But now I'm struggling, because of this error, which I don't know how to solve - it says:
Parameter 1 of constructor in
mk.microservices.songsservice.services.SongServiceImpl required a bean
of type 'mk.microservices.songsservice.web.mapper.SongMapper' that
could not be found.
Action:
Consider defining a bean of type
'mk.microservices.songsservice.web.mapper.SongMapper' in your
configuration.
Here are excerpts from my code:
SongServiceImpl
import lombok.RequiredArgsConstructor;
import mk.microservices.songsservice.domain.Song;
import mk.microservices.songsservice.repositories.SongRepository;
import mk.microservices.songsservice.web.mapper.SongMapper;
import mk.microservices.songsservice.web.model.SongDto;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
#RequiredArgsConstructor
#Service
public class SongServiceImpl implements SongService {
private final SongRepository songRepository;
private final SongMapper songMapper;
#Override
public SongDto getSongById(Integer id) {
return songMapper.songToSongDto(songRepository.findById(id));
}
#Override
public List<Song> getAllSongs() {
return songRepository.findAll();
}
....
}
SongMapper
import org.mapstruct.DecoratedWith;
import java.util.Optional;
#MapStruct
#DecoratedWith(SongMapperDecorator.class)
public interface SongMapper {
SongDto songToSongDto(Optional<Song> song);
SongDto songToSongDtoWithSongInfo(Song song);
Song songDtoToSong(SongDto songDto);
}
SongMapperDecorator
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Optional;
public class SongMapperDecorator implements SongMapper {
private SongInfoService songInfoService;
private SongMapper mapper;
#Autowired
public void setMapper(SongMapper songMapper) { this.mapper = songMapper; }
#Override
public SongDto songToSongDto(Optional<Song> song) {
return mapper.songToSongDto(song);
}
#Override
public SongDto songToSongDtoWithSongInfo(Song song) {
SongDto songDto = mapper.songToSongDto(Optional.ofNullable(song));
SongInfo songInfo = songInfoService.getSongInfoBySongId(song.getId());
songDto.setDescription(songInfo.getDescription());
return songDto;
}
#Override
public Song songDtoToSong(SongDto songDto) {
return mapper.songDtoToSong(songDto);
}
}
Also did a clean, validate and compile without any errors. But when I did the verify, I got this:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile
(default-compile) on project songs-service: Resolution of
annotationProcessorPath dependencies failed: Missing: [ERROR]
---------- [ERROR] 1) org.mapstruct:mapstruct-processor:jar:1.4.2
My POM looks like this:
The dependency for mapstruct:
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.4.2.Final</version>
</dependency>
And the plugin for enabling mapstruct and lombok working together:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<compilerArg>
-Amapstruct.defaultComponentModel=spring
</compilerArg>
</compilerArgs>
</configuration>
</plugin>
Would be very glad, if someone could help me solving this. Already googled a lot and didn't find anything useful yet.
Br,
Mic
As it is clear from the error the SongServiceImpl requires a bean SongMapper but Mapstruct do not generate a spring bean by default. i,e it will not add #Component annotation in the generated class, so we need to explicitly mention to generate a class that can be used to create spring bean.
so instead of #MapStruct use #Mapper(componentModel = "spring") in the mapper interface.
Solved it finally, changed the mapstruct version in my POM to 1.4.2.Final (instead of just 1.4.2). Now it works...
Got the hint frome Mapstruct-Documentation here...
Solved this finally. I used this configuration (mapstruct + lombok)
Also installed m2e-apt plugin in eclipse.
pom.xml
<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>
------------------------------------------------------------
<configuration>
<source>1.8</source> <!-- depending on your project -->
<target>1.8</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<!-- other annotation processors -->
</annotationProcessorPaths>
<compilerArgs>
<compilerArg>
-Amapstruct.defaultComponentModel=spring
</compilerArg>
</compilerArgs>
</configuration>

Mapstruct does not create constructors with lombok

In my project, I am using Lombok and mapstruct.
Here is my entity.
Wallet
package com.coin.cointracker.entity;
import lombok.*;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
#Entity
#Getter
#Setter
#NoArgsConstructor
#RequiredArgsConstructor
public class Wallet {
//Library
#Id
#GeneratedValue(strategy = GenerationType.IDENTITY)
#NonNull
private Long id;
#NonNull
private double InitialHolding;
#NonNull
private String currency;
#OneToMany(mappedBy = "wallet", cascade = CascadeType.REMOVE)
private Set<Transaction> transactions = new HashSet<>();
}
Here is DTO, WalletResponse
import lombok.*;
#Getter
#Setter
#AllArgsConstructor
#NoArgsConstructor
public class WalletResponse {
private Long id;
private double InitialHolding;
private String currency;
}
WalletMapper
import com.coin.cointracker.dto.response.WalletResponse;
import com.coin.cointracker.entity.Wallet;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import java.util.Optional;
#Mapper(componentModel = "spring")
public interface WalletMapper {
WalletMapper map = Mappers.getMapper(WalletMapper.class);
//TODO: Is it problem to have Optional as type for parameter?
WalletResponse walletToWalletResponse(Optional<Wallet> wallet);
//Wallet walletRequestToWallet(WalletRequest walletRequest);
}
And lastly my pom.xml:
<properties>
<java.version>1.8</java.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<org.projectlombok.version>1.18.16</org.projectlombok.version>
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
</properties>
...
...
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${lombok-mapstruct-binding.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.4.1.Final</version>
</dependency>
</dependencies>
...
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source> <!-- depending on your project -->
<target>1.8</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.3.0.Beta2</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.4</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
Repositories and services works fine. Repository successfully get data from db and services successfully calls mapper with data in database. But Mapper can not maps Wallet to WalletResponse.It results as this:
{
"id":null,
"InitialHolding":0.00,
"currency":null
}
Where did I make mistake?
EDIT : Here is generated WalletMapperImpl
package com.coin.cointracker.mapper;
import com.coin.cointracker.dto.response.WalletResponse;
import com.coin.cointracker.entity.Wallet;
import java.util.Optional;
import javax.annotation.Generated;
import org.springframework.stereotype.Component;
#Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2021-01-25T19:41:00+0300",
comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_261 (Oracle Corporation)"
)
#Component
public class WalletMapperImpl implements WalletMapper {
#Override
public WalletResponse walletToWalletResponse(Optional<Wallet> wallet) {
if ( wallet == null ) {
return null;
}
WalletResponse walletResponse = new WalletResponse();
return walletResponse;
}
}

Resources