springboot-

导入springboot-依赖

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>

简化部署:
导入
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
将项目打成jar包,doc窗口运行 java -jar

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath>../../spring-boot-dependencies</relativePath>
控制着个jar包的版本号


spring-boot将所有的场景抽取出来,做成一个starter启动器,只需要在项目中引入相应的spring-boot-starter
比如:spring-boot-starter-web
 






猜你喜欢

转载自www.cnblogs.com/zj-xu/p/12148354.html