“Spring Boot 自动配置特性”的版本间的差异

来自姬鸿昌的知识库
跳到导航 跳到搜索
(建立内容为“https://www.bilibili.com/video/BV19K4y1L7MT/?p=7”的新页面)
 
第1行: 第1行:
 
https://www.bilibili.com/video/BV19K4y1L7MT/?p=7
 
https://www.bilibili.com/video/BV19K4y1L7MT/?p=7
 +
 +
=== 怎么自动配好 Tomcat的? ===
 +
 +
==== 怎么引入 tomcat 依赖的? ====
 +
boot-01-helloworld - pom.xml<syntaxhighlight lang="xml">
 +
    <dependencies>
 +
        <dependency>
 +
            <groupId>org.springframework.boot</groupId>
 +
            <artifactId>spring-boot-starter-web</artifactId>
 +
        </dependency>
 +
 +
    </dependencies>
 +
</syntaxhighlight>
 +
 +
 +
spring-boot-starter-web-x.x.x.RELEASE.pom<syntaxhighlight lang="xml">
 +
    <dependency>
 +
      <groupId>org.springframework.boot</groupId>
 +
      <artifactId>spring-boot-starter-tomcat</artifactId>
 +
      <version>2.3.4.RELEASE</version>
 +
      <scope>compile</scope>
 +
    </dependency>
 +
</syntaxhighlight>

2023年2月1日 (三) 09:37的版本

https://www.bilibili.com/video/BV19K4y1L7MT/?p=7

怎么自动配好 Tomcat的?

怎么引入 tomcat 依赖的?

boot-01-helloworld - pom.xml

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

    </dependencies>


spring-boot-starter-web-x.x.x.RELEASE.pom

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
      <version>2.3.4.RELEASE</version>
      <scope>compile</scope>
    </dependency>