{"id":18521622,"url":"https://github.com/transferwise/wise-environment","last_synced_at":"2025-05-14T18:09:00.857Z","repository":{"id":230019639,"uuid":"776028190","full_name":"transferwise/wise-environment","owner":"transferwise","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-26T14:16:43.000Z","size":161,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":39,"default_branch":"main","last_synced_at":"2025-02-26T14:42:02.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transferwise.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-22T14:33:37.000Z","updated_at":"2024-12-11T11:25:16.000Z","dependencies_parsed_at":"2024-11-06T17:34:01.289Z","dependency_job_id":"ee8a44ed-b079-41f4-9088-7db065b31167","html_url":"https://github.com/transferwise/wise-environment","commit_stats":null,"previous_names":["transferwise/wise-environment"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transferwise%2Fwise-environment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transferwise%2Fwise-environment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transferwise%2Fwise-environment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transferwise%2Fwise-environment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transferwise","download_url":"https://codeload.github.com/transferwise/wise-environment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198511,"owners_count":22030966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T17:26:50.544Z","updated_at":"2025-05-14T18:08:55.842Z","avatar_url":"https://github.com/transferwise.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wise Environment.\n\n![Apache 2](https://img.shields.io/hexpm/l/plug.svg)\n![Java 17](https://img.shields.io/badge/Java-17-blue.svg)\n![Maven Central](https://badgen.net/maven/v/maven-central/com.transferwise.common/wise-environment)\n[![Owners](https://img.shields.io/badge/team-AppEng-blueviolet.svg?logo=wise)](https://transferwise.atlassian.net/wiki/spaces/EKB/pages/2520812116/Application+Engineering+Team) [![Slack](https://img.shields.io/badge/slack-appeng--pub-blue.svg?logo=slack)](https://wise.enterprise.slack.com/archives/C07QSPFLM5X)\n\u003e Use the `@application-engineering-on-call` handle on Slack for help.\n---\n\nProvides information to other libraries in which environment they are running in.\n\nAllows to set default properties for specific environments.\n\nTypical use case is for various Wise libraries to set environment specific default properties in their `EnvironmentPostProcessor` implementations.\n\n```java\nWiseEnvironment.setDefaultProperty(\"my-library\", WiseEnvironment.PRODUCTION, \"tw-reliable-jdbc.sslMode\", SslMode.VERIFY_FULL);\nWiseEnvironment.setDefaultProperty(\"my-library\", WiseEnvironment.STAGING, \"tw-reliable-jdbc.sslMode\", SslMode.PREFERRED);\nWiseEnvironment.setDefaultProperty(\"my-library\", WiseEnvironment.CUSTOM_ENVIRONMENT, \"tw-reliable-jdbc.sslMode\", SslMode.VERIFY_CA);\n```\n\nSee `WiseEnvironment` class for other optional use cases. E.g. asking which environments are currently active.\n\nThe environments themselves can be hierarchical. In that sense, that if you set a default property to `STAGING`, it would also apply to\n`CUSTOM_ENVIRONMENT`, unless a different value is specifically set for `CUSTOM_ENVIRONMENT`.\n\nAlso, a convenience DSL is available for setting properties. E.g.\n\n```java\nWiseEnvironment.setDefaultProperties(dsl -\u003e dsl\n    .source(\"tw-reliable-jdbc\")\n\n    .environment(WiseEnvironment.WISE)\n    .set(TW_OBS_BASE_EXTREMUM_CONFIG_PATH, gaugeNames)\n    .set(\"spring.flyway.validate-migration-naming\", \"true\")\n\n    .keyPrefix(\"tw-reliable-jdbc.\")\n    .environment(WiseEnvironment.PRODUCTION)\n    .set(\"sslMode\", SslMode.VERIFY_FULL)\n    .set(\"requiredSslModeLevel\", SslMode.VERIFY_CA)\n    .set(\"requireMinPoolSizePct\", 100d)\n\n    .environment(WiseEnvironment.STAGING)\n    .set(\"sslMode\", SslMode.VERIFY_FULL)\n);\n```\n\n## License\nCopyright 2024 TransferWise Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransferwise%2Fwise-environment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransferwise%2Fwise-environment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransferwise%2Fwise-environment/lists"}