Package org.springframework.context.support

Examples of org.springframework.context.support.AbstractMessageSource


        ApplicationServicesLocator locator = new ApplicationServicesLocator(applicationServices);
        ApplicationServicesLocator.load(locator);

        // create dummy message source that always return an empty string
        AbstractMessageSource source = new AbstractMessageSource() {
            @Override
            protected MessageFormat resolveCode(String s, Locale locale) {
                return new MessageFormat("");
            }
        };
View Full Code Here


  public void testEvents() throws Exception {
    // Do nothing
  }

  public void testRootMessageSourceWithUseCodeAsDefaultMessage() throws NoSuchMessageException {
    AbstractMessageSource messageSource = (AbstractMessageSource) root.getBean("messageSource");
    messageSource.setUseCodeAsDefaultMessage(true);

    assertEquals("message1", applicationContext.getMessage("code1", null, Locale.getDefault()));
    assertEquals("message2", applicationContext.getMessage("code2", null, Locale.getDefault()));

    try {
View Full Code Here

TOP

Related Classes of org.springframework.context.support.AbstractMessageSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.