idea创建spring boot项目
2017-11-17 12:00
766 查看
1.打开idea,创建项目
2.选择Spring Initializr,next
3.输入Artifact,Next
4.勾选web(一般情况也就够用了)
5.点击finish
6.项目结构(可以删除”.mvn、mvnw、mvnw.cmd”文件)
7.写一个Hello word程序
不用修改生成的pom.xml文
8.运行程序(默认使用jetty启动)
9.运行结果
在浏览器地址栏输入地址:http://localhost:8080/hello
2.选择Spring Initializr,next
3.输入Artifact,Next
4.勾选web(一般情况也就够用了)
5.点击finish
6.项目结构(可以删除”.mvn、mvnw、mvnw.cmd”文件)
7.写一个Hello word程序
不用修改生成的pom.xml文
package com.example; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @Author: yf * @Date: 2017/11/17. */ @RestController public class HelloController { @RequestMapping("/hello") public String hello() { return "Hello, world!"; } }
8.运行程序(默认使用jetty启动)
9.运行结果
在浏览器地址栏输入地址:http://localhost:8080/hello
相关文章推荐
- IDEA创建基于springboot的多个module聚合项目,并生成war包
- 使用idea创建springboot项目并打成war包发布到weblogic上
- Idea创建spring boot项目
- idea快速创建maven集成spring-boot项目
- IDEA下创建Springboot,freemarker,mockserver,Gradle项目
- 使用idea+gradle创建springboot项目
- idea创建springboot项目图文教程(四)
- [置顶] idea创建springboot项目图文教程(配置文件)(五)
- 基于maven使用IDEA创建springboot多模块项目
- SpringBoot基础-在IDEA中创建跑得起来的Springboot项目
- IntelliJ IDEA工具创建入门的springBoot项目
- idea创建spring boot+mybatis(oracle)+themeleaf项目
- 使用IDEA创建SpringBoot项目的方法步骤
- IDEA下gradle创建springboot项目
- 使用idea创建springboot项目并打成war包发布到weblogic上
- idea 下gradle创建springboot 项目
- IDEA(1)-创建spring boot 的Hello World 项目
- 使用idea创建SpringBoot项目
- 在idea中创建SpringBoot项目
- 使用IDEA+GRADLE创建springboot项目