@Component public class ContextMessageSourceImpl extends Object implements ContextMessageSource
| Constructor and Description |
|---|
ContextMessageSourceImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage(String code)
Returns the message in the locale of the current user.
|
String |
getMessage(String code,
Object[] args)
Returns the message in the locale of the current user.
|
public String getMessage(String code)
ContextMessageSourcegetMessage in interface ContextMessageSourcecode - the code to lookup up, such as 'calculator.noRateSet'public String getMessage(String code, @Nullable Object[] args)
ContextMessageSourcegetMessage in interface ContextMessageSourcecode - the code to lookup up, such as 'calculator.noRateSet'args - an array of arguments that will be filled in for params within the message (params
look like "{0}", "{1,date}", "{2,time}" within a message), * or null if none.Copyright © 2020 Pivotal Software, Inc.. All rights reserved.