zoukankan      html  css  js  c++  java
  • SpringBoot优先加载设置

    1.启动类继承CommandLineRunner接口

    2.如果预先加载多个用@Order(value=1) value=加载等级   等级数越小优先级越大

      例 

    package com.example.demo;
    
    import com.example.demo.controller.NettyClient;
    
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.boot.CommandLineRunner;
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    
    //实现CommandLineRunner @SpringBootApplication
    public class DemoApplication implements CommandLineRunner { private static final Logger log = LoggerFactory.getLogger(DemoApplication.class); public static void main(String[] args) { SpringApplication app = new SpringApplication(DemoApplication.class); app.run(args); } @Override public void run(String... args) throws Exception { } }
  • 相关阅读:
    python基础-运算符和编码
    python介绍
    墨菲定律
    羊皮卷
    循环神经网络层
    ResNet实战
    ResNet实战
    ResNet,DenseNet
    经典卷积网络VGG,GoodLeNet,Inception
    CIFAR100与VGG13实战
  • 原文地址:https://www.cnblogs.com/HQ0422/p/10862071.html
Copyright © 2011-2022 走看看