当前位置: 首页>>代码示例>>Java>>正文


Java SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext方法代码示例

本文整理汇总了Java中org.springframework.web.context.support.SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext方法的典型用法代码示例。如果您正苦于以下问题:Java SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext方法的具体用法?Java SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext怎么用?Java SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.web.context.support.SpringBeanAutowiringSupport的用法示例。


在下文中一共展示了SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: clean

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
/**
 * Clean up expired records.
 */
@Scheduled(initialDelayString = "${cas.authn.mfa.trusted.cleaner.startDelay:PT10S}",
           fixedDelayString = "${cas.authn.mfa.trusted.cleaner.repeatInterval:PT60S}")
public void clean() {

    if (!trustedProperties.getCleaner().isEnabled()) {
        LOGGER.debug("[{}] is disabled. Expired trusted authentication records will not automatically be cleaned up by CAS",
                getClass().getName());
        return;
    }

    try {
        LOGGER.debug("Proceeding to clean up expired trusted authentication records...");
        
        SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
        final LocalDate validDate = LocalDate.now().minus(trustedProperties.getExpiration(),
                DateTimeUtils.toChronoUnit(trustedProperties.getTimeUnit()));
        LOGGER.info("Expiring records that are on/before [{}]", validDate);
        this.storage.expire(validDate);
    } catch (final Exception e) {
        LOGGER.error(e.getMessage(), e);
    }
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:26,代码来源:MultifactorAuthenticationTrustStorageCleaner.java

示例2: doFilter

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    if (backupService == null) {
        SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    }

    String url = ((HttpServletRequest) request).getRequestURI();
    if (isBackupFinishJsonUrl(url)) {
        ((HttpServletResponse) response).setHeader("Cache-Control", "private, max-age=0, no-cache");
        ((HttpServletResponse) response).setDateHeader("Expires", 0);
        generateResponseForIsBackupFinishedAPI(response);
        return;
    }
    if (backupService.isBackingUp()) {
        ((HttpServletResponse) response).setHeader("Cache-Control", "private, max-age=0, no-cache");
        ((HttpServletResponse) response).setDateHeader("Expires", 0);
        if (isAPIUrl(url) && !isMessagesJson(url)) {
            generateAPIResponse(request, response);
        } else {
            generateHTMLResponse(response);
        }
    } else {
        chain.doFilter(request, response);
    }

}
 
开发者ID:gocd,项目名称:gocd,代码行数:27,代码来源:BackupFilter.java

示例3: execute

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void execute(final JobExecutionContext jobExecutionContext) throws JobExecutionException {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    try {
        logger.info("Beginning audit cleanup...");
        decrementCounts();
    } catch (final Exception e) {
        logger.error(e.getMessage(), e);
    }
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:11,代码来源:AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter.java

示例4: clean

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public final void clean() {
    LOGGER.debug("Starting to clean expiring and previously used google authenticator tokens");
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    cleanInternal();
    LOGGER.info("Finished cleaning google authenticator tokens");
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:BaseOneTimeTokenRepository.java

示例5: execute

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void execute(final JobExecutionContext jobExecutionContext) throws JobExecutionException {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);

    try {
        logger.info("Beginning ticket cleanup...");
        final Collection<Ticket> ticketsToRemove = Collections2.filter(this.getTickets(), new Predicate<Ticket>() {
            @Override
            public boolean apply(@Nullable final Ticket ticket) {
                if (ticket.isExpired()) {
                    if (ticket instanceof TicketGrantingTicket) {
                        logger.debug("Cleaning up expired ticket-granting ticket [{}]", ticket.getId());
                        logoutManager.performLogout((TicketGrantingTicket) ticket);
                        deleteTicket(ticket.getId());
                    } else if (ticket instanceof ServiceTicket) {
                        logger.debug("Cleaning up expired service ticket [{}]", ticket.getId());
                        deleteTicket(ticket.getId());
                    } else {
                        logger.warn("Unknown ticket type [{} found to clean", ticket.getClass().getSimpleName());
                    }
                    return true;
                }
                return false;
            }
        });
        logger.info("{} expired tickets found and removed.", ticketsToRemove.size());
    } catch (final Exception e) {
        logger.error(e.getMessage(), e);
    }
}
 
开发者ID:yuweijun,项目名称:cas-server-4.2.1,代码行数:31,代码来源:DefaultTicketRegistry.java

示例6: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
/**
 * Cette méthode init pourrait être déplacée dans une classe abstraite
 *
 * @see javax.servlet.GenericServlet#init()
 */
@Override
public void init() throws ServletException {
    super.init();
    // déclenchement de l'autowiring de la classe
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    // on ne peut pas faire d'autowire par constructeur dans ce cas là
}
 
开发者ID:Eulbobo,项目名称:java-samples,代码行数:13,代码来源:HelloServlet.java

示例7: PersistentObjectIdResolver

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
/**
 * Default Constructor that injects beans automatically.
 *
 * @param entityClass
 */
protected PersistentObjectIdResolver() {
	// As subclasses of this class are used in the resolver property of an
	// JsonIdentityInfo annotation, we cannot easily autowire components
	// (like the service for the current). For that reason, we use this
	// helper method to process the injection of the services
	SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
开发者ID:terrestris,项目名称:shogun2,代码行数:13,代码来源:PersistentObjectIdResolver.java

示例8: initAutowiredBeans

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
private void initAutowiredBeans() {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
开发者ID:vitaly-chibrikov,项目名称:otus_java_2017_06,代码行数:4,代码来源:TimerServlet.java

示例9: DistributionTargetDeserializer

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
public DistributionTargetDeserializer() {
    this(null);
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
开发者ID:Taskana,项目名称:taskana,代码行数:5,代码来源:DistributionTargetDeserializer.java

示例10: execute

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void execute(final JobExecutionContext jobExecutionContext) throws JobExecutionException {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);

    try {

        logger.info("Beginning ticket cleanup.");
        logger.debug("Attempting to acquire ticket cleanup lock.");
        if (!this.jpaLockingStrategy.acquire()) {
            logger.info("Could not obtain lock.  Aborting cleanup.");
            return;
        }
        logger.debug("Acquired lock.  Proceeding with cleanup.");

        logger.info("Beginning ticket cleanup...");
        final Collection<Ticket> ticketsToRemove = Collections2.filter(this.getTickets(), new Predicate<Ticket>() {
            @Override
            public boolean apply(final Ticket ticket) {
                if (ticket.isExpired()) {
                    if (ticket instanceof TicketGrantingTicket) {
                        logger.debug("Cleaning up expired ticket-granting ticket [{}]", ticket.getId());
                        logoutManager.performLogout((TicketGrantingTicket) ticket);
                        deleteTicket(ticket.getId());
                    } else if (ticket instanceof ServiceTicket) {
                        logger.debug("Cleaning up expired service ticket [{}]", ticket.getId());
                        deleteTicket(ticket.getId());
                    } else {
                        logger.warn("Unknown ticket type [{} found to clean", ticket.getClass().getSimpleName());
                    }
                    return true;
                }
                return false;
            }
        });
        logger.info("{} expired tickets found and removed.", ticketsToRemove.size());
    } catch (final Exception e) {
        logger.error(e.getMessage(), e);
    } finally {
        logger.debug("Releasing ticket cleanup lock.");
        this.jpaLockingStrategy.release();
        logger.info("Finished ticket cleanup.");
    }

}
 
开发者ID:yuweijun,项目名称:cas-server-4.2.1,代码行数:45,代码来源:JpaTicketRegistry.java

示例11: ResendMessagesJob

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
public ResendMessagesJob() {
//First recover context of the job since it is created by Quartz, not Spring
SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
   }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:ResendMessagesJob.java

示例12: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
@Override
public void init() {
	SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:5,代码来源:CalendarServlet.java

示例13: init

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
public void init() {
	SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:4,代码来源:GwtOrderServiceServlet.java

示例14: MomoLayerSerializer

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
public MomoLayerSerializer(Class<MomoLayer> t) {
	super(t);
	SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
开发者ID:terrestris,项目名称:momo3-backend,代码行数:5,代码来源:MomoLayerSerializer.java

示例15: MomoUserSerializer

import org.springframework.web.context.support.SpringBeanAutowiringSupport; //导入方法依赖的package包/类
public MomoUserSerializer(Class<MomoUser> t) {
	super(t);
	SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
 
开发者ID:terrestris,项目名称:momo3-backend,代码行数:5,代码来源:MomoUserSerializer.java


注:本文中的org.springframework.web.context.support.SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。