SpringBoot

介绍

目的:简化SSM开发,很多事情框架自动做,让开发者更关注代码逻辑
spring缺点:

  1. 以来设计繁琐
  2. 配置繁琐
    springboot优点:
  3. 简化依赖配置
  4. 自带服务器

搭建步骤:

  1. 创建一个空的项目
    image

image
image
确定maven
pom文件添加

<!-- springboot版本 -->
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.8.RELEASE</version>
	</parent>
	
	<dependencies>
		<!-- web项目必须引入的依赖 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<!-- 单元测试依赖 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

image

posted @ 2023-02-23 20:26  不再犹豫27  阅读(13)  评论(0)    收藏  举报