Skip to content

register bridge-forge-connect via AutoConfiguration.imports#18

Merged
vzakharchenko merged 2 commits into
mainfrom
feat/forge-bridge-autoconfig-imports
May 20, 2026
Merged

register bridge-forge-connect via AutoConfiguration.imports#18
vzakharchenko merged 2 commits into
mainfrom
feat/forge-bridge-autoconfig-imports

Conversation

@vzakharchenko
Copy link
Copy Markdown
Member

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.

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>
@vzakharchenko vzakharchenko enabled auto-merge May 20, 2026 18:28
@sonarqubecloud
Copy link
Copy Markdown

@qltysh
Copy link
Copy Markdown

qltysh Bot commented May 20, 2026

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@vzakharchenko vzakharchenko merged commit 18ac3a5 into main May 20, 2026
10 checks passed
@vzakharchenko vzakharchenko deleted the feat/forge-bridge-autoconfig-imports branch May 20, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant