File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ for 2.4.x or above
4141 - use for encrypt password and added to config file, then decrypted pass in runtime
4242- Jobs
4343 - use Spring TaskScheduler for run jobs
44+ - Message Source
45+ - use message-source to define message in one file and use in whole project
46+ - use locale for config language of app for show message from different source
4447
4548## Run guide
4649### Run for develop and debug: <br >
@@ -128,3 +131,12 @@ hikari.dataSource.password="ENC({output})"
1281314 ) @EnableScheduling on SpringApp
129132
130133notice: that name of bean in BeanConfig must be equal with name of key in properties file.
134+
135+ ### Message Source
136+ 1 ) define LocaleConfig to implement Base config to define messageSource
137+ 1 ) how load message source (ex: loadMessageSource method in LocaleConfig class)
138+ 2 ) how define bean for use message source for specific category (ex: errorCodeSourceDesc method in LocaleConfig class)
139+ 3 ) how define config for resolve locale (ex: localeResolver method in LocaleConfig class)
140+ 2 ) add message key from message-source bundle into code (ex: SampleExceptionType enum class)
141+ 3 ) the code is written use locale by header, and you should set Accept-Language in request header
142+ 4 ) define message and messageContainer for use to send identical messageResponse for error or normal message
You can’t perform that action at this time.
0 commit comments