The invention relates to the technical field of
cloud computing, in particular to a micro-
service framework implementation method based on annotations. The method comprises the steps of service providing and service calling. The service providing is realized by a
service provider and specifically comprises the following steps: defining a service interface class, annotating a service definition
annotation, automatically discovering the defined interface class during starting, automatically creating a remote service object and registering the remote service object to a service center; The service calling is realized by a service caller, and specifically comprises the following steps: automatically discovering a service interface class defined by a
service provider, creating an agent implementation class to obtain a remote service, injecting the service interface class to obtain a service agent implementation class object, then directly calling an agent implementation class object methodto realize calling of a remote service method, and returning a result. According to the micro-
service framework provided by the invention,
business development does not need to pay attention to a micro-
service implementation method and principle for use, and a specific implementation method of freely forming various deployment schemes without modifying codes and freely modifying a framework
service protocol can be realized; And the method is suitable for various different scales or types of applications.