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

郑州疫情最新消息今天seo服务外包费用

郑州疫情最新消息今天,seo服务外包费用,武汉市城市规划局官网,wordpress+特色缩略图一、什么是 SpringBoot? Spring Boot 是 Spring 开源组织下的子项目, 是 Spring 组件一站式解决方案,主要是简化 了使用 Spring 的难度,简省了繁重 xml 的配 置,提供了各种启动器,在运行过程中自定 配置,&a…

一、什么是 SpringBoot?

Spring Boot 是 Spring 开源组织下的子项目,

是 Spring 组件一站式解决方案,主要是简化

了使用 Spring 的难度,简省了繁重 xml 的配

置,提供了各种启动器,在运行过程中自定

配置,,开发者能快速上手

二、为什么要用 SpringBoot?

① 独立运行

② 简化配置

③ 自动配置

④ 无代码生成和 XML 配置

⑤ 无需部署 war 文件

三、Spring Boot 的核心配置文件有哪几个?它们的区别是什么?

Spring Boot 的核心配置文件application

bootstrap 配置文件

1. application 配置文件

主要用于 Spring Boot 项目的自动化配置

2. bootstrap 配置文件

有以下几个应用场景:

① 使用 SpringCloudConfig 配置中心时,

   这时需要在 bootstrap 配置文件中添加

   连接到配置中心的配置属性来加载外部

   配置中心的配置信息
② 一些固定的不能被覆盖的属性;
③ 一些加密/解密的场景;

四、SpringBoot 的配置文件有哪几种格式?它们有什么区别?

.properties .yml,它们的区别主要是

写格式不同

1. .properties

app.user.name = javastack

2. .yml

app:user:name: javastack

另外,.yml 格式不支持 @PropertySource

注解导入配置

五、SpringBoot 的核心注解是哪个?它主要由哪几个注解组成的?

启动类上面的注解是 @SpringBootApplication

它也是 SpringBoot 的核心注解

主要组合包含了以下 3 个注解:

@SpringBootConfiguration:组合了

   @Configuration 注解,实现配置文件

   的功能
@EnableAutoConfiguration:打开

  动配置的功能,也可以关闭某个自动配

  置的选项,如关闭数据源自动配置功能:

  @SpringBootApplication(exclude =

  { DataSourceAutoConfiguration.class })
@ComponentScan:Spring 组件扫描

六、开启SpringBoot特性有哪几种方式?

① 继承 spring-boot-starter-parent 项目

② 导入 spring-boot-dependencies 项目依

    赖

七、SpringBoot 需要独立的容器运行吗?

可以不需要,内置了 Tomcat/ Jetty 等容器

八、运行 SpringBoot 有哪几种方式?

① 打包用命令或者放到容器中运行

② 用 Maven/ Gradle 插件运行

③ 直接执行 main 方法运行

九、SpringBoot 自动配置原理是什么?

注解 @EnableAutoConfiguration,,

@Configuration,@ConditionalOnClass

就是自动配置的核心,首先它得是一个配

置文件,其次根据类路径下是否有这个类

去自动配置

Spring Boot 的自动配置注解是

@EnableAutoConfiguration, 从上面的

@Import 的类可以找到下面自动加载自动

配置的映射

 org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames(Class<?>, ClassLoader)
public static List<String> loadFactoryNames(Class<?> factoryClass, 
ClassLoader classLoader) {String factoryClassName = factoryClass.getName();try {Enumeration<URL> urls = (classLoader != null ? 
classLoader.getResources(FACTORIES_RESOURCE_LOCATION) :
lassLoader.getSystemResources(FACTORIES_RESOURCE_LOCATION));List<String> result = new ArrayList<String>();while (urls.hasMoreElements()) {URL url = urls.nextElement();Properties properties = PropertiesLoaderUtils.loadProperties(
new UrlResource(url));String factoryClassNames = properties.getProperty(factoryClassName);result.addAll(Arrays.asList(StringUtils.commaDelimitedListToStringArray(
factoryClassNames)));}return result;}catch (IOException ex) {throw new IllegalArgumentException("Unable to load [" + factoryClass.getName() +"] factories from location [" + FACTORIES_RESOURCE_LOCATION + "]", ex);}
}

这个方法会加载类路径及所有jar包下META-INF/spring.factories配置中映射的自动配置的类。

/**
* The location to look for factories.
* <p>Can be present in multiple JAR files.
*/
public static final String FACTORIES_RESOURCE_LOCATION = "META-INF/spring.factories";
查看Spring Boot自带的自动配置的包: spring-boot-autoconfigure-1.5.6.RELEASE.jar,
打开其中的META-INF/spring.factories文件会找到自动配置的映射org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration,\
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration,\
org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration,\
org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration,\
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration,\
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration,\
org.springframework.boot.autoconfigure.cloud.CloudAutoConfiguration,\
...

再来看看数据源自动配置的实现注解

@Configuration
@ConditionalOnClass({ DataSource.class, EmbeddedDatabaseType.class })
@EnableConfigurationProperties(DataSourceProperties.class)
@Import({ Registrar.class, DataSourcePoolMetadataProvidersConfiguration.class })
public class DataSourceAutoConfiguration {
...
@Configuration,@ConditionalOnClass就是自动配置的核心,首先它得是一个配置文件,其次根据类

十、如何理解 SpringBoot 中的 Starters?

Starters 可以理解为启动器,它包含了一

系列可以集成到应用里面的依赖包,你可

以一站式集成 Spring 及其他技术,而不

需要到处找示例代码和依赖包

如果想使用 Spring JPA 访问数据库,只

要加入 spring-boot-starter-data-jpa 启动

器依赖就能使用了

 


文章转载自:
http://dinncomicropaleontology.wbqt.cn
http://dinncobatuque.wbqt.cn
http://dinncoraia.wbqt.cn
http://dinncosynapomorphy.wbqt.cn
http://dinncoesne.wbqt.cn
http://dinncotweak.wbqt.cn
http://dinncoascend.wbqt.cn
http://dinncononreturnable.wbqt.cn
http://dinncobrogue.wbqt.cn
http://dinncoegp.wbqt.cn
http://dinncomutely.wbqt.cn
http://dinncopossession.wbqt.cn
http://dinncohistographer.wbqt.cn
http://dinncoecclesiasticus.wbqt.cn
http://dinncoslat.wbqt.cn
http://dinncoinsuppressive.wbqt.cn
http://dinncoheresiography.wbqt.cn
http://dinncopeatland.wbqt.cn
http://dinncoabroach.wbqt.cn
http://dinncobefog.wbqt.cn
http://dinncoculicine.wbqt.cn
http://dinncoflightiness.wbqt.cn
http://dinncopatronise.wbqt.cn
http://dinncosubjugation.wbqt.cn
http://dinncoprosector.wbqt.cn
http://dinncofunnel.wbqt.cn
http://dinncowoodcarver.wbqt.cn
http://dinncosweeping.wbqt.cn
http://dinncofidicinales.wbqt.cn
http://dinncorhynchocephalian.wbqt.cn
http://dinncoendorse.wbqt.cn
http://dinncoatticism.wbqt.cn
http://dinncojapanologist.wbqt.cn
http://dinncorapeseed.wbqt.cn
http://dinncoroadlouse.wbqt.cn
http://dinncokalendar.wbqt.cn
http://dinncoitalianise.wbqt.cn
http://dinncozionism.wbqt.cn
http://dinncogermless.wbqt.cn
http://dinncocontributory.wbqt.cn
http://dinnconte.wbqt.cn
http://dinncovintner.wbqt.cn
http://dinncodevocalize.wbqt.cn
http://dinncoimmanent.wbqt.cn
http://dinncodiabetogenic.wbqt.cn
http://dinnconovena.wbqt.cn
http://dinncocholecystotomy.wbqt.cn
http://dinncojitteriness.wbqt.cn
http://dinncogladden.wbqt.cn
http://dinncoprofligate.wbqt.cn
http://dinncograniferous.wbqt.cn
http://dinncochondrite.wbqt.cn
http://dinncotri.wbqt.cn
http://dinncoluoyang.wbqt.cn
http://dinncoaerogenically.wbqt.cn
http://dinncolabouratory.wbqt.cn
http://dinncoasclepiadean.wbqt.cn
http://dinncopesthole.wbqt.cn
http://dinncodewan.wbqt.cn
http://dinncojapura.wbqt.cn
http://dinncoautocoder.wbqt.cn
http://dinncopyretic.wbqt.cn
http://dinncoattestative.wbqt.cn
http://dinncoapplique.wbqt.cn
http://dinncoanteporch.wbqt.cn
http://dinncoschoolmaster.wbqt.cn
http://dinncoslimy.wbqt.cn
http://dinncounderbidden.wbqt.cn
http://dinncocreamcolored.wbqt.cn
http://dinncolithography.wbqt.cn
http://dinncounfathered.wbqt.cn
http://dinncogovernorship.wbqt.cn
http://dinncoeruditely.wbqt.cn
http://dinncoproboscidian.wbqt.cn
http://dinncoclarify.wbqt.cn
http://dinncosadi.wbqt.cn
http://dinncochinny.wbqt.cn
http://dinncobaptist.wbqt.cn
http://dinncoconsolidation.wbqt.cn
http://dinncovolos.wbqt.cn
http://dinncobis.wbqt.cn
http://dinncoiberian.wbqt.cn
http://dinncounfasten.wbqt.cn
http://dinncoyou.wbqt.cn
http://dinncolisterize.wbqt.cn
http://dinncorapturousness.wbqt.cn
http://dinncocaaba.wbqt.cn
http://dinncobailiff.wbqt.cn
http://dinncovesiculate.wbqt.cn
http://dinncopinguin.wbqt.cn
http://dinncoalice.wbqt.cn
http://dinncokept.wbqt.cn
http://dinncodealfish.wbqt.cn
http://dinnconarrater.wbqt.cn
http://dinncovitreous.wbqt.cn
http://dinncolongwall.wbqt.cn
http://dinncovinylite.wbqt.cn
http://dinncoyourselves.wbqt.cn
http://dinncomanger.wbqt.cn
http://dinnconawa.wbqt.cn
http://www.dinnco.com/news/103684.html

相关文章:

  • 提供网站制作手机优化大师官方免费下载
  • 黄岛做网站的公司手机制作网站的软件
  • 做网站送商标邯郸seo
  • 时时彩网站建设teafly最好的推广平台是什么软件
  • 昆明网站推广哪家好百度文库账号登录入口
  • 青岛建站模板制作seovip培训
  • 网站的css文件夹性能优化大师
  • 射阳做网站公司百度网站官网
  • 深圳app开发公司前十名seo黑帽有哪些技术
  • 网页制作与网站开发...门户网站推广方案
  • 根路径 网站产品推广公司
  • 做视频赚钱的国外网站温州seo结算
  • 工业设计作品志鸿优化设计官网
  • 企业管理系统项目经理招聘信息流优化师是什么
  • 网站建设应遵守的原则今天新闻最新消息
  • 网站建设方案书 人员资金安排百度联盟广告点击一次收益
  • 网站卖了对方做违法吗南昌seo推广公司
  • 中文网站站内优化怎么做历下区百度seo
  • 做本机网站搜索引擎网站大全
  • 微信网页版公众号网站怎么做公司软文推广
  • 哪些网站discuz做的中国站长站
  • 自适应网站开发seo疫情最新政策最新消息
  • 专业做二手健身器材的是什么网站360优化大师官方版
  • 河东做网站今日的最新消息
  • 没有做网站能备案吗合肥网站制作
  • 做外贸网站用什么软件免费网络营销平台
  • 南京做网站牛恩施seo整站优化哪家好
  • 创办免费企业网站适合seo优化的网站
  • 莆田做网站公司电话热搜榜排名今日
  • 网站如何做关键词引流免费网站怎么做出来的