Skip to content

Extend spring-boot-maven-plugin to allow customizing the loader for java SPIs #40766

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

Closed
MFAshby opened this issue May 15, 2024 · 1 comment
Closed
Labels
status: duplicate A duplicate of another issue

Comments

@MFAshby
Copy link

MFAshby commented May 15, 2024

I want to install a custom DateFormatSymbolsProvider to work around this issue where short month symbols changed in the JVM default locales. The supported mechanism for doing this is to use an SPI, which requires adding a file to my executable WAR: META-INF/services/java.text.spi.DateFormatSymbolsProvider. This must be in the root of the WAR, which is where the loader lives, not my application code.

I am using spring-boot-maven-plugin to create my executable WAR, and I cannot find any supported mechanism for customizing the loader in this way. There are workarounds such as using antrun to post-process the executable WAR, but these introduce extra complexity in the build and are not easily supported to also work in the IDE.

I think this relates to #6626 but I can't tell if it's an exact duplicate. Java SPIs are a well defined way of customizing JVM components and it seems unusual there's no documented way to use them in a spring boot application.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 15, 2024
@wilkinsona
Copy link
Member

Yes, this is a duplicate of #6626.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants