springBoot 程序入口

Posted 点点_滴滴

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springBoot 程序入口相关的知识,希望对你有一定的参考价值。

入口类要放在首个package 这样它能扫到所有的包

@SpringBootApplication
@EnableScheduling
public class App {

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }
}

@EnableScheduling 用户开启线程

以上是关于springBoot 程序入口的主要内容,如果未能解决你的问题,请参考以下文章