Home > Back-end >  Have bosses know why use openfeign, controller into service when the org. Quartz. ObjectAlreadyExist
Have bosses know why use openfeign, controller into service when the org. Quartz. ObjectAlreadyExist

Time:11-27

Background: items used in the distributed technology is springcloud nacos openfeign, useful to the timer function, if the controller, if you remove the @ autoware annotation is not an error


Below is the error content

CodePudding user response:

Error reason is that there is a DEFAULT. 2 id in the work, or you repeat, or cache that you don't have to delete, cause before the task is still there, can't start again

CodePudding user response:

Didn't understand your usage, you use the Feign why is remote calls this service, why not call the controller, the controller in the call this service
This call is its controller, the controller to the service, you do like this way because it is Feign already calls to the service, so will quote already exists, can no longer for injection,

CodePudding user response:

No remote call service, probably the first two screenshots on a wrong and the service is injected in the controller, remote call when in service

CodePudding user response:

There is also a situation, if with ribbon way call, no error, is will feign in the operation of the timer invokes the timer framework joint my timer shall be launched?

CodePudding user response:

reference 3 floor deep blue style _ reply:
no remote call service, probably the first two screenshots on a wrong and the service is injected in the controller, when the remote call is realized in the service of
you put the remote invocation interface name change a try, don't like service naming, it feels not so good

CodePudding user response:

references 4 floor deep blue style _ reply:
there is a case, if for ribbon way call, no error, is will feign in the operation of the timer invokes the timer framework joint my timer shall be launched?
ribbon is doing load balancing, the timer is certainly not, because I did a project is to make the timer

CodePudding user response:

This service also christened really doesn't matter, each time you start will quote a wrong, and when she first visit will be submitted to the time, does not affect other function, it is possible that nacos regularly sends a heartbeat conflict, I guess

CodePudding user response:

Don't know the solution to the problem that the

CodePudding user response:

You comments of the service code whether there is a call of quartz code, seems to be already had, you then code to call the create job after injection, you go to check the code, breakpoints, and see if it is repeated calls, or make a judgment whether already exists, if already exists, or delete, or skip it

CodePudding user response:

My code without the content of the timer, the reported error when starting, and call the method that the project for the first time will report a times, in all strange
  • Related