Failed to handle request [GET http://127.0.0.1:8080/greeting]: Response status 404
RothAndrew opened this issue · comments
I get this error when running the "complete" version of this getting started guide when I type in "http://localhost:8080/greeting" into my browser.
JDK: v1.8.0_162
Spring Tool Suite: v3.9.3.RELEASE
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.0.RELEASE)
2018-03-22 11:45:36.652 INFO 14316 --- [ main] hello.Application : Starting Application on BWT5T52 with PID 14316 (C:\Users\rothandr\Documents\workspace-sts-3.9.2.RELEASE\gs-reactive-rest-service-complete\bin\main started by rothandr in C:\Users\rothandr\Documents\workspace-sts-3.9.2.RELEASE\gs-reactive-rest-service-complete)
2018-03-22 11:45:36.655 INFO 14316 --- [ main] hello.Application : No active profile set, falling back to default profiles: default
2018-03-22 11:45:36.697 INFO 14316 --- [ main] onfigReactiveWebServerApplicationContext : Refreshing org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext@4f638935: startup date [Thu Mar 22 11:45:36 EDT 2018]; root of context hierarchy
2018-03-22 11:45:37.668 INFO 14316 --- [ main] o.s.w.r.f.s.s.RouterFunctionMapping : Mapped ((GET && /hello) && Accept: [text/plain]) -> hello.GreetingRouter$$Lambda$211/977160959@36f48b4
2018-03-22 11:45:37.681 INFO 14316 --- [ main] o.s.w.r.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.reactive.resource.ResourceWebHandler]
2018-03-22 11:45:37.681 INFO 14316 --- [ main] o.s.w.r.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.reactive.resource.ResourceWebHandler]
2018-03-22 11:45:37.749 INFO 14316 --- [ main] o.s.w.r.r.m.a.ControllerMethodResolver : Looking for @ControllerAdvice: org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext@4f638935: startup date [Thu Mar 22 11:45:36 EDT 2018]; root of context hierarchy
2018-03-22 11:45:38.150 INFO 14316 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-03-22 11:45:38.603 INFO 14316 --- [ctor-http-nio-1] r.ipc.netty.tcp.BlockingNettyContext : Started HttpServer on /0:0:0:0:0:0:0:0:8080
2018-03-22 11:45:38.604 INFO 14316 --- [ main] o.s.b.web.embedded.netty.NettyWebServer : Netty started on port(s): 8080
2018-03-22 11:45:38.607 INFO 14316 --- [ main] hello.Application : Started Application in 2.243 seconds (JVM running for 3.078)
>> result = Hello, Spring!
2018-03-22 11:45:56.926 WARN 14316 --- [ctor-http-nio-7] .a.w.r.e.DefaultErrorWebExceptionHandler : Failed to handle request [GET http://127.0.0.1:8080/greeting]: Response status 404
2018-03-22 11:45:56.962 WARN 14316 --- [ctor-http-nio-7] .a.w.r.e.DefaultErrorWebExceptionHandler : Failed to handle request [GET http://127.0.0.1:8080/favicon.ico]: Response status 404
The README says http://localhost:8080/hello . That should work, right?
Ah. There were 2 URLs in the README. One of them was wrong (fixed it).
/hello worked. The documentation is wrong. It clearly says /greeting