Spring Boot 2 0 0 M3使用案例,案例配置,常用命令,注解介绍,热部署

这篇博客介绍了Spring Boot 2.0.0 M3的系统需求,包括Java 8和Spring 5.0.0.RC3的版本要求。通过创建新项目、编写pom文件和Example代码,展示了Spring Boot的基本用法。详细讲解了@SpringBootApplication注解的作用,并提到了带有远程调试支持的应用打包和运行。此外,还讨论了SpringBoot的热部署配置,以及如何禁用自动重启以进行更精确的调试。
摘要由CSDN通过智能技术生成

首先给大家分享一个巨牛巨牛的人工智能教程,是我无意中发现的。教程不仅零基础,通俗易懂,而且非常风趣幽默,还时不时有内涵段子,像看小说一样,哈哈~我正在学习中,觉得太牛了,所以分享给大家!点这里可以跳转到教程

                    

以下内容是从SpringBoot官网中学到:
https://docs.spring.io/spring-boot/docs/2.0.0.M3/reference/htmlsingle/#boot-features-spring-application

1.系统需求

Spring Boot 2.0.0.M3需要Java8 和 Spring 5.0.0.RC3或者更高版本。指定的支持的编译工具是Maven 3.2+和Gradle 3(3.4 或 更高版本)

2.创建一个新项目

mvn archetype:generate -DgroupId=com.example -DartifactId=myproject -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
  
  
  
  • 1

最终生成的项目结构如下:
这里写图片描述

3.编写一个简单的pom文件

<?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>  <groupId>com.example</groupId>  <artifactId>myproject</artifactId>  <version>0.0.1-SNAPSHOT</version>  <!-- Inherit defaults from Spring Boot -->  <parent>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-parent</artifactId>    <version>2.0.0.M3</version>  </parent>  <!-- Add typical dependencies for a web application -->  <dependencies>    <dependency>      <groupId>org.springframework.boot</groupId>      <artifactId>spring-boot-starter-web</artifactId>    </dependency>  </dependencies>  <!-- Package as an executable jar :为了创建一个可执行的jar,需要添加spring-boot-maven-plugin到我们的pom文件-->  <build>    <plugins>      <plugin>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-maven-plugin</artifactId>      </plugin
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值