I recently read the code of the timed task framework, and I feel that some knowledge is quite useful. Record the learning experience.
1: The technical points involved
1) How to parse String bean.methodName(int a, String b) ?
a) Each value can be obtained by parsing returnType : String, beanName: bean ....
b) After Spring starts, you can get the ApplicationContext so you can get the class of the bean
c) Obtain the method according to the class of the bean and the parameter types of the method int and String
d) The method can be implemented by calling method.invoke() and passing in two values of a and b.
2) Of course, the timing task must have a flexible timing task framework, and quartz is selected in the project.
3) zookeeper does node control.
Two: the process of the system