从头撸springboot(一)
刚开始工作,感觉springboot基础不牢靠,决定从头撸一遍springboot
- 全教程:https://www.zhihu.com/question/53729800
- 今日工作:https://blog.didispace.com/spring-boot-learning-1/
1)新建一个项目

注:
1. 新建springboot项目,不是maven项目
2. java版本不高于project sdk
3. spring-boot-starter-parent版本可能有问题,更换为1.5.19.RELEASE
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.19.RELEASE</version>
</parent>
2)编写pom.xml
<!--引入相关依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
3)编写controller,访问http://localhost:8080/hello


访问成功!
3)编写test
注:新版本的SpringBoot已不支持@SpringApplicationConfiguration,改为@SpringBootTest
至此,第一部分结束orz