Skip to content

Commit

Permalink
[PPD-206] CRUD GPS: removed custom converter
Browse files Browse the repository at this point in the history
  • Loading branch information
aacitelli committed Jun 30, 2022
2 parents ebffb93 + a5deadb commit b09fae3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
package it.gov.pagopa.spontaneouspayment.config;


import org.modelmapper.Converter;
import org.modelmapper.ModelMapper;
import org.modelmapper.convention.MatchingStrategies;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import it.gov.pagopa.spontaneouspayment.entity.Organization;
import it.gov.pagopa.spontaneouspayment.mapper.ConvertOrganizationModelToOrganizationEntity;
import it.gov.pagopa.spontaneouspayment.model.OrganizationEnrollmentModel;

@Configuration
public class MappingsConfiguration {

@Bean
public ModelMapper modelMapper() {
ModelMapper mapper = new ModelMapper();
mapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);

Converter<OrganizationEnrollmentModel, Organization> convertOrganizationModelToOrganizationEntity = new ConvertOrganizationModelToOrganizationEntity();
mapper.createTypeMap(OrganizationEnrollmentModel.class, Organization.class).setConverter(convertOrganizationModelToOrganizationEntity);

mapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);
return mapper;
}

Expand Down

This file was deleted.

0 comments on commit b09fae3

Please sign in to comment.