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

Idea2019創(chuàng)建Springboot Web項(xiàng)目的方法步驟

 更新時(shí)間:2021年12月29日 09:47:23   作者:oneloser  
這篇文章主要介紹了Idea2019創(chuàng)建Springboot Web項(xiàng)目的方法步驟,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

1、Idea及Java版本:Idea2019.1 + jdk1.8

2、File > Peoject

3、Spring Initializr:

在這里插入圖片描述

在這里插入圖片描述

在這里插入圖片描述

在這里插入圖片描述

4、之后會(huì)自動(dòng)下載需要的相關(guān)文件

5、src > main > com.xxx.xxx下創(chuàng)建HelloController,內(nèi)容如下:

package com.weihua.xxx;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
   @RequestMapping(value = "/hello", method = RequestMethod.GET)
   public String helloWorld () {
      return "Hello World !";
   }
}

6、運(yùn)行XxxApplication,在瀏覽器窗口輸入http://localhost:8080/hello,頁面顯示:Hello World !

7、src > main > resources > static下存放靜態(tài)資源文件如html、js、css等。

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論