参考地址: https://blog.csdn.net/sinat_14982831/article/details/75126936
注意事项:
下载demo的时候,一定要在网站上加入web模块,如果不加的话,启动spring-boot的时候,不会自动启动内置的tomcat的;
如果忘记加的话怎么办?
如果忘记加的话,也可以在maven里面加上依赖,在pom.xml 里面加上
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>