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

4.x: Update to static content #9502

Merged
merged 8 commits into from
Nov 25, 2024

Conversation

tomas-langer
Copy link
Member

@tomas-langer tomas-langer commented Nov 14, 2024

Resolves #9471

Description

This PR introduces static content Server feature. This allows us to configure static content in config, with multiple handlers supported (both for path and classpath based static content).
The new configuration is using Helidon builders, and I have added the Config metadata plugin to have the reference available.
Old approach is deprecated and marked for removal, usages are changed to new approach, including MP.

Documentation

Documentation updated both for SE and MP

- WebServer feature to support static content from configuration
- new Builder API based prototypes to configure it
- deprecated old approach
Added singular methods for classpath and path handlers.
Renamed welcome file to welcome to align with current MP configuration option.
update to deprecated usages to avoid compiler warnings.
@tomas-langer tomas-langer added enhancement New feature or request webserver 4.x Version 4.x labels Nov 14, 2024
@tomas-langer tomas-langer self-assigned this Nov 14, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 14, 2024
Fix configuration used in MP extension.
@barchetta barchetta mentioned this pull request Nov 21, 2024
17 tasks
spericas
spericas previously approved these changes Nov 22, 2024
Copy link
Member

@spericas spericas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All my comments are pretty minor, no need to block this PR

…r to Java's Duration, but for size in bytes).

Update to builder to support nice defaults for size.
Update to PR to fix comments, and use Size for memory cache capacity.
Copy link
Member

@spericas spericas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tomas-langer tomas-langer merged commit 8399b14 into helidon-io:main Nov 25, 2024
46 checks passed
@tomas-langer tomas-langer deleted the 9471-static-content branch November 25, 2024 19:59
barchetta pushed a commit to barchetta/helidon that referenced this pull request Dec 4, 2024
* Static content update
- WebServer feature to support static content from configuration
- new Builder API based prototypes to configure it
- deprecated old approach

* Use defaults for sockets and welcome file.
Added singular methods for classpath and path handlers.
Renamed welcome file to welcome to align with current MP configuration option.

* CDI extension update to use new API with same defaults,
update to deprecated usages to avoid compiler warnings.

* Documentation update for MP and SE.

* Fix classpath root cleanup.
Fix configuration used in MP extension.

* Introduction of io.helidon.common.Size to handle size strings (similar to Java's Duration, but for size in bytes).
Update to builder to support nice defaults for size.
Update to PR to fix comments, and use Size for memory cache capacity.
barchetta pushed a commit to barchetta/helidon that referenced this pull request Dec 4, 2024
* Static content update
- WebServer feature to support static content from configuration
- new Builder API based prototypes to configure it
- deprecated old approach

* Use defaults for sockets and welcome file.
Added singular methods for classpath and path handlers.
Renamed welcome file to welcome to align with current MP configuration option.

* CDI extension update to use new API with same defaults,
update to deprecated usages to avoid compiler warnings.

* Documentation update for MP and SE.

* Fix classpath root cleanup.
Fix configuration used in MP extension.

* Introduction of io.helidon.common.Size to handle size strings (similar to Java's Duration, but for size in bytes).
Update to builder to support nice defaults for size.
Update to PR to fix comments, and use Size for memory cache capacity.
arjav-desai pushed a commit to arjav-desai/helidon that referenced this pull request Dec 11, 2024
* Static content update
- WebServer feature to support static content from configuration
- new Builder API based prototypes to configure it
- deprecated old approach

* Use defaults for sockets and welcome file.
Added singular methods for classpath and path handlers.
Renamed welcome file to welcome to align with current MP configuration option.

* CDI extension update to use new API with same defaults,
update to deprecated usages to avoid compiler warnings.

* Documentation update for MP and SE.

* Fix classpath root cleanup.
Fix configuration used in MP extension.

* Introduction of io.helidon.common.Size to handle size strings (similar to Java's Duration, but for size in bytes).
Update to builder to support nice defaults for size.
Update to PR to fix comments, and use Size for memory cache capacity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x enhancement New feature or request OCA Verified All contributors have signed the Oracle Contributor Agreement. webserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x: Static content from classpath improvements
2 participants