As shown below
Of course, you can also add the pom file yourself, as follows
3. Add Configuration file
application.properties
4. Writing of JEDIS configuration class
Here is the creation of the core jedisCluster bean
5. Writing of general interfaces
After these blogs, you may also find many definitions of interfaces, and then It is implemented by different business classes. I have a deeper understanding of interface-oriented programming after experiencing a recent project. These are all learned from Brother Zhu and Brother Jun. The standards for code writing are, for a programmer, , the earlier you develop it, the better
6. Next is the implementation of the JEDIS interface
I will only write here Several basic core configurations, including some exception handling, are not posted here. Of course, the code will be given at the end of the article. Don’t worry.
7, Implementation of business DAO
Different businesses only need to inherit the above class
There is also only one set method written here
8. Unit test
#After the addition is completed, check and find that it has been generated.
The above is the detailed content of How to import the package where the scanner class is located in java. For more information, please follow other related articles on the PHP Chinese website!