快速构建SpringBoot项目的两种方发
一、 通过 http://start.spring.io/ 在线构建
二、 通过IntelliJ IDEA 快速构建
通过 http://start.spring.io/ 在线构建
maven创建java项目,选择group,artifact,dependencies 之后 点击 Generate Project ,会下载下来一个 压缩包,
解压之后,通过IDE 打开 ,按需配置开发。
这个在上一篇文章中已经用过,不再详细叙述。
通过IntelliJ IDEA 快速构建
Springboot教程、
我们这里选择Web 依赖,其它需要可根据自身需要进行选择
点击Next 选择保存位置,打开,,, 目录结构大致是这
Spring Framework。然后我们新建SampleController ,写一个 Hello World
package com.zyzx.sample1;import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;@RestController
public class SimpleController {@RequestMapping("/test")public String test(){return "hello world";}}
启动运行并测试
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态