新建一个StartupRunner 类,引用CommandLineRunner方法
@Component
public class StartupRunner implements CommandLineRunner {
@Autowired
private RedisTemplate<String, Object> redisTemplate;
@Autowired
private JdbcTemplate jdbcTemplate;
@Override
public void run(String... arg0) throws Exception {
System.out.println("<----------------启动加载配置--------------->");
}
}