SpringBoot的初始配置
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
配置介绍:
parent:引入父项目,是springboot的版本仲裁中心
dependcy:web模块的场景启动器
plugin:制作exe文件的插件
所用注释:
@SpringBootApplication:标注主程序
@RequestMapping("/hello")//获取浏览器hello请求
@ResponseBody//回答
注意点:
1.主程序要放在根目录下
2.localhost:8080的冒号要是英文的
体会:
不用部署tomcat真的简单