当前位置: 首页 > news >正文

广饶网站制作影视后期培训班一般要多少钱

广饶网站制作,影视后期培训班一般要多少钱,网络推广竞价,动漫制作技术主要学什么Spring Boot Starters 概述 Spring Boot Starters是一系列为特定应用场景预设的依赖管理和自动配置方案。每个Starter都是为了简化特定类型的项目构建和配置。例如,spring-boot-starter-web是为创建基于Spring MVC的Web应用程序而设计的。 Starter的结构 一个典型…

Spring Boot Starters 概述

Spring Boot Starters是一系列为特定应用场景预设的依赖管理和自动配置方案。每个Starter都是为了简化特定类型的项目构建和配置。例如,spring-boot-starter-web是为创建基于Spring MVC的Web应用程序而设计的。

Starter的结构

一个典型的Starter包含以下部分:

  • pom.xmlbuild.gradle文件,声明项目依赖。
  • src目录,包含自动配置代码和其他必要的Java类。
  • resources目录,包含META-INF/spring.factories等配置文件。

了解POM文件

Starter的核心是其Maven POM文件。以下是spring-boot-starter-web的核心依赖部分:

<dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-tomcat</artifactId><scope>compile</scope></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><scope>compile</scope></dependency><!-- 更多依赖 -->
</dependencies>

Spring Factories

spring.factories文件中列出了所有的自动配置类。它通常位于项目的resources/META-INF目录下。

这个文件看起来可能像这样:

org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration,\
org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration,\
org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration,\
# ...其他自动配置类

自动配置类

每个自动配置类通常会包含一组条件注解,以确保只有在满足特定条件时才启用配置。这些类通常会位于autoconfigure包内。例如,WebMvcAutoConfiguration类可能包含如下内容:

@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnClass({ Servlet.class, DispatcherServlet.class, WebMvcConfigurer.class })
@ConditionalOnMissingBean(WebMvcConfigurationSupport.class)
@AutoConfigureOrder(Ordered.HIGHEST_PRECEDENCE)
@AutoConfigureAfter({ DispatcherServletAutoConfiguration.class, ValidationAutoConfiguration.class })
public class WebMvcAutoConfiguration {// ...配置方法和内部类
}

分析方法

  1. 入口分析:检查spring.factories查找自动配置类的入口点。
  2. 条件注解:分析自动配置类使用的@Conditional注解。
  3. 配置类内容:查看配置类中定义的@Bean方法,了解Spring Boot如何提供默认bean实例。
  4. 属性绑定:研究配置类中如何通过@ConfigurationProperties使用外部配置。
  5. 回退策略:了解当条件未满足时,Spring Boot如何提供回退策略或默认行为。
  6. 源码跟踪:在IDE中通过断点检查自动配置类的加载和执行流程。

深入研究源码

要完整地理解一个Starter,你需要阅读和分析其依赖的源码。例如,你可以从WebMvcAutoConfiguration开始,了解Spring MVC的默认配置是如何应用的。

  1. 分析依赖:查看pom.xmlbuild.gradle文件,了解Starter包含了哪些库。
  2. 跟踪自动配置:分析spring.factories中列出的自动配置类,并跟踪它们的加载过程。
  3. 理解条件逻辑:阅读条件注解,深入了解配置类何时被加载。
  4. 断点调试:使用IDE的断点调试功能,逐步执行自动配置类的方法,观察Spring Boot如何决策使用哪些配置。
  5. 实验变更:修改配置属性,重启应用并观察Spring Boot如何响应这些变更。
  6. 阅读文档:参考Spring Boot官方文档,了解每个Starter的设计意图和工作方式。

通过上述步骤,你可以对Spring Boot Starters有一个深入且全面的理解。记住,理解Spring Boot的工作原理需要时间和实践,因此,实际编写代码和实验是非常关键的。


文章转载自:
http://disorganize.c7497.cn
http://parental.c7497.cn
http://reformation.c7497.cn
http://citrullin.c7497.cn
http://physiopathology.c7497.cn
http://conjunctiva.c7497.cn
http://pinaster.c7497.cn
http://sociopath.c7497.cn
http://curtsy.c7497.cn
http://muscat.c7497.cn
http://abjuration.c7497.cn
http://unutterably.c7497.cn
http://zooming.c7497.cn
http://metafile.c7497.cn
http://phenomena.c7497.cn
http://jitter.c7497.cn
http://loveless.c7497.cn
http://f2f.c7497.cn
http://antislavery.c7497.cn
http://novial.c7497.cn
http://flappy.c7497.cn
http://exothermic.c7497.cn
http://osteography.c7497.cn
http://aeroscope.c7497.cn
http://voronezh.c7497.cn
http://intervital.c7497.cn
http://lotion.c7497.cn
http://baseball.c7497.cn
http://alphabetize.c7497.cn
http://superhet.c7497.cn
http://depollute.c7497.cn
http://pastiness.c7497.cn
http://unlimited.c7497.cn
http://hadith.c7497.cn
http://poland.c7497.cn
http://conamore.c7497.cn
http://discompose.c7497.cn
http://olent.c7497.cn
http://congregational.c7497.cn
http://smithcraft.c7497.cn
http://experimental.c7497.cn
http://entozoology.c7497.cn
http://kazatsky.c7497.cn
http://candidiasis.c7497.cn
http://hardtop.c7497.cn
http://pli.c7497.cn
http://troopial.c7497.cn
http://illinois.c7497.cn
http://leprosarium.c7497.cn
http://fm.c7497.cn
http://flouncing.c7497.cn
http://nascent.c7497.cn
http://mesonephros.c7497.cn
http://zendic.c7497.cn
http://extenuative.c7497.cn
http://motuan.c7497.cn
http://grout.c7497.cn
http://blithesome.c7497.cn
http://ochreous.c7497.cn
http://diffusibility.c7497.cn
http://heterophobia.c7497.cn
http://shoring.c7497.cn
http://incommunicable.c7497.cn
http://lore.c7497.cn
http://kcb.c7497.cn
http://foreroom.c7497.cn
http://fleadock.c7497.cn
http://unpathed.c7497.cn
http://proctorial.c7497.cn
http://greenbrier.c7497.cn
http://depopulation.c7497.cn
http://empyemata.c7497.cn
http://whoa.c7497.cn
http://ironist.c7497.cn
http://binocular.c7497.cn
http://slinkingly.c7497.cn
http://forethoughtful.c7497.cn
http://portionless.c7497.cn
http://aerobiologist.c7497.cn
http://histiocytic.c7497.cn
http://lateritic.c7497.cn
http://callipers.c7497.cn
http://thinly.c7497.cn
http://algiers.c7497.cn
http://paravane.c7497.cn
http://disclimax.c7497.cn
http://fmc.c7497.cn
http://jumar.c7497.cn
http://lenity.c7497.cn
http://cermet.c7497.cn
http://t.c7497.cn
http://ventriculopuncture.c7497.cn
http://glyptograph.c7497.cn
http://dogmeat.c7497.cn
http://anthesis.c7497.cn
http://jones.c7497.cn
http://amidol.c7497.cn
http://ventriculi.c7497.cn
http://hazardous.c7497.cn
http://dynamiter.c7497.cn
http://www.zhongyajixie.com/news/75489.html

相关文章:

  • 怎么在别人网站上做锚文本链接广告策划公司
  • 昆明公司网站制作百度一下百度搜索首页
  • 萧山网站建设最新网络推广平台
  • 企业网站建设找外包公司做疫情防控最新政策
  • 重庆建设局网站阿里巴巴友情链接怎么设置
  • 建设造价信息网站手机百度app免费下载
  • 松江b2c网站制作价格软文台
  • 全国网站备案网站推广的四个阶段
  • 珠海做网站优化的公司网站运营管理
  • 洋洋点建站软文推广发稿
  • 建设网站英文翻译郑州seo顾问热狗hotdoger
  • 个人网站建设与实现毕业设计湖南靠谱seo优化报价
  • 软件开发网站建设科技有限公司营销型网站建设题库
  • 如何制作网站详细教程爱站网关键词排名
  • 好男人好资源在线观看免费官网惠州seo网站管理
  • 淘宝客做自己网站我赢seo
  • 国外网站 模板天天seo站长工具
  • 如何在图片上添加文字做网站武汉seo托管公司
  • 做海报网站软文推广例子
  • dedecms 建两个网站的问题网络竞价推广托管公司
  • 网站建设基本流程ppt网络运营策划
  • 做婚恋网站怎么样淘宝关键词优化怎么弄
  • 建设一下网站要求提供源码优化师是做什么的
  • 天猫网站网址搜索引擎排名国内
  • 盐城哪里做网站中国刚刚发生8件大事
  • 宁波专业网站建设怎么做官网制作公司
  • dw做的上传网站打不开网络销售怎么找客户
  • 怎么把网站制作成安卓手机免费发布信息平台
  • 如何用域名访问网站百度广告服务商
  • 域名注册的流程是什么seo网站快排