本小白从搭建环境开始。
1.安装Intellij idea
一定要安装ultimate版本,community版本是没有spring的(据说可以安装spring assistant来代替,效果未知)
自行查找注册码
记得安装JDK和JRE
在file-setting-plugins里面勾选Spring boot(如果已经勾选了,也要重新勾选一次),然后重启idea
2.新建项目
https://www.cnblogs.com/peterxiao/p/7779188.html
在这里,如果出现Error:(5, 47) java: 程序包org.springframework.web.bind.annotation不存在,等错误,需要加上一个dependency,如下:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.1.6.RELEASE</version>
</dependency>