Repository: deltaspike Updated Branches: refs/heads/master 71e5ac29c -> da8320520
improve JavaDoc for MessageBundles Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/da832052 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/da832052 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/da832052 Branch: refs/heads/master Commit: da83205205d0333a8ac4135b2a5ee48d0c20d208 Parents: 71e5ac2 Author: Mark Struberg <[email protected]> Authored: Tue Nov 10 06:50:09 2015 +0100 Committer: Mark Struberg <[email protected]> Committed: Tue Nov 10 06:50:09 2015 +0100 ---------------------------------------------------------------------- .../deltaspike/core/api/message/MessageBundle.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/da832052/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/message/MessageBundle.java ---------------------------------------------------------------------- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/message/MessageBundle.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/message/MessageBundle.java index d531dd4..253676a 100644 --- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/message/MessageBundle.java +++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/message/MessageBundle.java @@ -55,10 +55,21 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * {@link org.apache.deltaspike.core.api.message.MessageContext#messageSource(String...)}. The fully qualified class * name of the interface annotated with @MessageBundle will automatically be registered as additional * <code>messageSource</code> for those messages.</p> + * <p> + * By default the Message Source is a resource bundle with the same name as the {@code @MessageBundle} + * annotated interface, e.g. {@code com.acme.MyMessages_en.properties}. + * </p> * * <p> * <code>@MessageBundle</code> can be combined with {@link MessageContextConfig} to further customize the - * message resolution and processing.</p> + * message resolution and processing. To use a different resourcebundle, e.g. {@code somepath/myownmessages_en.properties} + * you might write: + * <pre> + * @MessageBundle + * @MessageContextConfig(messageSource = "somepath/myownmessages") + * </pre> + * + * </p> * * <p> * Debug hint: Set a breakpoint in <code>MessageBundleInvocationHandler#invoke</code>. This will get called for every
