package cn.com.qmth.examcloud.core.questions.starter.config;

import cn.com.qmth.examcloud.core.questions.base.word.DocxProcessUtil;
import cn.com.qmth.examcloud.core.questions.service.impl.SettingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * Created by songyue on 17/3/20.
 */
@Component
public class initData implements CommandLineRunner {

    private static final Logger log = LoggerFactory.getLogger(initData.class);

    @Autowired
    private SettingService settingService;

    @Override
    public void run(String... args) throws Exception {
        log.info("设置初始化开始");
        settingService.initData();
        DocxProcessUtil.init();
        log.info("设置初始化完成");
    }

}
