ApiBoot is a landing solution for interface services. It provides a series of out-of-the-box components and simplifies the integration of mainstream third-party frameworks through encapsulation, thereby improving developer development efficiency, learning costs, lowering entry barriers, and truly realizing out-of-the-box functionality. Ready to use!!!
Developers with a simple understanding of SpringBoot can write safe and stable interface services, which can provide rich security interfaces for multiple endpoints such as mobile terminals and web pages.
ApiBoot depends on SpringBoot, and you can use ApiBoot to build independent Java applications.
For the use of components, please check the official reference documentation. To get started, please visit the first ApiBoot application.
If you are using Maven to build the project, you need to add the solidification dependency of ApiBoot to your pom.xml file, as shown below
Note: lastVersion needs to be replaced with the latest ApiBoot, please visit Dependencies-2. Get the latest ApiBoot dependencies to view.
After the dependencies are added, we can then add the ApiBoot components required in the project. The following is an example of using the distributed link component minbox-logging.
After adding the component, we can find the document of the corresponding component according to the official reference document for configuration and use.
The source code construction of ApiBoot uses multiple modules. Here is a quick overview
api-boot
The api-boot module is the root directory for compiling the entire project. The capabilities provided are as follows:
Provide unified revision configuration for the project
Provide public plug-ins (flatten, cobertura...) used when compiling the project
Provide the Maven warehouse configuration used when compiling the project
JDK compiled by unified project
api-boot-autoconfigure
api-boot-autoconfigure is the most important core module. It provides automatic configuration classes for all components. This is completely based on the conditional judgment annotations provided by SpringBoot. It is located in the resources/META-INF directory and also provides additional configuration parameters. Metadata definition content file: additional-spring-configuration-metadata.json. The banner output content we see when the project is enabled is also located in this module.
api-boot-dependencies
The function of this module is consistent with spring-boot-dependencies. They are all designed to solidify the dependency numbers used in the project, so that we can upgrade a certain dependency well when building the project, and no longer worry about the incompatibility between various dependencies. trouble.
api-boot-parent
This module inherits from api-boot-dependencies and can directly use the solidified dependencies. It is a unified parent dependency for building other modules.
api-boot-starters
This module defines the specific Starter dependencies used in the development process. The Starter dependencies do not contain any framework code, only one pom.xml file. The specific automated configuration implementation and specific integration of third parties are located at: api-boot- In the autoconfigure and api-boot-plugins modules.
The usage method is consistent with spring-boot-starter-xxx. For example: to integrate the current limiting component in the project, we only need to add the api-boot-starter-rate-limiter dependency in pom.xml. There is no need to add it because it has already been Dependencies are solidified through the api-boot-dependencies module.
api-boot-tools
This module will define some commonly used tool classes, such as ApplicationContext, BeanFactory, etc.
This module is also automatically configured by api-boot-autoconfigure, and some tool classes are automatically registered to the IOC.