IDEA更改工作空間及建立SpringBoot專案
阿新 • • 發佈:2019-01-28
IDEA建立工作空間及SpringBoot專案(更改工作空間在最底下):
1、如果是第一次進入IDEA,在這個頁面選擇create new project;
然後就是選擇工作空間的位置和命名
2、切記:
1)IDEA裡的project相當於eclipse的wordspace
2)IDEA裡的model 相當於eclipse的project
所以在第一步完成之後就是建立New Modle,即想建立的專案。以後想建立新的專案,直接在Project Structure新增新Modle即可。
3、選擇Spring Initialize(開始建立SpingBoot專案)
1) Group 、Package中填總包名的字首,如com.fxy
2) Artifact 中填專案名
使用start.spring.io建立springboot專案方法:點選開啟連結
4、暫時只選web
然後就是專案位置存放了
5、測試專案是否配置成功,新增一個class,執行
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloController { @RequestMapping("/hello") public String hello() { return "hello,this is a springboot demo"; } }