package Ġbr . com . wood river . r pg . configuration Ċ Ċ import Ġorg . springframework . context . Message Source Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . context . support . Reload able ResourceBundle Message Source Ċ import Ġorg . springframework . web . servlet . Locale Resolver Ċ import Ġorg . springframework . web . servlet . i 1 8 n . Session Locale Resolver Ċ import Ġjava . util .* Ċ Ċ @ Configuration Ċ class ĠMessage Bundle Configuration Ġ{ ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġmessage Source (): ĠMessage Source { ĊĠĠĠĠĠĠĠ Ġvar Ġmessage Bundle Ġ= ĠRe load able ResourceBundle Message Source () ĊĠĠĠĠĠĠĠ Ġmessage Bundle . set Bas ename (" classpath : messages ") ĊĠĠĠĠĠĠĠ Ġmessage Bundle . setDefault Encoding (" UTF - 8 ") ĊĠĠĠĠĠĠĠ Ġreturn Ġmessage Bundle ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġlocale Resolver (): ĠLocale Resolver { ĊĠĠĠĠĠĠĠ Ġvar Ġsession Local Resolver Ġ= ĠSession Locale Resolver () ĊĠĠĠĠĠĠĠ Ġsession Local Resolver . setDefault Locale ( Locale (" pt ", Ġ" BR ")) ĊĠĠĠĠĠĠĠ Ġreturn Ġsession Local Resolver ĊĠĠĠ Ġ} Ċ }