-
Notifications
You must be signed in to change notification settings - Fork 14
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
Clarification on expected behaviour for microprofile-config.properties file in webapp directory #182
Comments
I attempted to use |
We need to support this usecase but have you a link to the MicroProfile specification which says that webapp folder is a valid folder for microprofile-config.properties please. |
@angelozerr As far as I can tell from the MicroProfile specification, I don't see anything specifying a valid location for However, I do not know the spec very well, so maybe there is somewhere where the valid |
@TrevCraw before developping something it should be really nice to ask to MicroProfile specification team a clear specification about this location file. |
@yeekangc @Emily-Jiang Would either of you be able to speak to whether or not there are MicroProfile specifications that define where a @angelozerr How was it determined that the |
If I remember it is hard-coded and managed at https://github.com/eclipse/lsp4mp/blob/8e53e583508cc4d141482a55046cfd76a0362092/microprofile.jdt/org.eclipse.lsp4mp.jdt.core/src/main/java/org/eclipse/lsp4mp/jdt/internal/core/providers/MicroProfileConfigSourceProvider.java#L49 And I think there are this behavior on vscode client side vscode-microprofile/package.json Line 35 in 890fbb0
But perhaps I miss some part of code, it requires some investigation. Any PR are welcome! |
@TrevCraw The file microprofile-config.properties is under META-INF and the path can be load by the app classloader using the path: |
@angelozerr It appears that the location |
@Emily-Jiang Thank you for your response. My understanding is that what you outlined applies to the built application (please correct me if I am wrong). Is there anything in the MP specifications that dictates where a user must have their |
@TrevCraw if I remember we hard code the META-INF folder but not the src/main/resources folder which is get by jdt api |
The spec does not say where in the project it should be placed. It varies based on different projects. It will be fine as long as in the binary it ends up under META-INF/microprofile-config.properties where it can be loaded by the classloader. |
Currently, it seems that the LSP4MP language server does not provide suggestions for the microprofile-config.properties file when it is located under the
webapp/META-INF
directory.Suggestions are only available when the file is placed under
resources/META-INF
.Related - #249
Tools for MicroProfile Version: v0.11.0
OS: Mac
Steps to Reproduce:
Place microprofile-config.properties under webapp directory.
Open VSCode and try to access suggestions for properties within the microprofile-config.properties file.
The text was updated successfully, but these errors were encountered: