IDE下spring boot hello world项目创建

1. File--New--Project--spring Initializr

        IDE下spring boot hello world项目创建


2. 下一步创建

    IDE下spring boot hello world项目创建

 

3. 下一步选择spring boot版本 ,且选择依赖web

        IDE下spring boot hello world项目创建


4.  下一步填写项目名称,及存放路径

        IDE下spring boot hello world项目创建


5.  下一步,生成的工程把三个多余的文件删除


    

IDE下spring boot hello world项目创建


6. 创建HelloController类,并运行

    如果无法创建类,在Event Log 把工程添加maven 工程

    IDE下spring boot hello world项目创建


创建HelloController类

IDE下spring boot hello world项目创建

@EnableAutoConfiguration 表示自动配置,根据当前引入的JAR进行自动配置

SpringApplication.run 运行spring 应用程序

右击HelloController类 ,选择Run --HelloController 进行编译部署,在浏览器调用并成功看到返回值

IDE下spring boot hello world项目创建