zoukankan      html  css  js  c++  java
  • springboot 框架

    一、pom文件

    1. 父项目
      1 <parent>
      2         <groupId>org.springframework.boot</groupId>
      3         <artifactId>spring-boot-starter-parent</artifactId>
      4         <version>2.2.4.RELEASE</version>
      5         <relativePath/> <!-- lookup parent from repository -->
      6 </parent>

      他的父项目是:

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

      用来真正管理Spring Boot应用里面的所有依赖版本

      所以这个父项目相当于“Spring Boot的版本控制中心”,即导入依赖时无需写版本号                                                                                                                     备注:没有在spring-boot-dependencies 里面管理的依赖仍需要声明版本号                     

    2. 导入的依赖
      1   <dependency>
      2         <groupId>org.springframework.boot</groupId>
      3         <artifactId>spring-boot-starter-web</artifactId>
      4   </dependency>

      spring-boot-starter:spring-boot场景启动器,导入了web模块正常运行所依赖的组建

      Spring Boot将所有的功能场景抽取出来,做成一个个的starters(启动器),只需要在项目里面引入这些 starter,相关场景所有依赖都会导入进来,需要用什么功能,就导入什么场景启动器即可。

      具体场景启动器可参照Spring Boot官网
  • 相关阅读:
    菜鸟打印模板
    centos8安装nginx1.9.1
    centos8安装tomcat8.5
    构建微信公众号服务实例和小程序服务实例
    wxMpMenuService.menuGet()和wxMpMenuService.getSelfMenuInfo()返回值对比
    spring cloud 实现基于Nacos权重的负载均衡
    go开发环境搭建
    国内公共的DNS服务&Centos7 配置公共DNS服务
    Redis
    Spring Boot 集成 PageHelper
  • 原文地址:https://www.cnblogs.com/mysummary/p/12238054.html
Copyright © 2011-2022 走看看