Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Dozer starter #715

Closed
wants to merge 1 commit into from
Closed

Conversation

kazuki43zoo
Copy link
Contributor

I propose support the Dozer spring boot starter.

We can use dozer more easy as follow:

package com.example.dozerdemo;

import com.github.dozermapper.core.Mapper;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class DozerDemoApplication {

  public static void main(String[] args) {
    SpringApplication.run(DozerDemoApplication.class, args);
  }

  @Bean
  CommandLineRunner run(Mapper dozerMapper) {
    return args -> {
      Src src = new Src();
      src.a = "dozer demo";

      Dest dest = dozerMapper.map(src, Dest.class);

      System.out.println(dest.a);

    };
  }

  static class Src {
    private String a;

    public String getA() {
      return a;
    }

    public void setA(String a) {
      this.a = a;
    }
  }

  static class Dest {
    private String a;

    public String getA() {
      return a;
    }

    public void setA(String a) {
      this.a = a;
    }
  }

}

@garethahealy
Copy link

Any feedback?

@wilkinsona
Copy link
Contributor

If we were to add one mapping library, then I think we'd have to add some others too. In addition to Dozer, we'd need to consider Orika and JMapper and probably others as none of them appears to be a de facto standard in the way that Hibernate is for JPA. I also haven't seen sufficient demand for mapping libraries to warrant a section with multiple options so I think the best course of action is to close this one. Thanks anyway for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants