Skip to content

Example: demonstrate both adding and overriding Fess DI components#14

Merged
marevol merged 2 commits into
masterfrom
refactor/modernize-example
Jun 26, 2026
Merged

Example: demonstrate both adding and overriding Fess DI components#14
marevol merged 2 commits into
masterfrom
refactor/modernize-example

Conversation

@marevol

@marevol marevol commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Make the example WebApp plugin demonstrate the two complementary ways a plugin
extends Fess's dependency-injection container, side by side:

  1. Add a new componentExampleHelper registered via the additive
    app++.xml merge convention.
  2. Override a core componentCustomSystemHelper extends SystemHelper
    registered via the fess+systemHelper.xml per-component redefine convention.

Changes

  • Add ExampleHelper + app++.xml (additive merge) in the unified package
    org.codelibs.fess.webapp.example.helper.
  • Restore CustomSystemHelper + fess+systemHelper.xml (override) in the same
    package, so the original "replace an existing component" example is preserved.
  • Sync the addDesignJspFileName design-JSP list in fess+systemHelper.xml to
    current Fess core (19 entries) so overriding systemHelper does not drop core
    design mappings (e.g. chat / busy / newpassword).
  • Tests: ExampleHelperTest (additive) and CustomSystemHelperTest (override),
    each loading its own test DI config (test_app.xml / test_systemhelper.xml).
  • Rewrite README.md to document both patterns and a corrected LastaDi
    merge/redefine conventions table.
  • Fix the snapshot repository URL (central.sonatype.com).
  • Align version references to 15.8.

Test plan

  • mvn test passes (5 tests: ExampleHelperTest 3, CustomSystemHelperTest 2)
  • mvn package produces a jar with Fess-WebAppJar: true and both DI files

marevol added 2 commits June 25, 2026 23:24
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
@marevol marevol changed the title Modernize example webapp helper (CustomSystemHelper -> ExampleHelper) Example: demonstrate both adding and overriding Fess DI components Jun 26, 2026
@marevol marevol merged commit 13a435b into master Jun 26, 2026
3 checks passed
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