github-java-client
github-java-client copied to clipboard
Feat: Add Spring Boot AutoConfiguration
Description
This PR introduces Spring Boot AutoConfiguration to the library.
It automatically registers the GithubApiModule bean when the library is used in a Spring Boot application that has Jackson on the classpath.
Resolves
Closes #61
Changes
- Added optional dependencies for
spring-boot-autoconfigure(v2.7.18 for Java 11 compatibility). - Added
GithubClientAutoConfigurationto conditionally register theGithubApiModulebean. - Registered the configuration in
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports. - Added
GithubClientAutoConfigurationTestusingApplicationContextRunnerto verify the behavior.
Verification
- Ran
mvn clean install -DskipTestslocally -> BUILD SUCCESS. - Ran
mvn testlocally -> All tests passed.