当前位置:   article > 正文

springboot之核心依赖spring-boot-starter,spring-boot-starter-parent,spring-boot-starter-web依赖解析_spring-boot-starter和spring-boot-starter-web

spring-boot-starter和spring-boot-starter-web

参考:https://blog.csdn.net/zhou920786312/article/details/84324915

https://blog.csdn.net/tr1912/article/details/79217132

spring-boot-starter:spring-boot场景启动器,后面跟的单词就是场景,比如说后面跟web,就是导入web场景的所有依赖。

1. spring-boot-starter-parent(控制版本信息)

  1. <parent>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-parent</artifactId>
  4. <version>2.1.4.RELEASE</version>
  5. <relativePath/>
  6. </parent>

Spring Boot的版本仲裁中心,控制了所有依赖的版本号,

好处:以后我们导入依赖默认是不需要写版本;

2.spring-boot-starter

Spring Boot的核心启动器,包含了自动配置、日志和YAML

3. spring-boot-starter-web

web的场景,自动帮我们引入了web模块开发需要的相关jar包

4. spring-boot-starter-test

springboot程序测试依赖,如果是自动创建项目默认添加

一个正常springboot项目启动,依赖的基础包:

  1. <dependencies>
  2. <!--springboot程序测试依赖,如果是自动创建项目默认添加-->
  3. <dependency>
  4. <groupId>org.springframework.boot</groupId>
  5. <artifactId>spring-boot-starter-test</artifactId>
  6. <scope>test</scope>
  7. </dependency>
  8. <!--springboot web模块支持,自动帮我们引入了web模块开发需要的相关jar包-->
  9. <dependency>
  10. <groupId>org.springframework.boot</groupId>
  11. <artifactId>spring-boot-starter-web</artifactId>
  12. </dependency>
  13. </dependencies>

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/813171
推荐阅读
相关标签
  

闽ICP备14008679号