org.springframework.context.ApplicationContext.getStartupDate()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.springframework.context.ApplicationContext.getStartupDate()方法的一些代码示例,展示了ApplicationContext.getStartupDate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationContext.getStartupDate()方法的具体详情如下:
包路径:org.springframework.context.ApplicationContext
类名称:ApplicationContext
方法名:getStartupDate

ApplicationContext.getStartupDate介绍

[英]Return the timestamp when this context was first loaded.
[中]返回首次加载此上下文时的时间戳。

代码示例

代码示例来源:origin: com.consol.citrus/citrus-ws

public long getStartupDate() {
  return applicationContext.getStartupDate();
}
public ApplicationContext getParent() {

代码示例来源:origin: pl.edu.icm.yadda/yadda-common

/**
 * @return
 * @see org.springframework.context.ApplicationContext#getStartupDate()
 */
public long getStartupDate() {
  return target.getStartupDate();
}

代码示例来源:origin: net.sf.taverna.t2.infrastructure/platform-spring

/**
 * Delegates to internal ApplicationContext supplied by constructor
 */
public final long getStartupDate() {
  return context.getStartupDate();
}

代码示例来源:origin: org.kuali.student.common/ks-common-util

public long getStartupDate() {
  return applicationContext.getStartupDate();
}

代码示例来源:origin: com.github.drtrang/spring-boot-autoconfigure

public static long getStartupDate() {
  return context.getStartupDate();
}

代码示例来源:origin: org.kuali.student.core/ks-common-util

@Override
public long getStartupDate() {
  return applicationContext.getStartupDate();
}

代码示例来源:origin: unic/neba

@Override
public long getStartupDate() {
  return wrapped.getStartupDate();
}

代码示例来源:origin: net.javacrumbs/smock-http

public long getStartupDate() {
  return wrappedApplicationContext.getStartupDate();
}

代码示例来源:origin: org.ligoj.bootstrap/bootstrap-business

@Override
public void afterPropertiesSet() {
  if (applicationContext.getStartupDate() != lastListenerInvocation) {
    // Invoke pre-spring-data listeners
    log.info("Notify EMF is ready before parsing Spring-Data queries");
    lastListenerInvocation = applicationContext.getStartupDate();
    applicationContext.getBeansOfType(AfterJpaBeforeSpringDataListener.class).values()
        .forEach(AfterJpaBeforeSpringDataListener::callback);
  }
  super.afterPropertiesSet();
}

代码示例来源:origin: apache/archiva

@Override
public long getStartupDate()
{
  return applicationContext.getStartupDate();
}

代码示例来源:origin: org.dspace.dependencies.cocoon/dspace-cocoon-servlet-service-impl

public Map getBlockServletMap() {
  ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
  if (this.blockServletCollector == null || applicationContext.getStartupDate() != this.applicationContextStartDate) {
    this.applicationContextStartDate = applicationContext.getStartupDate();
    this.blockServletCollector = (Map) applicationContext.getBean("org.apache.cocoon.servletservice.spring.BlockServletMap");
  }
  return blockServletCollector;
}

代码示例来源:origin: org.apache.cocoon/cocoon-servlet-service-impl

public Map getBlockServletMap() {
  ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
  if (this.blockServletCollector == null || applicationContext.getStartupDate() != this.applicationContextStartDate) {
    this.applicationContextStartDate = applicationContext.getStartupDate();
    this.blockServletCollector = (Map) applicationContext.getBean("org.apache.cocoon.servletservice.spring.BlockServletMap");
  }
  return blockServletCollector;
}

代码示例来源:origin: net.shibboleth.idp/idp-core

public DateTime getValue() {
    return new DateTime(getApplicationContext().getStartupDate());
  }
});

代码示例来源:origin: net.shibboleth.idp/idp-core

public Long getValue() {
    return System.currentTimeMillis() - getApplicationContext().getStartupDate();
  }
});

代码示例来源:origin: gilbutITbook/006859

@Override
public Collection<Metric<?>> metrics() {
  List<Metric<?>> metrics = new ArrayList<Metric<?>>();
  metrics.add(new Metric<Long>("spring.context.startup-date",
    context.getStartupDate()));
  metrics.add(new Metric<Integer>("spring.beans.definitions",
    context.getBeanDefinitionCount()));
  metrics.add(new Metric<Integer>("spring.beans",
    context.getBeanNamesForType(Object.class).length));
  metrics.add(new Metric<Integer>("spring.controllers",
    context.getBeanNamesForAnnotation(Controller.class).length));
  return metrics;
}

代码示例来源:origin: dqeasycloud/easy-cloud

@Override
  public Collection<Metric<?>> metrics() {
    List<Metric<?>> metrics = new ArrayList<>();
    metrics.add(new Metric<Long>("spring.context.startup-date",
        context.getStartupDate()));
    metrics.add(new Metric<Integer>("spring.beans.definitions",
        context.getBeanDefinitionCount()));
    metrics.add(new Metric<Integer>("spring.beans",
        context.getBeanNamesForType(Object.class).length));
    metrics.add(new Metric<Integer>("spring.controllers",
        context.getBeanNamesForAnnotation(Controller.class).length));
    metrics.add(new Metric<Integer>("spring.services",
        context.getBeanNamesForAnnotation(Service.class).length));
    return metrics;
  }
}

相关文章