2

I am exposing a rest end point using Spring with a request header. Here is the method definition:

import org.springframework.web.bind.annotation.RequestHeader;

    public User createUser(@RequestHeader("system_id") String system_id, User userRequest) throws Exception

However when I use postman to send request I receive:

org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization.
[[FATAL] No injection source found for a parameter of type public User com.java.api.createUser

Any ideas on what I am missing? Thanks!

UPDATE

When I have either the system_id or userRequest as the only parameter it works. When they are both included in the parameters they throw the error.

RyanCW
  • 1,012
  • 2
  • 10
  • 23

0 Answers0