Skip to content

Cannot use dedicated Spring profile for generating docs #18

@roltean

Description

@roltean

I'm trying to use a dedicated Spring profile for running the tests that generate documentation and it proved to be unsuccessful, no matter what I tried.

Applying

@ActiveProfiles("docs")

causes Spring to select the docs profile
The following profiles are active: docs
but the configuration applied is the one in application.yml not the one in application-docs.yml.
Adding

@TestPropertySource(locations="classpath:application-docs.yml")

I end up with the same result. I have placed application-docs.yml in both main and test source sets, just to be sure, and the settings inside are still not being picked up.

Any ideas on how to override the default settings in application.yml with custom settings specific to documentation generation?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions