Pre-requisite:
You can read & understand this series without type any code.
However, if you want to try the process out, you need to have a ZooKeeper up and running somewhere.
So you may find one or set up one.
Step 1 Create a new project in IDEA
File -> New -> Project Select to build with Maven Specify the information Click 'Finish' to create the project Open in a new windowStep 2 Create an service interface that exposes some thing
add a package enter name of the package Create a class inside the package Name it and select the type to be interface Expose an interfaceStep 3 Add an implementation for the service
We need to add an implementation for the service to do the real work.
Create a new class Name and select type Check the initial status after creation Make it to implement the service interface Select to implement the method automatically Confirm Add some simple output code
网友评论