This application has no explicit mapping for /error, so you are seeing this as a fallback.

对于初学者springboot报错,一般有以下原因。

1,你的application启动类的位置不对,已经application启动类放在目录的最外层。如图 我的MainApplication就在com.it包下,即最外层,所以它可以包含你所有的文件。

This application has no explicit mapping for /error, so you are seeing this as a fallback.

 2要是用正确的注解,如下如果我想要在页面显示hello,spring boot2!,我的所在类所加注解为@RestController,我的映射方法注释为@RequestMapping

This application has no explicit mapping for /error, so you are seeing this as a fallback.

 

 

 

上一篇:C++中的explicit


下一篇:ABAQUS/Explicit质量缩放(Massscaling)的使用心得