package com.tzld.piaoquan.ad.engine.server;

import com.tzld.piaoquan.ad.engine.commons.score.ScorerUtils;
import com.tzld.piaoquan.ad.engine.commons.util.PropertiesUtil;
import com.tzld.piaoquan.ad.engine.commons.util.SimilarityUtils;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author dyp
 */
@Component
@DependsOn({"propertiesUtil", "sparkConfig"})
public class WarmupService {

    @PostConstruct
    public void warmup() {
        ScorerUtils.warmUp();
        SimilarityUtils.init();
    }
}
