Home > Back-end >  Quartz calls the service implementation class
Quartz calls the service implementation class

Time:09-16




Want to designed as shown in figure task management regularly, but don't know how should Taiwan before and after passing parameters, such as the new timing task background get parameters: the service name, method name, how to realize the dynamic invocation through an interface of different service and methods?

CodePudding user response:

If you are no arguments, to be also can realize,
Quart executeInternal scheduling class method () implementation: based on the service name for the bean in the spring, reflection method is called

CodePudding user response:

Quartz provides programmatic implementation, can dynamically add tasks, as for the associated class implements, if it is a common class, use the launch instantiated, attribute set, etc.; If it is Spring managed beans, by the Spring container factory get Bean instance, and then through the launch set properties, etc.
  • Related