欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Intellij IDEA創(chuàng)建spring-boot項(xiàng)目的圖文教程

 更新時(shí)間:2018年01月21日 15:35:01   作者:回憶成長(zhǎng)  
本文通過圖文并茂的形式給大家介紹了Intellij IDEA創(chuàng)建spring-boot項(xiàng)目的教程,本文給大家介紹的非常詳細(xì),具有參考借鑒價(jià)值,需要的朋友參考下吧

開發(fā)環(huán)境:

  • jdk版本:JDK8 
  • maven版本:maven-3.5.2  
  • 開發(fā)工具:Itellij IDEA 2017.1

前提條件:已安裝以上軟件并配置好jdk和maven的環(huán)境變量

創(chuàng)建步驟:

點(diǎn)擊坐上角file ---》選擇new ---》點(diǎn)擊project... 如下圖所示:


點(diǎn)擊左邊Spring Initializr ---》 右上角新建jdk(若有則不需要) ---》 點(diǎn)擊next 如下圖所示:

看需求修改下圖中的信息后點(diǎn)擊next(可以直接使用默認(rèn))

點(diǎn)擊左邊的Web ---》 選中中間列的Web ---》 點(diǎn)擊next 如下圖所示:

輸入項(xiàng)目名稱和保存路徑 --- 》點(diǎn)擊finish

創(chuàng)建的項(xiàng)目如下圖所示:

創(chuàng)建HelloController類,代碼如下所示:

package com.example.demo.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/hello")
public class HelloController {
 @RequestMapping("/say")
 public String sayHello() {
  return "hello world";
 }
}

執(zhí)行DemoApplication中main方法后訪問http://localhost:8080/hello/say 頁面如下所示:

總結(jié)

以上所述是小編給大家介紹的Intellij IDEA創(chuàng)建spring-boot項(xiàng)目的圖文教程,希望對(duì)大家有所幫助,如果大家有任何疑問歡迎給我留言,小編會(huì)及時(shí)回復(fù)大家的!

相關(guān)文章

最新評(píng)論