question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add contribution model for application configuration

See original GitHub issue

I would love to be able to create a new project that contains an application.yml instead of an application.properties file.

Maybe as an option? properties=yaml

Or maybe whiteSpaceBugs=true :trollface: Joking aside, we commonly give instructions to rename app.props to app.yml after creating a new project and then provide example configuration in YAML format.

I can understand the desire to keep the number of permutations down, so feel free to close this issue!

Thanks again!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
snicollcommented, Aug 11, 2020

I’ve repurposed this issue as an enhancement in the library.

3reactions
uqixcommented, Oct 29, 2021

As a workaround:

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

import io.spring.initializr.generator.project.contributor.ProjectContributor;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
class DeleteFileProjectContributor implements ProjectContributor {

    private final String path;

    @Override
    public void contribute(final Path projectRoot) throws IOException {
        final var file = projectRoot.resolve(path);
        Files.delete(file);
    }

    @Override
    public int getOrder() {
        return 1;
    }
}

@ProjectGenerationConfiguration
class CustomProjectGenerationConfiguration {
    @Bean
    ProjectContributor deleteApplicationPropertiesProjectContributor() {
        return new DeleteFileProjectContributor("src/main/resources/application.properties");
    }
}

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add an app.config file to a project - Microsoft Learn
In the middle pane, select the Application Configuration File template. Select the Add button. A file named App.config is added to your project....
Read more >
Contribution Points | Visual Studio Code Extension API
Contribute configuration keys that will be exposed to the user. The user will be able to set these configuration options as User Settings...
Read more >
Enabling GCM servers to contribute configurations to ... - IBM
Domain-specific applications (AM, CCM, DM, QM, and RM) can contribute local configurations to only one GCM instance. To enforce this constraint, you must...
Read more >
Config contribution | HCL Digital Experience
You can use one individual device class, but it has no equation support for the directory or the files in it. You can...
Read more >
How to configure an application - Juju
Configure an application during deployment · by using a yaml-formatted file · by passing options/values directly on the command line · a combination...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found