Spring не видит настроенный mapping
Настраиваю мини сервис на спринге. Имеются следующие классы:
package server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class);
}
}
Затем
package server;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.UUID;
@RestController
public class RestApiController {
public static class RequestHash{
private UUID hash;
public UUID getHash() {
return hash;
}
public void setHash(UUID hash) {
this.hash = hash;
}
@RequestMapping(
value = "/add",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
public RequestHash restMethod(String name){
RequestHash requestHash = new RequestHash();
requestHash.setHash(UUID.randomUUID());
return requestHash;
}
}
}
При входе на страницу localhost:8080/add, выпадает ошибка "This application has no explicit mapping for /error, so you are seeing this as a fallback." Почему так и как это можно исправить. Вчера почему то все работало.