SpringBoot 工程提供引导类用来启动程序,SpringBoot 工程启动后创建并初始化 Spring 容器
package com.itheima;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
@SpringBootApplication //引导类,整个程序的入口,加载Bean
public class Springboot01Application {
public static void main(String[] args) {
ConfigurableApplicationContext ctx = SpringApplication.run(Springboot01Application.class, args);//启动了一个Spring容器
Object bean = ctx.getBean("springboot01Controller");
System.out.println(bean);
}
}
- springboot springboot2springboot2 springboot2 springboot springboot2 springboot swagger3 swagger springboot2 springboot mybatis springboot2 springboot lettuce redis springboot2 springboot spring3 spring springboot2 springboot后台 管理系统 springboot2 springboot项目vue3 springboot2 springboot文件 springboot2 springboot单元assert