register bridge-forge-connect via AutoConfiguration.imports#18
Merged
Conversation
Move bridge-forge-connect off the legacy "consumers must @componentscan the bridge package" pattern onto Spring Boot 3's standard auto-config discovery mechanism. The library now self-registers when its jar is on the classpath; consumer apps need a plain @SpringBootApplication. Library: - Add META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports listing both AtlassianConnectForgeAutoConfiguration and AtlassianConnectForgeJpaAutoConfiguration. - Switch both classes from @configuration to @autoConfiguration; the hybrid one runs @AutoConfigureAfter Connect's autoconfig so its beans see a fully initialised Connect context. - Exclude both auto-config classes from the bridge.forge @componentscan via excludeFilters; that prevents duplicate bean registration if a downstream app still adds @componentscan on the same package. - Add AtlassianConnectForgeAutoConfigurationImportsTest as a guard rail against accidental deletion or class renames in the imports file. Sample: - forge-connect/AddonApplication is now just @SpringBootApplication — no @componentscan, @autoConfiguration, or @EnableRetry on the user side; everything propagates from the bridge's auto-config. - Bump <atlassian-runtime-bridge.version> to 1.0.2-SNAPSHOT (the 1.0.1 Maven Central pin is kept in a commented-out line) so the sample exercises the new auto-config before the next Central release; bump back to a released coordinate once 1.0.2 ships. - Add frontend/.ncurc.json with React + @types/react on the ncu reject list so dependency-autoupdate runs do not drag React majors into unrelated PRs. README: - Tighten the lead to a one-line value statement + a "what are you building → which artifact / sample module" table. - Add two step-by-step migration guides — Connect → Forge Remote (tenant keys, dependency swap, two-bundle frontend, manifest swap, cutover) and Forge Remote → Containers (storage swap, bridge swap, manifest + image deploy). - Refresh the Library reference section to describe the new AutoConfiguration.imports activation; drop the "anchor the ComponentScan on AtlassianConnectForgeAutoConfiguration" requirement. - Update the runtime-comparison row "Spring registration" for the hybrid module to "Boot AutoConfiguration.imports". - Remove the now-redundant trailing "Example project" section (the same info already appears in the lead table) and fix a stray `/|` typo in the bridge.container.security.public-paths row. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Move bridge-forge-connect off the legacy "consumers must @componentscan the bridge package" pattern onto Spring Boot 3's standard auto-config discovery mechanism. The library now self-registers when its jar is on the classpath; consumer apps need a plain @SpringBootApplication.
Library:
Sample:
README:
/|typo in the bridge.container.security.public-paths row.