最近在系统性学习spring boot,边学边动手写写小程序,话说第一个程序还真碰到不少问题。
第一步:创建一个SpringBoot 工程,工程结构如下:
第二步:写第一个spring boot程序,按照程序员的命令习惯,第一个程序都会叫XXX helloworld,这里也不例外,第一个spring boot程序就叫HelloWorldController,代码也比较简单
将工程跑起来之后,在浏览器访问http://localhost:8080/helloWorld/index
得到的结果
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Aug 21 22:16:56 CST 2019
There was an unexpected error (type=Not Found, status=404).
No message available