After running the project main program class SpringBootApplication, when http://localhost:8080/hello
accessing, the following error is reported:
This application has no explicit mapping for /error, so you are seeing this as a fallback.
The reason for this error is that the location of the startup class is wrong: the
annotation added here will scan all the components in the package of the main configuration class (the class marked by SpringBootApplication) and all the subpackages below to the Spring container;
To place the main program class in the outer layer, the package and sub-package components can be scanned. After changing the location, start the access again:
success.