Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Jun 08 16:22:51 CST 2021
There was an unexpected error (type=Not Found, status=404).
出现这个白页一般是请求是可以发送的但是请求不到东西。不同于下图,下图是完全没办法连接。
原因:controller类必须是Application的所在包的类或者子包的类。官网说明:程序只加载Application.java所在包及其子包下的内容。
解决方法:
1.先看看是不是Application 启动类的位置不对:
如图所示:
启动项一定要在最外层;
其他的一些报错:
Could not transfer artifact rg.springframework.boot:spring-boot-starter-parent:pom:2.5.0 from/to central
原因:seeting.xml位置出错,解决方法:重新配置一下即可。
end tag name </activeByDe> must match start tag name <activeByDefault> from line 265 (position: TEXT seen ...<activeByDefault>true</activeByDe ... @265:48) @ C:\Users\Oscar丶\.m2\settings.xml, line 265, column 48
expected = after attribute name (position: TEXT seen ...<properties>\r\n <maven. compiler .... @269:35) @ C:\Users\Oscar丶\.m2\settings.xml, line 269, column 35
原因:语法错误。解决方法:删空格
Some problems were encountered while building the effective settings
Unrecognised tag: 'blocked' (position: START_TAG seen ...</url>\r\n <blocked>... @165:16) @ C:\Users\Oscar丶\.m2\settings.xml, line 165, column 16
原因:语法错误。解决方法:删除 <blocked>true</blocked>
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project springboottest: Fatal error compiling
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboottest: There are test failures.
Please refer to C:\Users\Oscar丶\IdeaProjects\springboottest\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.