Nach der Suche nach allen Fragen gibt es keine eindeutige Antwort auf diese Frage. Ich möchte keine anderen Anmerkungen verwenden.
Code: Select all
@RestController
@RequestMapping("/api")
public class PlugController {
@PostMapping(value = "/command/{cmd}")
public String command(@PathVariable(value = "cmd") String command) {
return command;
}
}
Code: Select all
http://localhost:8080/api/command/on
Code: Select all
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
There was an unexpected error (type=Method Not Allowed, status=405).