[BAEL-10127] - Added code for modelmapper article

This commit is contained in:
amit2103
2018-12-16 16:37:45 +05:30
parent 0f443d3006
commit d9ac59cd13
14 changed files with 536 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
package com.baeldung.modelmapper.service;
import org.springframework.stereotype.Service;
import com.baeldung.modelmapper.model.Preference;
import com.baeldung.modelmapper.model.User;
@Service
public class UserService implements IUserService {
@Override
public User getCurrentUser() {
Preference preference = new Preference();
preference.setId(1L);
preference.setTimezone("Asia/Calcutta");
User user = new User();
user.setId(1L);
user.setName("Micheal");
user.setPreference(preference);
return user;
}
}