Last active
November 13, 2018 07:33
-
-
Save Ikhiloya/2bbb828d207d5c6c9951531c0bb27468 to your computer and use it in GitHub Desktop.
controller method for spring boot internalization with an array
This file contains hidden or 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
| @Autowired | |
| MessageSource messageSource; | |
| @RequestMapping(value = "/get-greeting-name", method = RequestMethod.GET) | |
| public String greetingWithName() { | |
| String[] params = new String[]{"Ikhiloya", "today"}; | |
| return messageSource.getMessage("good.morning.name", params, LocaleContextHolder.getLocale()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment