Skip to content

Commit e1ee353

Browse files
committed
message-bundle feature
1 parent 64a9dac commit e1ee353

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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})"
128131
4) @EnableScheduling on SpringApp
129132

130133
notice: 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

0 commit comments

Comments
 (0)