Last active
February 2, 2019 11:33
-
-
Save linhvovn/3e7aa0a1556eee30ef2cd236a729e6ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
public class LanguageService implements LanguageServiceInf { | |
@Autowired | |
private LanguageRepository languageRepository; | |
@Override | |
public Map<String, String> getAllMessageByLocale(String locale) { | |
List<LanguageEntity> langList = languageRepository.findAllByLocale(locale); | |
return langList | |
.stream() | |
.collect(Collectors.toMap(x -> x.getKey(), x -> x.getContent())); | |
} | |
//.... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment