package com.ruoyi.ibs.init;

import com.ruoyi.ibs.grid.service.AddressAnalyseService;
import com.ruoyi.ibs.grid.service.SysAddressService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @Author 吴凯程
 * @Date 2025/8/4
 **/
@Component
@Slf4j
public class Initializer {

    @Resource
    private AddressAnalyseService addressAnalyseService;

    @Resource
    private SysAddressService sysAddressService;

    @PostConstruct
    public void init() {
        log.info("<-------------------初始化内存数据...------------------->");
        sysAddressService.initAddressTrees();
        addressAnalyseService.loadGeometry();
    }


}
