Example: demonstrate both adding and overriding Fess DI components#14
Merged
Conversation
Keep ExampleHelper (added via the additive app++.xml merge) and additionally restore CustomSystemHelper so the example demonstrates both ways a WebApp plugin extends Fess's DI container: - Add a new component: ExampleHelper via app++.xml - Override a core component: CustomSystemHelper (extends SystemHelper) via the fess+systemHelper.xml per-component redefine Details: - Move CustomSystemHelper into the unified package org.codelibs.fess.webapp.example.helper - Sync the design-JSP (addDesignJspFileName) list in fess+systemHelper.xml to current Fess core (19 entries) so overriding systemHelper does not drop core design mappings (chat/busy/newpassword) - Add a concise CustomSystemHelperTest (loads test_systemhelper.xml) and keep ExampleHelperTest - Rewrite README to document both patterns and the LastaDi merge/redefine conventions - Align example version references to 15.8
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.
Summary
Make the example WebApp plugin demonstrate the two complementary ways a plugin
extends Fess's dependency-injection container, side by side:
ExampleHelperregistered via the additiveapp++.xmlmerge convention.CustomSystemHelper extends SystemHelperregistered via the
fess+systemHelper.xmlper-component redefine convention.Changes
ExampleHelper+app++.xml(additive merge) in the unified packageorg.codelibs.fess.webapp.example.helper.CustomSystemHelper+fess+systemHelper.xml(override) in the samepackage, so the original "replace an existing component" example is preserved.
addDesignJspFileNamedesign-JSP list infess+systemHelper.xmltocurrent Fess core (19 entries) so overriding
systemHelperdoes not drop coredesign mappings (e.g. chat / busy / newpassword).
ExampleHelperTest(additive) andCustomSystemHelperTest(override),each loading its own test DI config (
test_app.xml/test_systemhelper.xml).README.mdto document both patterns and a corrected LastaDimerge/redefine conventions table.
Test plan
mvn testpasses (5 tests: ExampleHelperTest 3, CustomSystemHelperTest 2)mvn packageproduces a jar withFess-WebAppJar: trueand both DI files