issue111: Factory初期化フロー制御をServlet init-param方式に統一 #115
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.
概要
#111 の対応として対Factory初期化フロー制御をServlet init-param方式で実装してデフォルトでは互換動作としました。
enableBackwardOrderLoadingがtrue指定されたときは新しい読み込み順(WEB-INF → META-INF → Built-in の順)で探索し、最初に見つかった有効なものが採用されます。未指定あるいはfalseが指定された場合は、これまでと同じ動き(Built-in → META-INF → WEB-INF の順で探索し、全てを読み込みながら後のものが前のものを上書き)となります。変更内容
1. FactoryFactory.java
Servlet init-param対応の制御メソッドを追加:
isDisabledBackwardOrderLoading(): 読み込み順序の状態確認setEnableBackwardOrderLoadingOverride(): init-param値の反映2. MayaaServlet.java
applyInitParams()メソッドで Servlet init-param を読み込みenableBackwardOrderLoadingパラメータをサポート3. FactoryFactoryImpl.java
getFactory()メソッドをリファクタリング:collectSources(): ソース探索ロジック分離loadFactoryBackward(): 逆順読み込みloadFactoryForward(): 順順読み込み4. ProviderFactoryImpl.java
FactoryFactoryImpl と同様のリファクタリング
5. テスト整備
6. テスト用リソース
テスト結果
✅ 487/487 全テスト成功(478既存 + 9新規)