我有一个资源JAX-RS
@Path("/profile")
public class ProfileResource {
@GET
@Path(value = "/{username}")
public Response getProfile(
@PathParam("username") String username,
@Context UriInfo uriInfo
) throws URISyntaxException {
....
}
}
2017-07-29 20:37:41.940 DEBUG 4004 --- [nio-8080-exec-5] o.s.web.servlet.DispatcherServlet : Successfully completed request
2017-07-29 20:38:01.223 DEBUG 4004 --- [nio-8080-exec-7] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/profile/jonki]
2017-07-29 20:38:01.236 DEBUG 4004 --- [nio-8080-exec-7] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /profile/jonki
2017-07-29 20:38:01.236 DEBUG 4004 --- [nio-8080-exec-7] s.w.s.m.m.a.RequestMappingHandlerMapping : Did not find handler method for [/profile/jonki]
2017-07-29 20:38:01.237 DEBUG 4004 --- [nio-8080-exec-7] o.s.w.s.handler.SimpleUrlHandlerMapping : Matching patterns for request [/profile/jonki] are [/**]
2017-07-29 20:38:01.237 DEBUG 4004 --- [nio-8080-exec-7] o.s.w.s.handler.SimpleUrlHandlerMapping : URI Template variables for request [/profile/jonki] are {}
2017-07-29 20:38:01.237 DEBUG 4004 --- [nio-8080-exec-7] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapping [/profile/jonki] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@36463b09]]] and 1 interceptor
2017-07-29 20:38:01.237 DEBUG 4004 --- [nio-8080-exec-7] o.s.web.servlet.DispatcherServlet : Last-Modified value for [/profile/jonki] is: -1
2017-07-29 20:38:01.238 DEBUG 4004 --- [nio-8080-exec-7] o.s.web.servlet.DispatcherServlet : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-07-29 20:38:01.238 DEBUG 4004 --- [nio-8080-exec-7] o.s.web.servlet.DispatcherServlet : Successfully completed request
2017-07-29 20:38:01.238 DEBUG 4004 --- [nio-8080-exec-7] o.s.web.servlet.DispatcherServlet : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/error]
2017-07-29 20:38:01.239 DEBUG 4004 --- [nio-8080-exec-7] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /error
我找不到JAX-RS的方法。我正在使用Spring Boot并且没有进行任何配置。