-
Notifications
You must be signed in to change notification settings - Fork 211
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
In VS Code, right-clicking a .properties file and selecting "Convert .properties to .yaml" does nothing #1478
Comments
@GrahamHannington this is the proper venue to report bugs or asking for help. |
Hi @BoykoAlex, thanks very much for the quick reply. 👍 In briefIt's stand-alone. What minimal set of files, and contents, must be present for "Convert .properties to .yaml" to work? In detailBackgroundI'm a Java beginner. I code in other languages, but in the context of this issue, I'm primarily a technical writer. I write the docs (user documentation) for a Spring Boot application. The application developers wrote the "wrapper" startup methods for the application, such as a *nix shell script, to expect externalized application configuration properties to be in a single, monolothic YAML file. And that's what I've described in the docs. However, application users have expressed a requirement to split the configuration properties across multiple files. I've read the Spring Boot documentation on "Externalized Configuration". I understand that Spring Boot supports multiple property sources, including multiple What I'm doingA stand-alone collection of example configurationsI've created a stand-alone Git repository that contains multiple example application configurations. It's just some Each immediate child directory of the repo is intended to be used as the current directory of a Java command that starts the application. Each of those child directories demonstrates a different example application configuration; a different arrangement of configuration files. For example, let's say the application is called "Nexus" (it's not 🙂), and the root directory of my repo is called
That is, there's a Each file contains a different value for one or more properties. This example demonstrates Spring Boot's "last wins" approach: the properties in I have over a dozen such example configurations, each in its own immediate child directory of the repo. Some of the examples use Some examples are deliberate monsters; some examples might get used by the product testers for QA; some might make it in the product, and/or product user documentation, as samples. I'd prefer to keep this set of examples completely separate from the application source repository; in a separate repository, not just in a separate branch of the application source repository. And I don't particularly want to "bloat" my tiny repo of YAML files with a copy of the application Java source. Why I'm interested in converting
|
In the end, the Spring Boot tooling requires the project (which contains the property files in your case) to be a regular Spring Boot Java project with the Spring Boot libraries on the classpath, for example via dependency management via Maven or Gradle. The easiest way to create and import such a project (in VSCode) is to have the The reason for that is: the Spring Tools require to resolve types and meta information from the resolved classpath on the project, in the case of the property files to "know" about which properties exist, what format they have, and more. |
Any idea why?
With apologies if I should be reporting this (that is, asking for help) somewhere else (please let me know).
Environment
.properties
fileexthost.log
extractExample
.properties
fileI doubt this is relevant, because I don't think the processing is getting this far ("command 'sts/boot/props-to-yaml' not found"), but for what it's worth (note: this is deliberately a trivially small test case):
Thoughts
I've Googled for:
found some hits, but I'm none the wiser about what to do. (Well, I've tried adding an empty
"[java]": {}
to my VS Codesettings.json
, but that's just grasping at straws.)The text was updated successfully, but these errors were encountered: