Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Service
- class PessoaService {
- public PessoaResponse converter(Pessoa pessoa, Long valor1, Long valor2) {
- PessoaResponse pessoaResponse = new PessoaMapperUtil(pessoa).toResponse();
- Long resultado = valor1 + valor2;
- pessoaResponse.setResultado(resultado);
- return pessoaResponse;
- }
- }
- @Service
- class PessoaService {
- private final PessoaMapperUtil mapper;
- @AutoWired
- PessoaService(PessoaMapperUtil mapper) { this.mapper = mapper; }
- public PessoaResponse converter(Pessoa pessoa, Long valor1, Long valor2) {
- PessoaResponse pessoaResponse = mapper.toResponse(pessoa);
- Long resultado = valor1 + valor2;
- pessoaResponse.setResultado(resultado);
- return pessoaResponse;
- }
- }
Add Comment
Please, Sign In to add comment