Package org.nutz.mvc.annotation

Examples of org.nutz.mvc.annotation.Localization.type()


    Localization lc = mainModule.getAnnotation(Localization.class);
    if (null != lc) {
      if (log.isDebugEnabled())
        log.debugf("Localization message: '%s'", lc.value());

      Map<String, Map<String, Object>> msgss = Mirror.me(lc.type()).born().load(lc.value());
      config.setAttributeIgnoreNull(Localization.class.getName(), msgss);
    } else if (log.isDebugEnabled()) {
      log.debug("!!!Can not find localization message resource");
    }
  }
View Full Code Here


    private void evalLocalization(NutConfig config, Class<?> mainModule) {
        Localization lc = mainModule.getAnnotation(Localization.class);
        if (null != lc) {
            if (log.isDebugEnabled())
                log.debugf("Localization: %s('%s') %s dft<%s>",
                           lc.type().getName(),
                           lc.value(),
                           Strings.isBlank(lc.beanName()) ? "" : "$ioc->" + lc.beanName(),
                           lc.defaultLocalizationKey());

            MessageLoader msgLoader = null;
View Full Code Here

                           lc.defaultLocalizationKey());

            MessageLoader msgLoader = null;
            // 通过 Ioc 方式加载 MessageLoader ...
            if (!Strings.isBlank(lc.beanName())) {
                msgLoader = config.getIoc().get(lc.type(), lc.beanName());
            }
            // 普通方式加载
            else {
                msgLoader = Mirror.me(lc.type()).born();
            }
View Full Code Here

            if (!Strings.isBlank(lc.beanName())) {
                msgLoader = config.getIoc().get(lc.type(), lc.beanName());
            }
            // 普通方式加载
            else {
                msgLoader = Mirror.me(lc.type()).born();
            }
            // 加载数据
            Map<String, Map<String, Object>> msgss = msgLoader.load(lc.value());

            // 保存消息 Map
View Full Code Here

    protected void evalLocalization(NutConfig config, Class<?> mainModule) {
        Localization lc = mainModule.getAnnotation(Localization.class);
        if (null != lc) {
            if (log.isDebugEnabled())
                log.debugf("Localization: %s('%s') %s dft<%s>",
                           lc.type().getName(),
                           lc.value(),
                           Strings.isBlank(lc.beanName()) ? "" : "$ioc->" + lc.beanName(),
                           lc.defaultLocalizationKey());

            MessageLoader msgLoader = null;
View Full Code Here

                           lc.defaultLocalizationKey());

            MessageLoader msgLoader = null;
            // 通过 Ioc 方式加载 MessageLoader ...
            if (!Strings.isBlank(lc.beanName())) {
                msgLoader = config.getIoc().get(lc.type(), lc.beanName());
            }
            // 普通方式加载
            else {
                msgLoader = Mirror.me(lc.type()).born();
            }
View Full Code Here

            if (!Strings.isBlank(lc.beanName())) {
                msgLoader = config.getIoc().get(lc.type(), lc.beanName());
            }
            // 普通方式加载
            else {
                msgLoader = Mirror.me(lc.type()).born();
            }
            // 加载数据
            Map<String, Map<String, Object>> msgss = msgLoader.load(lc.value());

            // 保存消息 Map
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.