package com.fzzy.gateway;
|
|
import com.fzzy.gateway.sc2023.api.ApiInitService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.boot.CommandLineRunner;
|
import org.springframework.core.annotation.Order;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
|
/**
|
* 配置随系统启动默认配置
|
*/
|
@Service
|
@Slf4j
|
@Order(value = 2)
|
public class GatewayRunner implements CommandLineRunner {
|
|
@Resource
|
private ApiInitService apiInitService;
|
|
|
@Override
|
public void run(String... args) throws Exception {
|
log.info("网关接口随系统启动------------");
|
|
|
//四川网关接口,启动默认获取鉴权信息,长期有效
|
apiInitService.init();
|
|
|
}
|
|
}
|