Novice Whitelabel Error encountered Page Solutions
Code:
package com.example.demo.web;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@RequestMapping("/hello")
public String hello() {
return "Hello Spring Boot!";
}
}
Access localhost: 8080 / hello
Cause: The only load the contents of the package and its sub packages where Application.java
The web package to move to the above location, visit again
success!