This repository contains a Spring Boot library for API monitoring.
- Java 8
- Spring Boot 2.7.0
❗ Compatible with Spring Boot version 2.x and 3.x and Java 8+
To build the library locally, run the following command:
mvn clean package -Drevision='1.0.0' -f pom.xmlTo deploy the library to a central repository, use the following command:
mvn clean deploy -Drevision='1.0.0' -f pom.xmlTo use the library in another Spring Boot project, follow these steps:
-
Add the library as a dependency in your
pom.xmlfile: > 💡 Note: The dependency can be found on Maven Central. Visit Maven Central Repository to get the latest version and dependency snippet.<dependency> <groupId>com.devzery</groupId> <artifactId>middleware</artifactId> <version>1.0.0</version> </dependency>
-
Configure the library in your Spring Boot application:
import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; **`import com.devzery.middleware.MiddlewareEnabled;`** @SpringBootApplication @MiddlewareEnabled(apiKey = "YOUR_API_KEY", serverName = "YOUR_SERVER_URL") public class AppApplication { public static void main(String[] args) { SpringApplication.run(AppApplication.class, args); } }
💡 Important Notes for Contributors:
- Do not modify version numbers in
pom.xml - Versioning is automatically handled by GitHub Actions
Follow these conventions for commit messages:
✅ Acceptable Formats:
patch: fix API response handling
minor: add new feature
❌ Unacceptable Formats:
Updated code
Bumped version in pom.xml
For detailed commit message rules, check husky -> commit-msg in the project.