Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

エントリーポイントに@ComponentScanを付与する必要があることをガイドに追記する #1866

Open
kenjiyoshid-a opened this issue Jan 17, 2025 · 0 comments
Labels
target: ガイド/AP開発手順 ドキュメントのガイド/アプリケーション開発手順に関係がある

Comments

@kenjiyoshid-a
Copy link
Contributor

kenjiyoshid-a commented Jan 17, 2025

概要

マルチプロジェクト構成の Spring Boot アプリケーションを作成し、DI (依存性注入)機能を使用する場合、エントリーポイントとなるサブプロジェクトに ComponentScan アノテーションを付与しパッケージを指定する必要がある。通常、Configration アノテーションが付与されたクラスに追加する。
アプリケーション開発手順の Java 編に上記の説明がないため、手順を実施しても DI 機能を使用することができず、 AlesInfiny Maia 推奨するクリーンアーキテクチャの構成を実装できないため追記を行う。

詳細 / 機能詳細(オプション)

SpringBootApplication アノテーションは Configration アノテーションを包含しているため、Configration もしくは SpringBootApplication クラスが付与されているクラスに ComponentScan アノテーションを付与し、パッケージを指定する必要がある旨をガイドの以下のページに追記する。

  • ガイド > アプリケーション開発手順 > Java 編 > サブプロジェクトの個別設定 > web プロジェクトの設定
  • ガイド > アプリケーション開発手順 > Java 編 > サブプロジェクトの個別設定 > batch プロジェクトの設定

完了条件

  • アプリケーション開発手順の各エントリーポイントの説明に ComponentScan アノテーションを付与する手順が追加されている。
@kenjiyoshid-a kenjiyoshid-a added not triaged 精緻化、分析がされていない target: ガイド/AP開発手順 ドキュメントのガイド/アプリケーション開発手順に関係がある and removed not triaged 精緻化、分析がされていない labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target: ガイド/AP開発手順 ドキュメントのガイド/アプリケーション開発手順に関係がある
Projects
None yet
Development

No branches or pull requests

1 participant