springboot的场景启动器

springboot的优势便是封装了多个模块。在应用开发过程中,我们只需要根据需求引入相应的场景启动器即可。spring boot会自动进行配置。

下面是一些常用的场景启动器:

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

<parent>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-parent</artifactId>
   <version>2.1.4.RELEASE</version>
   <relativePath/> 
</parent>

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

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

2. spring-boot-starter-web

<dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
   </dependency>

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

3. spring-boot-starter-test

 <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
   </dependency>

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

4.mybatis-spring-boot-starter

  <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>1.3.2</version>
  	  </dependency>

MyBatis-Spring-Boot-Starter类似一个中间件,链接Spring Boot和MyBatis,构建基于Spring Boot的MyBatis应用程序。

5. mysql-connector-java:

 <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

mysql-connector-java 是MySQL的JDBC驱动包,用JDBC连接MySQL数据库时必须使用该jar包。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值