创建一个web项目 点击左上角file–new–project,创建一个spring initializr,在custom选项输入如图所示 等待下载。 下载完毕后开始编写代码。 右击创建一个controller类,输入以下代码 点击run,打开浏览器,输入地址http://localhost:8080/hello进去后便可以看到想要输出的结果。