package com.mortals.xhx.daemon.applicationservice;

import com.mortals.framework.springcloud.service.IApplicationStartedService;
import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.base.system.resource.service.ResourceService;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class StartService implements IApplicationStartedService {

    @Autowired
    private ResourceService resourceService;

    @Override
    public void start() {
        ThreadPool.getInstance().init(10);
        resourceService.refreshResourceUrl("com.mortals.xhx", null);
    }

    @Override
    public void stop() {
        log.info("停止服务..");

    }

    @Override
    public int getOrder() {
        return 10;
    }


}
