赞
踩
springboot应该是在spring体系基础上发展起来的,使用springboot,可以快速构建开发项目,并快速集成相关组件(很多开源的组件都有springboot的实现了),有人说它的设计理念为约定大于配置,就是好比说在springboot中集成了web模块,那么不用自己配置,默认的配置就是自带springmvc+注解等常用功能。
springboot也把不同的功能模块化了,比如mybaitis模块,jpa模块等等,在搭建项目开始,通过maven引入相关的模块即可完成快速搭建框架。
下面从最简单的开始,创建一个springboot应用并跑起来。
一、单纯springboot应用
打开:https://start.spring.io/,直接点击完成,下载project到本地。
看下项目maven的pom.xml配置
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.5.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>demo</artifactId> <version>0.0.1-SNAPSHOT</version> <name>demo</name> <description>Demo project for Spring Boot</description> <properties>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。