{"action":"created","issue":{"url":"https://api.github.com/repos/flyway/flyway/issues/1936","repository_url":"https://api.github.com/repos/flyway/flyway","labels_url":"https://api.github.com/repos/flyway/flyway/issues/1936/labels{/name}","comments_url":"https://api.github.com/repos/flyway/flyway/issues/1936/comments","events_url":"https://api.github.com/repos/flyway/flyway/issues/1936/events","html_url":"https://github.com/flyway/flyway/issues/1936","id":300345467,"number":1936,"title":"Environment variable configuration using API","user":{"login":"PeterWippermann","id":12392888,"avatar_url":"https://avatars0.githubusercontent.com/u/12392888?v=4","gravatar_id":"","url":"https://api.github.com/users/PeterWippermann","html_url":"https://github.com/PeterWippermann","followers_url":"https://api.github.com/users/PeterWippermann/followers","following_url":"https://api.github.com/users/PeterWippermann/following{/other_user}","gists_url":"https://api.github.com/users/PeterWippermann/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterWippermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterWippermann/subscriptions","organizations_url":"https://api.github.com/users/PeterWippermann/orgs","repos_url":"https://api.github.com/users/PeterWippermann/repos","events_url":"https://api.github.com/users/PeterWippermann/events{/privacy}","received_events_url":"https://api.github.com/users/PeterWippermann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-26T18:25:47Z","updated_at":"2018-02-26T18:35:32Z","closed_at":null,"author_association":"NONE","body":"I think the [documentation about env vars](https://flywaydb.org/documentation/envvars) needs some more clarification.\r\n\r\nFirst of all, I thought configuration set in env vars would always be considered, but as far as I understand only the Maven and Gradle integrations obey these variables since they use the `ConfigUtil`. In other words, settings env vars has no effect on the Java API as long as I instantiate Flyway by myself: `new Flyway()`. On the Java API I'm expected to call the configuration setters (`setCleanDisabled(...)`) also before using the Flyway object.\r\n\r\nIn addition, things behave different for the Spring Boot Autoconfiguration. If I'm having my Flyway object injected, Spring Boot will configure it for me - **by using Spring's configuration enviroment**.  Thus I can use environment variables here, but I have to stick to Spring's property notation, e.g. `flyway.clean-disabled=true`.\r\n\r\nI had to learn this the hard way. Could you please clarify this in the documentation?"},"comment":{"url":"https://api.github.com/repos/flyway/flyway/issues/comments/368602452","html_url":"https://github.com/flyway/flyway/issues/1936#issuecomment-368602452","issue_url":"https://api.github.com/repos/flyway/flyway/issues/1936","id":368602452,"user":{"login":"axelfontaine","id":684824,"avatar_url":"https://avatars2.githubusercontent.com/u/684824?v=4","gravatar_id":"","url":"https://api.github.com/users/axelfontaine","html_url":"https://github.com/axelfontaine","followers_url":"https://api.github.com/users/axelfontaine/followers","following_url":"https://api.github.com/users/axelfontaine/following{/other_user}","gists_url":"https://api.github.com/users/axelfontaine/gists{/gist_id}","starred_url":"https://api.github.com/users/axelfontaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axelfontaine/subscriptions","organizations_url":"https://api.github.com/users/axelfontaine/orgs","repos_url":"https://api.github.com/users/axelfontaine/repos","events_url":"https://api.github.com/users/axelfontaine/events{/privacy}","received_events_url":"https://api.github.com/users/axelfontaine/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T18:35:31Z","updated_at":"2018-02-26T18:35:31Z","author_association":"CONTRIBUTOR","body":"The environment variable docs have now been clarified. We plan on adding optional environment variable config to 5.1 as well.\r\n\r\nThe Spring Boot issue is something I am not sure we should address on that page. Our dedicated Spring Boot page may be a good place for that though."}}
{"actor":{"display_login":"axelfontaine"}}