github-java-client icon indicating copy to clipboard operation
github-java-client copied to clipboard

Feat: Add Spring Boot AutoConfiguration

Open vitinh0z opened this issue 1 month ago • 0 comments

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 GithubClientAutoConfiguration to conditionally register the GithubApiModule bean.
  • Registered the configuration in META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports.
  • Added GithubClientAutoConfigurationTest using ApplicationContextRunner to verify the behavior.

Verification

  • Ran mvn clean install -DskipTests locally -> BUILD SUCCESS.
  • Ran mvn test locally -> All tests passed.

vitinh0z avatar Dec 17 '25 14:12 vitinh0z