Home > Back-end >  If based on according to the micro services, timing task by feign interface call wrong
If based on according to the micro services, timing task by feign interface call wrong

Time:05-27

If the project is based on in accordance with the micro service secondary development of the project, task by feign interface call regularly, then the following problems

Timing task the caller to fault

By the caller to fault


For bosses to help

CodePudding user response:

Blue tag class said your local error code entry, you can see in the past, and prompt information are given, saw is serialized related, you'll take a look at this

CodePudding user response:

Cannot be passed JSONr deserialization for int the ginseng is int not entity
Solution:
1 to pass parameters into the entity inside, and then obtained from the entities
2. The parameters that are directly related to the coming together in a path variable
3. Directly using the get method transfer
4. {" aa ", "" {{1}}} is in front of the parameter name, followed by the variable

The above four methods which can see

CodePudding user response:

refer to the second floor of dream in the wind Yang reply:
cannot be passed JSONr deserialization for int the ginseng is int not entity
Solution:
1 to pass parameters into the entity inside, and then obtained from the entities
2. The parameters that are directly related to the coming together in a path variable
3. Directly using the get method transfer
4. {" aa ", "" {{1}}} is in front of the parameter name, followed by the variable

The above four methods can see which


Call interface is no arguments
Feign interface
@ GetMapping (value="https://bbs.csdn.net/elevator/updateElevatorInspectionDate")
Public int updateElevatorInspectionDate ();

Call the interface of the
@ GetMapping ("/updateElevatorInspectionDate ")
Public AjaxResult updateElevatorInspectionDate () {
Return toAjax (lbcProjectElevatorService updateElevatorInspectionDate ());
}

CodePudding user response:

reference tip ice's reply: 3/f
Quote: refer to the second floor of dream in the wind Yang reply:
cannot be passed JSONr deserialization for int the ginseng is int not entity
Solution:
1 to pass parameters into the entity inside, and then obtained from the entities
2. The parameters that are directly related to the coming together in a path variable
3. Directly using the get method transfer
4. {" aa ", "" {{1}}} is in front of the parameter name, followed by the variable

The above four methods can see which


Call interface is no arguments
Feign interface
@ GetMapping (value="https://bbs.csdn.net/elevator/updateElevatorInspectionDate")
Public int updateElevatorInspectionDate ();

Call the interface of the
@ GetMapping ("/updateElevatorInspectionDate ")
Public AjaxResult updateElevatorInspectionDate () {
Return toAjax (lbcProjectElevatorService updateElevatorInspectionDate ());
}

You posted this int method, or yourself under the debug methods of the int you see down to the return value is an error, it ought to be you the int () method returns the value of the wrong kind
  • Related