立即使用
SpringApplication
.run(SimpleMVCApp.class, args);
代码入口
new SpringApplication(primarySources)
this.webApplicationType = WebApplicationType.deduceFromClasspath();
code
如何决定webApplicationType?
jar包依赖决定
1.webApplicationType
1
.run(args)
ConfigurableEnvironment environment = prepareEnvironment(listeners, applicationArguments);
2
运行中环境准备
getOrCreateEnvironment
new StandardServletEnvironment()
commandLineArgs
servletConfigInitParams
servletContextInitParams
jndiProperties
systemProperties
systemEnvironment
random
application.properties ...
@PropertySource annotations on your @Configuration classes
defaultProperties
context = createApplicationContext();
3
运行中context准备
prepareContext(context, environment, listeners, applicationArguments, printedBanner);
AnnotationConfigServletWebServerApplicationContext
refreshContext(context);
4
刷新context
onRefresh();
createWebServer();
this.webServer = factory.getWebServer(getSelfInitializer());
TomcatServletWebServerFactory#
getWebServer
getTomcatWebServer(tomcat);
yufarui
评论
为了保护您和被举报人的权利,请您慎重填写举报原因,我们会认真核实。
流程图
组织结构图
思维导图
软件/计算机
图形表格
商务/PPT
管理/咨询
平面设计图
UML图
基本电路图
平面布置图
箭头
圆形图
甘特图
时间线
基本网格图
程序架构图
泳道图
鱼骨图
商业画布
时序图
工业工程
图表
数据库
你现在为非会员账号,仅可以创建3个可编辑的文件。
若你仍然需要创建文件,你将只能编辑最近的3个文件,其余的文件将会变为仅查看的状态。
升级会员即可创建无限制的可编辑文件数量及更多会员权益。
为了保护您和被举报人的权利,请您慎重填写举报原因,我们会认真核实。