repo_name
stringclasses
5 values
pr_number
int64
1.52k
15.5k
pr_title
stringlengths
8
143
pr_description
stringlengths
0
10.2k
author
stringlengths
3
18
date_created
timestamp[ns, tz=UTC]
date_merged
timestamp[ns, tz=UTC]
previous_commit
stringlengths
40
40
pr_commit
stringlengths
40
40
query
stringlengths
11
10.2k
filepath
stringlengths
6
220
before_content
stringlengths
0
597M
after_content
stringlengths
0
597M
label
int64
-1
1
apolloconfig/apollo
3,870
fix apollo config data loader with profiles
## What's the purpose of this PR fix apollo config data loader with profiles ## Which issue(s) this PR fixes: Fixes #3867 ## Brief changelog add a field `m_pureApolloConfig` for `DefaultConfig` to prevent the `DefaultConfig` return the properties from the `system property` or `environment variables` when work with config data loader. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T14:42:01Z
2021-08-10T01:11:02Z
8c0241cbb2041eb3e34cb8c12a7dc1f1e46417ed
2c9b4dccbcf31012913b270cc356a30ab0cab89f
fix apollo config data loader with profiles. ## What's the purpose of this PR fix apollo config data loader with profiles ## Which issue(s) this PR fixes: Fixes #3867 ## Brief changelog add a field `m_pureApolloConfig` for `DefaultConfig` to prevent the `DefaultConfig` return the properties from the `system property` or `environment variables` when work with config data loader. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/test/resources/properties/server-with-utf8bom.properties
idc=SHAJQ env=DEV subenv=Dev123 bigdata=true tooling=true pci=true
idc=SHAJQ env=DEV subenv=Dev123 bigdata=true tooling=true pci=true
-1
apolloconfig/apollo
3,870
fix apollo config data loader with profiles
## What's the purpose of this PR fix apollo config data loader with profiles ## Which issue(s) this PR fixes: Fixes #3867 ## Brief changelog add a field `m_pureApolloConfig` for `DefaultConfig` to prevent the `DefaultConfig` return the properties from the `system property` or `environment variables` when work with config data loader. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T14:42:01Z
2021-08-10T01:11:02Z
8c0241cbb2041eb3e34cb8c12a7dc1f1e46417ed
2c9b4dccbcf31012913b270cc356a30ab0cab89f
fix apollo config data loader with profiles. ## What's the purpose of this PR fix apollo config data loader with profiles ## Which issue(s) this PR fixes: Fixes #3867 ## Brief changelog add a field `m_pureApolloConfig` for `DefaultConfig` to prevent the `DefaultConfig` return the properties from the `system property` or `environment variables` when work with config data loader. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/TestWebSecurityConfig.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration @Order(99) public class TestWebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.httpBasic(); http.csrf().disable(); http.authorizeRequests().antMatchers("/").permitAll().and() .authorizeRequests().antMatchers("/console/**").permitAll(); http.headers().frameOptions().disable(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration @Order(99) public class TestWebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.httpBasic(); http.csrf().disable(); http.authorizeRequests().antMatchers("/").permitAll().and() .authorizeRequests().antMatchers("/console/**").permitAll(); http.headers().frameOptions().disable(); } }
-1
apolloconfig/apollo
3,870
fix apollo config data loader with profiles
## What's the purpose of this PR fix apollo config data loader with profiles ## Which issue(s) this PR fixes: Fixes #3867 ## Brief changelog add a field `m_pureApolloConfig` for `DefaultConfig` to prevent the `DefaultConfig` return the properties from the `system property` or `environment variables` when work with config data loader. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T14:42:01Z
2021-08-10T01:11:02Z
8c0241cbb2041eb3e34cb8c12a7dc1f1e46417ed
2c9b4dccbcf31012913b270cc356a30ab0cab89f
fix apollo config data loader with profiles. ## What's the purpose of this PR fix apollo config data loader with profiles ## Which issue(s) this PR fixes: Fixes #3867 ## Brief changelog add a field `m_pureApolloConfig` for `DefaultConfig` to prevent the `DefaultConfig` return the properties from the `system property` or `environment variables` when work with config data loader. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/AppNamespaceControllerTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import com.ctrip.framework.apollo.biz.repository.AppNamespaceRepository; import com.ctrip.framework.apollo.common.dto.AppNamespaceDTO; import com.ctrip.framework.apollo.common.entity.AppNamespace; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.jdbc.Sql; public class AppNamespaceControllerTest extends AbstractControllerTest{ @Autowired private AppNamespaceRepository namespaceRepository; @Test @Sql(scripts = "/controller/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreate(){ String appId = "6666"; String name = "testnamespace"; String comment = "comment"; AppNamespaceDTO dto = new AppNamespaceDTO(); dto.setAppId(appId); dto.setName(name); dto.setComment(comment); dto.setDataChangeCreatedBy("apollo"); AppNamespaceDTO resultDto = restTemplate.postForEntity( String.format("http://localhost:%d/apps/%s/appnamespaces", port, appId),dto, AppNamespaceDTO.class).getBody(); Assert.assertEquals(appId, resultDto.getAppId()); Assert.assertTrue(resultDto.getId() > 0); AppNamespace savedAppNs = namespaceRepository.findByAppIdAndName(appId, name); Assert.assertNotNull(savedAppNs); Assert.assertNotNull(savedAppNs.getDataChangeCreatedTime()); Assert.assertNotNull(savedAppNs.getDataChangeLastModifiedTime()); Assert.assertNotNull(savedAppNs.getDataChangeLastModifiedBy()); Assert.assertNotNull(savedAppNs.getDataChangeCreatedBy()); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import com.ctrip.framework.apollo.biz.repository.AppNamespaceRepository; import com.ctrip.framework.apollo.common.dto.AppNamespaceDTO; import com.ctrip.framework.apollo.common.entity.AppNamespace; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.jdbc.Sql; public class AppNamespaceControllerTest extends AbstractControllerTest{ @Autowired private AppNamespaceRepository namespaceRepository; @Test @Sql(scripts = "/controller/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreate(){ String appId = "6666"; String name = "testnamespace"; String comment = "comment"; AppNamespaceDTO dto = new AppNamespaceDTO(); dto.setAppId(appId); dto.setName(name); dto.setComment(comment); dto.setDataChangeCreatedBy("apollo"); AppNamespaceDTO resultDto = restTemplate.postForEntity( String.format("http://localhost:%d/apps/%s/appnamespaces", port, appId),dto, AppNamespaceDTO.class).getBody(); Assert.assertEquals(appId, resultDto.getAppId()); Assert.assertTrue(resultDto.getId() > 0); AppNamespace savedAppNs = namespaceRepository.findByAppIdAndName(appId, name); Assert.assertNotNull(savedAppNs); Assert.assertNotNull(savedAppNs.getDataChangeCreatedTime()); Assert.assertNotNull(savedAppNs.getDataChangeLastModifiedTime()); Assert.assertNotNull(savedAppNs.getDataChangeLastModifiedBy()); Assert.assertNotNull(savedAppNs.getDataChangeCreatedBy()); } }
-1
apolloconfig/apollo
3,870
fix apollo config data loader with profiles
## What's the purpose of this PR fix apollo config data loader with profiles ## Which issue(s) this PR fixes: Fixes #3867 ## Brief changelog add a field `m_pureApolloConfig` for `DefaultConfig` to prevent the `DefaultConfig` return the properties from the `system property` or `environment variables` when work with config data loader. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T14:42:01Z
2021-08-10T01:11:02Z
8c0241cbb2041eb3e34cb8c12a7dc1f1e46417ed
2c9b4dccbcf31012913b270cc356a30ab0cab89f
fix apollo config data loader with profiles. ## What's the purpose of this PR fix apollo config data loader with profiles ## Which issue(s) this PR fixes: Fixes #3867 ## Brief changelog add a field `m_pureApolloConfig` for `DefaultConfig` to prevent the `DefaultConfig` return the properties from the `system property` or `environment variables` when work with config data loader. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client-config-data/src/test/java/com/ctrip/framework/apollo/config/data/system/ApolloClientApplicationPropertiesCompatibleTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.config.data.system; import com.ctrip.framework.apollo.core.ApolloClientSystemConsts; import com.ctrip.framework.apollo.spring.boot.ApolloApplicationContextInitializer; import org.junit.After; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * @author vdisk <vdisk@foxmail.com> */ @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = ApolloClientPropertyCompatibleTestConfiguration.class, webEnvironment = SpringBootTest.WebEnvironment.NONE) @ActiveProfiles("test-compatible") public class ApolloClientApplicationPropertiesCompatibleTest { @Autowired private ConfigurableEnvironment environment; @Test public void testApplicationPropertiesCompatible() { Assert.assertEquals("test-1/cacheDir", this.environment.getProperty(ApolloClientSystemConsts.APOLLO_CACHE_DIR)); Assert.assertEquals("test-1-secret", this.environment.getProperty(ApolloClientSystemConsts.APOLLO_ACCESS_KEY_SECRET)); Assert.assertEquals("https://test-1-config-service", this.environment.getProperty(ApolloClientSystemConsts.APOLLO_CONFIG_SERVICE)); } @After public void clearProperty() { for (String propertyName : ApolloApplicationContextInitializer.APOLLO_SYSTEM_PROPERTIES) { System.clearProperty(propertyName); } } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.config.data.system; import com.ctrip.framework.apollo.core.ApolloClientSystemConsts; import com.ctrip.framework.apollo.spring.boot.ApolloApplicationContextInitializer; import org.junit.After; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * @author vdisk <vdisk@foxmail.com> */ @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = ApolloClientPropertyCompatibleTestConfiguration.class, webEnvironment = SpringBootTest.WebEnvironment.NONE) @ActiveProfiles("test-compatible") public class ApolloClientApplicationPropertiesCompatibleTest { @Autowired private ConfigurableEnvironment environment; @Test public void testApplicationPropertiesCompatible() { Assert.assertEquals("test-1/cacheDir", this.environment.getProperty(ApolloClientSystemConsts.APOLLO_CACHE_DIR)); Assert.assertEquals("test-1-secret", this.environment.getProperty(ApolloClientSystemConsts.APOLLO_ACCESS_KEY_SECRET)); Assert.assertEquals("https://test-1-config-service", this.environment.getProperty(ApolloClientSystemConsts.APOLLO_CONFIG_SERVICE)); } @After public void clearProperty() { for (String propertyName : ApolloApplicationContextInitializer.APOLLO_SYSTEM_PROPERTIES) { System.clearProperty(propertyName); } } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./CHANGES.md
Changes by Version ================== Release Notes. Apollo 1.9.0 ------------------ * [extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.](https://github.com/ctripcorp/apollo/pull/3552) * [add spring configuration metadata](https://github.com/ctripcorp/apollo/pull/3553) * [fix #3551 and optimize ldap samples ](https://github.com/ctripcorp/apollo/pull/3561) * [update wiki url and refine documentation](https://github.com/ctripcorp/apollo/pull/3563) * [slim docker images](https://github.com/ctripcorp/apollo/pull/3572) * [add network strategy guideline to docker quick start](https://github.com/ctripcorp/apollo/pull/3574) * [Added support for consul service discovery](https://github.com/ctripcorp/apollo/pull/3575) * [disable consul in apollo-assembly by default ](https://github.com/ctripcorp/apollo/pull/3585) * [ServiceBootstrap unit test fix](https://github.com/ctripcorp/apollo/pull/3593) * [replace http client implementation with interface ](https://github.com/ctripcorp/apollo/pull/3594) * [Allow users to inject customized instance via ApolloInjectorCustomizer](https://github.com/ctripcorp/apollo/pull/3602) * [Fixes #3606](https://github.com/ctripcorp/apollo/pull/3609) * [Bump xstream from 1.4.15 to 1.4.16](https://github.com/ctripcorp/apollo/pull/3611) * [docs: user practices. Alibaba Sentinel Dashboard Push Rules to apollo](https://github.com/ctripcorp/apollo/pull/3617) * [update known users](https://github.com/ctripcorp/apollo/pull/3619) * [add maven deploy action](https://github.com/ctripcorp/apollo/pull/3620) * [fix the issue that access key doesn't work if appid passed is in different case](https://github.com/ctripcorp/apollo/pull/3627) * [fix oidc logout](https://github.com/ctripcorp/apollo/pull/3628) * [docs: third party sdk nodejs client](https://github.com/ctripcorp/apollo/pull/3632) * [update known users](https://github.com/ctripcorp/apollo/pull/3633) * [docs: use docsify pagination plugin](https://github.com/ctripcorp/apollo/pull/3634) * [apollo client to support jdk16](https://github.com/ctripcorp/apollo/pull/3646) * [add English version of readme](https://github.com/ctripcorp/apollo/pull/3656) * [update known users](https://github.com/ctripcorp/apollo/pull/3657) * [update apolloconfig.com domain](https://github.com/ctripcorp/apollo/pull/3658) * [localize css to speed up the loading of google fonts](https://github.com/ctripcorp/apollo/pull/3660) * [test(apollo-client): use assertEquals instead of assertThat](https://github.com/ctripcorp/apollo/pull/3667) * [test(apollo-client): make timeout more longer when long poll](https://github.com/ctripcorp/apollo/pull/3668) * [fix unit test](https://github.com/ctripcorp/apollo/pull/3669) * [解决日志系统未初始化完成时,apollo 的加载日志没法输出问题](https://github.com/ctripcorp/apollo/pull/3677) * [fix[apollo-configService]: Solve configService startup exception](https://github.com/ctripcorp/apollo/pull/3679) * [Community Governance Proposal](https://github.com/ctripcorp/apollo/pull/3670) * [增加阿波罗client的php库](https://github.com/ctripcorp/apollo/pull/3682) * [Bump xstream from 1.4.16 to 1.4.17](https://github.com/ctripcorp/apollo/pull/3692) * [Improve the nacos registry configuration document](https://github.com/ctripcorp/apollo/pull/3695) * [Remove redundant invoke of trySyncFromUpstream](https://github.com/ctripcorp/apollo/pull/3699) * [add apollo team introduction and community releated contents](https://github.com/ctripcorp/apollo/pull/3713) * [fix oidc sql](https://github.com/ctripcorp/apollo/pull/3720) * [feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent](https://github.com/ctripcorp/apollo/pull/3666) * [add More... link for known users](https://github.com/ctripcorp/apollo/pull/3757) * [update OIDC documentation](https://github.com/ctripcorp/apollo/pull/3766) * [Improve the item-value length limit configuration document](https://github.com/ctripcorp/apollo/pull/3789) * [Use queue#take instead of poll](https://github.com/ctripcorp/apollo/pull/3765) * [feature: add Spring Boot 2.4 config data loader support](https://github.com/ctripcorp/apollo/pull/3754) * [feat(open-api): get authorized apps](https://github.com/ctripcorp/apollo/pull/3647) * [feature: shared session for multi apollo portal](https://github.com/ctripcorp/apollo/pull/3786) * [feature: add email for select user on apollo portal](https://github.com/ctripcorp/apollo/pull/3797) * [feature: modify item comment valid size](https://github.com/ctripcorp/apollo/pull/3803) * [set default session store-type](https://github.com/ctripcorp/apollo/pull/3812) * [speed up the stale issue mark and close phase](https://github.com/ctripcorp/apollo/pull/3808) * [feature: add the delegating password encoder for apollo-portal simple auth](https://github.com/ctripcorp/apollo/pull/3804) * [support release apollo-client-config-data](https://github.com/ctripcorp/apollo/pull/3822) * [Fix possiable NPE](https://github.com/ctripcorp/apollo/pull/3832) * [Reduce bootstrap time in the situation with large properties](https://github.com/ctripcorp/apollo/pull/3816) * [docs: English catalog in sidebar](https://github.com/ctripcorp/apollo/pull/3831) * [fix the issue that release messages might be missed in certain scenarios](https://github.com/ctripcorp/apollo/pull/3819) * [use official docker images for manual kubernetes deployment](https://github.com/ctripcorp/apollo/pull/3840) * [fix size of create project button](https://github.com/ctripcorp/apollo/pull/3849) * [translation of "portal-how-to-enable-webhook-notification.md"](https://github.com/ctripcorp/apollo/pull/3847) * [feature: add history detail for not key-value type of namespace](https://github.com/ctripcorp/apollo/pull/3856) * [fix show-text-modal number display](https://github.com/ctripcorp/apollo/pull/3851) * [Lazy load ConfigUtil](https://github.com/ctripcorp/apollo/pull/3864) ------------------ All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)
Changes by Version ================== Release Notes. Apollo 1.9.0 ------------------ * [extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.](https://github.com/ctripcorp/apollo/pull/3552) * [add spring configuration metadata](https://github.com/ctripcorp/apollo/pull/3553) * [fix #3551 and optimize ldap samples ](https://github.com/ctripcorp/apollo/pull/3561) * [update wiki url and refine documentation](https://github.com/ctripcorp/apollo/pull/3563) * [slim docker images](https://github.com/ctripcorp/apollo/pull/3572) * [add network strategy guideline to docker quick start](https://github.com/ctripcorp/apollo/pull/3574) * [Added support for consul service discovery](https://github.com/ctripcorp/apollo/pull/3575) * [disable consul in apollo-assembly by default ](https://github.com/ctripcorp/apollo/pull/3585) * [ServiceBootstrap unit test fix](https://github.com/ctripcorp/apollo/pull/3593) * [replace http client implementation with interface ](https://github.com/ctripcorp/apollo/pull/3594) * [Allow users to inject customized instance via ApolloInjectorCustomizer](https://github.com/ctripcorp/apollo/pull/3602) * [Fixes #3606](https://github.com/ctripcorp/apollo/pull/3609) * [Bump xstream from 1.4.15 to 1.4.16](https://github.com/ctripcorp/apollo/pull/3611) * [docs: user practices. Alibaba Sentinel Dashboard Push Rules to apollo](https://github.com/ctripcorp/apollo/pull/3617) * [update known users](https://github.com/ctripcorp/apollo/pull/3619) * [add maven deploy action](https://github.com/ctripcorp/apollo/pull/3620) * [fix the issue that access key doesn't work if appid passed is in different case](https://github.com/ctripcorp/apollo/pull/3627) * [fix oidc logout](https://github.com/ctripcorp/apollo/pull/3628) * [docs: third party sdk nodejs client](https://github.com/ctripcorp/apollo/pull/3632) * [update known users](https://github.com/ctripcorp/apollo/pull/3633) * [docs: use docsify pagination plugin](https://github.com/ctripcorp/apollo/pull/3634) * [apollo client to support jdk16](https://github.com/ctripcorp/apollo/pull/3646) * [add English version of readme](https://github.com/ctripcorp/apollo/pull/3656) * [update known users](https://github.com/ctripcorp/apollo/pull/3657) * [update apolloconfig.com domain](https://github.com/ctripcorp/apollo/pull/3658) * [localize css to speed up the loading of google fonts](https://github.com/ctripcorp/apollo/pull/3660) * [test(apollo-client): use assertEquals instead of assertThat](https://github.com/ctripcorp/apollo/pull/3667) * [test(apollo-client): make timeout more longer when long poll](https://github.com/ctripcorp/apollo/pull/3668) * [fix unit test](https://github.com/ctripcorp/apollo/pull/3669) * [解决日志系统未初始化完成时,apollo 的加载日志没法输出问题](https://github.com/ctripcorp/apollo/pull/3677) * [fix[apollo-configService]: Solve configService startup exception](https://github.com/ctripcorp/apollo/pull/3679) * [Community Governance Proposal](https://github.com/ctripcorp/apollo/pull/3670) * [增加阿波罗client的php库](https://github.com/ctripcorp/apollo/pull/3682) * [Bump xstream from 1.4.16 to 1.4.17](https://github.com/ctripcorp/apollo/pull/3692) * [Improve the nacos registry configuration document](https://github.com/ctripcorp/apollo/pull/3695) * [Remove redundant invoke of trySyncFromUpstream](https://github.com/ctripcorp/apollo/pull/3699) * [add apollo team introduction and community releated contents](https://github.com/ctripcorp/apollo/pull/3713) * [fix oidc sql](https://github.com/ctripcorp/apollo/pull/3720) * [feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent](https://github.com/ctripcorp/apollo/pull/3666) * [add More... link for known users](https://github.com/ctripcorp/apollo/pull/3757) * [update OIDC documentation](https://github.com/ctripcorp/apollo/pull/3766) * [Improve the item-value length limit configuration document](https://github.com/ctripcorp/apollo/pull/3789) * [Use queue#take instead of poll](https://github.com/ctripcorp/apollo/pull/3765) * [feature: add Spring Boot 2.4 config data loader support](https://github.com/ctripcorp/apollo/pull/3754) * [feat(open-api): get authorized apps](https://github.com/ctripcorp/apollo/pull/3647) * [feature: shared session for multi apollo portal](https://github.com/ctripcorp/apollo/pull/3786) * [feature: add email for select user on apollo portal](https://github.com/ctripcorp/apollo/pull/3797) * [feature: modify item comment valid size](https://github.com/ctripcorp/apollo/pull/3803) * [set default session store-type](https://github.com/ctripcorp/apollo/pull/3812) * [speed up the stale issue mark and close phase](https://github.com/ctripcorp/apollo/pull/3808) * [feature: add the delegating password encoder for apollo-portal simple auth](https://github.com/ctripcorp/apollo/pull/3804) * [support release apollo-client-config-data](https://github.com/ctripcorp/apollo/pull/3822) * [Fix possiable NPE](https://github.com/ctripcorp/apollo/pull/3832) * [Reduce bootstrap time in the situation with large properties](https://github.com/ctripcorp/apollo/pull/3816) * [docs: English catalog in sidebar](https://github.com/ctripcorp/apollo/pull/3831) * [fix the issue that release messages might be missed in certain scenarios](https://github.com/ctripcorp/apollo/pull/3819) * [use official docker images for manual kubernetes deployment](https://github.com/ctripcorp/apollo/pull/3840) * [fix size of create project button](https://github.com/ctripcorp/apollo/pull/3849) * [translation of "portal-how-to-enable-webhook-notification.md"](https://github.com/ctripcorp/apollo/pull/3847) * [feature: add history detail for not key-value type of namespace](https://github.com/ctripcorp/apollo/pull/3856) * [fix show-text-modal number display](https://github.com/ctripcorp/apollo/pull/3851) * [Lazy load ConfigUtil](https://github.com/ctripcorp/apollo/pull/3864) * [make jdbc session enable default](https://github.com/ctripcorp/apollo/pull/3869) ------------------ All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)
1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/application.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: application: name: apollo-portal profiles: active: ${apollo_profile} jpa: properties: hibernate: query: plan_cache_max_size: 192 # limit query plan cache max size session: store-type: none server: port: 8070 compression: enabled: true tomcat: use-relative-redirects: true logging: file: name: /opt/logs/100003173/apollo-portal.log management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP ldap: enabled: false # disable ldap health check by default
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: application: name: apollo-portal profiles: active: ${apollo_profile} jpa: properties: hibernate: query: plan_cache_max_size: 192 # limit query plan cache max size session: store-type: jdbc jdbc: initialize-schema: never server: port: 8070 compression: enabled: true tomcat: use-relative-redirects: true logging: file: name: /opt/logs/100003173/apollo-portal.log management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP ldap: enabled: false # disable ldap health check by default
1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/development/portal-how-to-enable-session-store.md
从 1.9.0 版本开始,apollo-portal 增加了 session 共享支持,从而可以在集群部署 apollo-portal 时实现 session 共享。 ## 使用方式 ### 1. 不启用 session 共享(默认) 默认配置即为不启用 所以清除 session 共享相关的配置即可,需要清理的配置如下 外置配置文件(properties/yml)里面的 `spring.session.store-type` 配置项 环境变量里面的 `SPRING_SESSION_STORE_TYPE` System Property 里面的 `spring.session.store-type` ### 2. 基于 Redis 的 session 共享 有以下几种方式设置,按照优先级从高到低分别为: 注:redis 也支持集群、哨兵模式,配置方式为标准的 `Spring Data Redis` 模式(以 `spring.redis` 开头的配置项),具体方式请自行研究 `Spring Data Redis` 相关文档或咨询 `Spring Data` Group #### 2.1 System Property ```bash -Dspring.session.store-type=redis -Dspring.redis.host=xxx -Dspring.redis.port=xxx -Dspring.redis.username=xxx -Dspring.redis.password=xxx ``` #### 2.2 环境变量 ```bash export SPRING_SESSION_STORE_TYPE="redis" export SPRING_REDIS_HOST="xxx" export SPRING_REDIS_PORT="xxx" export SPRING_REDIS_USERNAME="xxx" export SPRING_REDIS_PASSWORD="xxx" ``` #### 2.3 外部配置文件 例如 `config/application-github.properties` ```properties spring.session.store-type=redis spring.redis.host=xxx spring.redis.port=xxx spring.redis.username=xxx spring.redis.password=xxx ``` ### 3. 基于 JDBC 的 session 共享 有以下几种方式设置,按照优先级从高到低分别为: #### 3.1 System Property ```bash -Dspring.session.store-type=jdbc -Dspring.datasource.url=xxx -Dspring.datasource.username=xxx -Dspring.datasource.password=xxx ``` #### 3.2 环境变量 ```bash export SPRING_SESSION_STORE_TYPE="jdbc" export SPRING_DATASOURCE_URL="xxx" export SPRING_DATASOURCE_USERNAME="xxx" export SPRING_DATASOURCE_PASSWORD="xxx" ``` #### 3.3 外部配置文件 例如 `config/application-github.properties` ```properties spring.session.store-type=jdbc spring.datasource.url=xxx spring.datasource.username=xxx spring.datasource.password=xxx ``` #### 关于初始化 session 的表 ##### 1. apollo-portal 应用自动建表 给 apollo-portal 准备好具有 DDL 权限的数据库帐号。 然后首次启动时配置 `spring.session.jdbc.initialize-schema=always`(System Property,环境变量,外部配置文件均可) 即可, 一共会自动创建两张表 `spring_session` 和 `spring_session_attributes`。 创建完成后配置 `spring.session.jdbc.initialize-schema=never`,否则每次启动都会尝试去建表,会刷一大堆错误日志(无实际影响)。 ##### 2. 临时部署建表应用进行自动建表 准备好一个给 apollo-portal 使用的普通权限的数据库帐号,以及一个给建表临时应用使用的具有 DDL 权限的数据库帐号。 部署一个 apollo-portal 作为临时建表应用,配置如下 ```properties spring.session.store-type=jdbc spring.session.jdbc.initialize-schema=always spring.datasource.url=xxx spring.datasource.username={{DDL权限帐号}} spring.datasource.password={{DDL权限帐号的密码}} ``` 应用启动完成后检查数据库里 `spring_session` 和 `spring_session_attributes` 这两张表是否创建完成,创建完成即可停止并删除该临时应用,使用普通数据库帐号配置部署 apollo-portal 集群即可。 ##### 3. 手动建表 可以选择手动在数据库执行建表语句,sql 脚本由 [spring-session](https://github.com/spring-projects/spring-session) 提供 具体的建表 sql 如下,请根据所使用的数据库选择对应的 sql 脚本 [db2.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-db2.sql) [derby.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-derby.sql) [h2.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-h2.sql) [hsqldb.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-hsqldb.sql) [mysql.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-mysql.sql) [oracle.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-oracle.sql) [postgresql.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-postgresql.sql) [sqlite.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sqlite.sql) [sqlserver.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sqlserver.sql) [sybase.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sybase.sql)
从 1.9.0 版本开始,apollo-portal 增加了 session 共享支持,从而可以在集群部署 apollo-portal 时实现 session 共享。 ## 使用方式 ### 1. 基于 JDBC 的 session 共享(默认) 默认配置即为 基于 JDBC 的 session 共享 所以清除 session 共享相关的配置并配置数据库连接即可,需要清理的配置如下 外置配置文件(properties/yml)里面的 `spring.session.store-type` 配置项 环境变量里面的 `SPRING_SESSION_STORE_TYPE` System Property 里面的 `spring.session.store-type` 数据库连接有以下几种方式设置,按照优先级从高到低分别为: #### 1.1 System Property ```bash -Dspring.datasource.url=xxx -Dspring.datasource.username=xxx -Dspring.datasource.password=xxx ``` #### 1.2 环境变量 ```bash export SPRING_DATASOURCE_URL="xxx" export SPRING_DATASOURCE_USERNAME="xxx" export SPRING_DATASOURCE_PASSWORD="xxx" ``` #### 1.3 外部配置文件 例如 `config/application-github.properties` ```properties spring.datasource.url=xxx spring.datasource.username=xxx spring.datasource.password=xxx ``` #### 1.4 关于非 mysql 数据库初始化 session 的表 apollo 的 sql 当中的建表语句为 mysql 格式, 如果需要使用其它数据库可以参考 [spring-session](https://github.com/spring-projects/spring-session) 提供的其它建表 sql 请根据所使用的数据库选择对应的 sql 脚本 [db2.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-db2.sql) [derby.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-derby.sql) [h2.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-h2.sql) [hsqldb.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-hsqldb.sql) [mysql.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-mysql.sql) [oracle.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-oracle.sql) [postgresql.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-postgresql.sql) [sqlite.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sqlite.sql) [sqlserver.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sqlserver.sql) [sybase.sql](https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sybase.sql) ### 2. 基于 Redis 的 session 共享 有以下几种方式设置,按照优先级从高到低分别为: 注:redis 也支持集群、哨兵模式,配置方式为标准的 `Spring Data Redis` 模式(以 `spring.redis` 开头的配置项),具体方式请自行研究 `Spring Data Redis` 相关文档或咨询 `Spring Data` Group #### 2.1 System Property ```bash -Dspring.session.store-type=redis -Dspring.redis.host=xxx -Dspring.redis.port=xxx -Dspring.redis.username=xxx -Dspring.redis.password=xxx ``` #### 2.2 环境变量 ```bash export SPRING_SESSION_STORE_TYPE="redis" export SPRING_REDIS_HOST="xxx" export SPRING_REDIS_PORT="xxx" export SPRING_REDIS_USERNAME="xxx" export SPRING_REDIS_PASSWORD="xxx" ``` #### 2.3 外部配置文件 例如 `config/application-github.properties` ```properties spring.session.store-type=redis spring.redis.host=xxx spring.redis.port=xxx spring.redis.username=xxx spring.redis.password=xxx ``` ### 3. 不启用 session 共享 有以下几种方式设置,按照优先级从高到低分别为: #### 3.1 System Property ```bash -Dspring.session.store-type=none ``` #### 3.2 环境变量 ```bash export SPRING_SESSION_STORE_TYPE="none" ``` #### 3.3 外部配置文件 例如 `config/application-github.properties` ```properties spring.session.store-type=none ```
1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/docker-quick-start/sql/apolloportaldb.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloPortalDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloPortalDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table consumer # ------------------------------------------------------------ DROP TABLE IF EXISTS `Consumer`; CREATE TABLE `Consumer` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放API消费者'; # Dump of table consumeraudit # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerAudit`; CREATE TABLE `ConsumerAudit` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `Uri` varchar(1024) NOT NULL DEFAULT '' COMMENT '访问的Uri', `Method` varchar(16) NOT NULL DEFAULT '' COMMENT '访问的Method', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ConsumerId` (`ConsumerId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer审计表'; # Dump of table consumerrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerRole`; CREATE TABLE `ConsumerRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_ConsumerId_RoleId` (`ConsumerId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer和role的绑定表'; # Dump of table consumertoken # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerToken`; CREATE TABLE `ConsumerToken` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'ConsumerId', `Token` varchar(128) NOT NULL DEFAULT '' COMMENT 'token', `Expires` datetime NOT NULL DEFAULT '2099-01-01 00:00:00' COMMENT 'token失效时间', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_Token` (`Token`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer token表'; # Dump of table favorite # ------------------------------------------------------------ DROP TABLE IF EXISTS `Favorite`; CREATE TABLE `Favorite` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `UserId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '收藏的用户', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Position` int(32) NOT NULL DEFAULT '10000' COMMENT '收藏顺序', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `IX_UserId` (`UserId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='应用收藏表'; # Dump of table permission # ------------------------------------------------------------ DROP TABLE IF EXISTS `Permission`; CREATE TABLE `Permission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `PermissionType` varchar(32) NOT NULL DEFAULT '' COMMENT '权限类型', `TargetId` varchar(256) NOT NULL DEFAULT '' COMMENT '权限对象类型', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_TargetId_PermissionType` (`TargetId`(191),`PermissionType`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='permission表'; # Dump of table role # ------------------------------------------------------------ DROP TABLE IF EXISTS `Role`; CREATE TABLE `Role` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleName` varchar(256) NOT NULL DEFAULT '' COMMENT 'Role name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_RoleName` (`RoleName`(191)), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色表'; # Dump of table rolepermission # ------------------------------------------------------------ DROP TABLE IF EXISTS `RolePermission`; CREATE TABLE `RolePermission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `PermissionId` int(10) unsigned DEFAULT NULL COMMENT 'Permission Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_PermissionId` (`PermissionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和权限的绑定表'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table userrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `UserRole`; CREATE TABLE `UserRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `UserId` varchar(128) DEFAULT '' COMMENT '用户身份标识', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_UserId_RoleId` (`UserId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户和role的绑定表'; # Dump of table Users # ------------------------------------------------------------ DROP TABLE IF EXISTS `Users`; CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户登录账户', `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码', `UserDisplayName` varchar(512) NOT NULL DEFAULT 'default' COMMENT '用户名称', `Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', `Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; # Dump of table Authorities # ------------------------------------------------------------ DROP TABLE IF EXISTS `Authorities`; CREATE TABLE `Authorities` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL, `Authority` varchar(50) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.portal.envs', 'dev', '可支持的环境列表'), ('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'), ('superAdmin', 'apollo', 'Portal超级管理员'), ('api.readTimeout', '10000', 'http接口read timeout'), ('consumer.token.salt', 'someSalt', 'consumer token salt'), ('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'), ('configView.memberOnly.envs', 'dev', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔'), ('apollo.portal.meta.servers', '{}', '各环境Meta Service列表'); INSERT INTO `Users` (`Username`, `Password`, `UserDisplayName`, `Email`, `Enabled`) VALUES ('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo', 'apollo@acme.com', 1); INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user'); # Sample Data # ------------------------------------------------------------ INSERT INTO `App` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`) VALUES ('SampleApp', 'Sample App', 'TEST1', '样例部门1', 'apollo', 'apollo@acme.com'); INSERT INTO `AppNamespace` (`Name`, `AppId`, `Format`, `IsPublic`, `Comment`) VALUES ('application', 'SampleApp', 'properties', 0, 'default app namespace'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`) VALUES (1, 'CreateCluster', 'SampleApp'), (2, 'CreateNamespace', 'SampleApp'), (3, 'AssignRole', 'SampleApp'), (4, 'ModifyNamespace', 'SampleApp+application'), (5, 'ReleaseNamespace', 'SampleApp+application'); INSERT INTO `Role` (`Id`, `RoleName`) VALUES (1, 'Master+SampleApp'), (2, 'ModifyNamespace+SampleApp+application'), (3, 'ReleaseNamespace+SampleApp+application'); INSERT INTO `RolePermission` (`RoleId`, `PermissionId`) VALUES (1, 1), (1, 2), (1, 3), (2, 4), (3, 5); INSERT INTO `UserRole` (`UserId`, `RoleId`) VALUES ('apollo', 1), ('apollo', 2), ('apollo', 3); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloPortalDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloPortalDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table consumer # ------------------------------------------------------------ DROP TABLE IF EXISTS `Consumer`; CREATE TABLE `Consumer` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放API消费者'; # Dump of table consumeraudit # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerAudit`; CREATE TABLE `ConsumerAudit` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `Uri` varchar(1024) NOT NULL DEFAULT '' COMMENT '访问的Uri', `Method` varchar(16) NOT NULL DEFAULT '' COMMENT '访问的Method', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ConsumerId` (`ConsumerId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer审计表'; # Dump of table consumerrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerRole`; CREATE TABLE `ConsumerRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_ConsumerId_RoleId` (`ConsumerId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer和role的绑定表'; # Dump of table consumertoken # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerToken`; CREATE TABLE `ConsumerToken` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'ConsumerId', `Token` varchar(128) NOT NULL DEFAULT '' COMMENT 'token', `Expires` datetime NOT NULL DEFAULT '2099-01-01 00:00:00' COMMENT 'token失效时间', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_Token` (`Token`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer token表'; # Dump of table favorite # ------------------------------------------------------------ DROP TABLE IF EXISTS `Favorite`; CREATE TABLE `Favorite` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `UserId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '收藏的用户', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Position` int(32) NOT NULL DEFAULT '10000' COMMENT '收藏顺序', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `IX_UserId` (`UserId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='应用收藏表'; # Dump of table permission # ------------------------------------------------------------ DROP TABLE IF EXISTS `Permission`; CREATE TABLE `Permission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `PermissionType` varchar(32) NOT NULL DEFAULT '' COMMENT '权限类型', `TargetId` varchar(256) NOT NULL DEFAULT '' COMMENT '权限对象类型', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_TargetId_PermissionType` (`TargetId`(191),`PermissionType`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='permission表'; # Dump of table role # ------------------------------------------------------------ DROP TABLE IF EXISTS `Role`; CREATE TABLE `Role` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleName` varchar(256) NOT NULL DEFAULT '' COMMENT 'Role name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_RoleName` (`RoleName`(191)), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色表'; # Dump of table rolepermission # ------------------------------------------------------------ DROP TABLE IF EXISTS `RolePermission`; CREATE TABLE `RolePermission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `PermissionId` int(10) unsigned DEFAULT NULL COMMENT 'Permission Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_PermissionId` (`PermissionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和权限的绑定表'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table userrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `UserRole`; CREATE TABLE `UserRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `UserId` varchar(128) DEFAULT '' COMMENT '用户身份标识', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_UserId_RoleId` (`UserId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户和role的绑定表'; # Dump of table Users # ------------------------------------------------------------ DROP TABLE IF EXISTS `Users`; CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户登录账户', `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码', `UserDisplayName` varchar(512) NOT NULL DEFAULT 'default' COMMENT '用户名称', `Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', `Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; # Dump of table Authorities # ------------------------------------------------------------ DROP TABLE IF EXISTS `Authorities`; CREATE TABLE `Authorities` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL, `Authority` varchar(50) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.portal.envs', 'dev', '可支持的环境列表'), ('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'), ('superAdmin', 'apollo', 'Portal超级管理员'), ('api.readTimeout', '10000', 'http接口read timeout'), ('consumer.token.salt', 'someSalt', 'consumer token salt'), ('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'), ('configView.memberOnly.envs', 'dev', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔'), ('apollo.portal.meta.servers', '{}', '各环境Meta Service列表'); INSERT INTO `Users` (`Username`, `Password`, `UserDisplayName`, `Email`, `Enabled`) VALUES ('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo', 'apollo@acme.com', 1); INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user'); # Sample Data # ------------------------------------------------------------ INSERT INTO `App` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`) VALUES ('SampleApp', 'Sample App', 'TEST1', '样例部门1', 'apollo', 'apollo@acme.com'); INSERT INTO `AppNamespace` (`Name`, `AppId`, `Format`, `IsPublic`, `Comment`) VALUES ('application', 'SampleApp', 'properties', 0, 'default app namespace'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`) VALUES (1, 'CreateCluster', 'SampleApp'), (2, 'CreateNamespace', 'SampleApp'), (3, 'AssignRole', 'SampleApp'), (4, 'ModifyNamespace', 'SampleApp+application'), (5, 'ReleaseNamespace', 'SampleApp+application'); INSERT INTO `Role` (`Id`, `RoleName`) VALUES (1, 'Master+SampleApp'), (2, 'ModifyNamespace+SampleApp+application'), (3, 'ReleaseNamespace+SampleApp+application'); INSERT INTO `RolePermission` (`RoleId`, `PermissionId`) VALUES (1, 1), (1, 2), (1, 3), (2, 4), (3, 5); INSERT INTO `UserRole` (`UserId`, `RoleId`) VALUES ('apollo', 1), ('apollo', 2), ('apollo', 3); -- spring session (https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-mysql.sql) CREATE TABLE SPRING_SESSION ( PRIMARY_ID CHAR(36) NOT NULL, SESSION_ID CHAR(36) NOT NULL, CREATION_TIME BIGINT NOT NULL, LAST_ACCESS_TIME BIGINT NOT NULL, MAX_INACTIVE_INTERVAL INT NOT NULL, EXPIRY_TIME BIGINT NOT NULL, PRINCIPAL_NAME VARCHAR(100), CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); CREATE TABLE SPRING_SESSION_ATTRIBUTES ( SESSION_PRIMARY_ID CHAR(36) NOT NULL, ATTRIBUTE_NAME VARCHAR(200) NOT NULL, ATTRIBUTE_BYTES BLOB NOT NULL, CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/sql/apolloportaldb.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloPortalDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloPortalDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table consumer # ------------------------------------------------------------ DROP TABLE IF EXISTS `Consumer`; CREATE TABLE `Consumer` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放API消费者'; # Dump of table consumeraudit # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerAudit`; CREATE TABLE `ConsumerAudit` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `Uri` varchar(1024) NOT NULL DEFAULT '' COMMENT '访问的Uri', `Method` varchar(16) NOT NULL DEFAULT '' COMMENT '访问的Method', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ConsumerId` (`ConsumerId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer审计表'; # Dump of table consumerrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerRole`; CREATE TABLE `ConsumerRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_ConsumerId_RoleId` (`ConsumerId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer和role的绑定表'; # Dump of table consumertoken # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerToken`; CREATE TABLE `ConsumerToken` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'ConsumerId', `Token` varchar(128) NOT NULL DEFAULT '' COMMENT 'token', `Expires` datetime NOT NULL DEFAULT '2099-01-01 00:00:00' COMMENT 'token失效时间', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_Token` (`Token`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer token表'; # Dump of table favorite # ------------------------------------------------------------ DROP TABLE IF EXISTS `Favorite`; CREATE TABLE `Favorite` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `UserId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '收藏的用户', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Position` int(32) NOT NULL DEFAULT '10000' COMMENT '收藏顺序', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `IX_UserId` (`UserId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='应用收藏表'; # Dump of table permission # ------------------------------------------------------------ DROP TABLE IF EXISTS `Permission`; CREATE TABLE `Permission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `PermissionType` varchar(32) NOT NULL DEFAULT '' COMMENT '权限类型', `TargetId` varchar(256) NOT NULL DEFAULT '' COMMENT '权限对象类型', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_TargetId_PermissionType` (`TargetId`(191),`PermissionType`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='permission表'; # Dump of table role # ------------------------------------------------------------ DROP TABLE IF EXISTS `Role`; CREATE TABLE `Role` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleName` varchar(256) NOT NULL DEFAULT '' COMMENT 'Role name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_RoleName` (`RoleName`(191)), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色表'; # Dump of table rolepermission # ------------------------------------------------------------ DROP TABLE IF EXISTS `RolePermission`; CREATE TABLE `RolePermission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `PermissionId` int(10) unsigned DEFAULT NULL COMMENT 'Permission Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_PermissionId` (`PermissionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和权限的绑定表'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table userrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `UserRole`; CREATE TABLE `UserRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `UserId` varchar(128) DEFAULT '' COMMENT '用户身份标识', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_UserId_RoleId` (`UserId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户和role的绑定表'; # Dump of table Users # ------------------------------------------------------------ DROP TABLE IF EXISTS `Users`; CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户登录账户', `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码', `UserDisplayName` varchar(512) NOT NULL DEFAULT 'default' COMMENT '用户名称', `Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', `Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; # Dump of table Authorities # ------------------------------------------------------------ DROP TABLE IF EXISTS `Authorities`; CREATE TABLE `Authorities` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL, `Authority` varchar(50) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.portal.envs', 'dev', '可支持的环境列表'), ('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'), ('superAdmin', 'apollo', 'Portal超级管理员'), ('api.readTimeout', '10000', 'http接口read timeout'), ('consumer.token.salt', 'someSalt', 'consumer token salt'), ('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'), ('configView.memberOnly.envs', 'pro', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔'), ('apollo.portal.meta.servers', '{}', '各环境Meta Service列表'); INSERT INTO `Users` (`Username`, `Password`, `UserDisplayName`, `Email`, `Enabled`) VALUES ('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo', 'apollo@acme.com', 1); INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloPortalDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloPortalDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table consumer # ------------------------------------------------------------ DROP TABLE IF EXISTS `Consumer`; CREATE TABLE `Consumer` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放API消费者'; # Dump of table consumeraudit # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerAudit`; CREATE TABLE `ConsumerAudit` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `Uri` varchar(1024) NOT NULL DEFAULT '' COMMENT '访问的Uri', `Method` varchar(16) NOT NULL DEFAULT '' COMMENT '访问的Method', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ConsumerId` (`ConsumerId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer审计表'; # Dump of table consumerrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerRole`; CREATE TABLE `ConsumerRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_ConsumerId_RoleId` (`ConsumerId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer和role的绑定表'; # Dump of table consumertoken # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerToken`; CREATE TABLE `ConsumerToken` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'ConsumerId', `Token` varchar(128) NOT NULL DEFAULT '' COMMENT 'token', `Expires` datetime NOT NULL DEFAULT '2099-01-01 00:00:00' COMMENT 'token失效时间', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_Token` (`Token`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer token表'; # Dump of table favorite # ------------------------------------------------------------ DROP TABLE IF EXISTS `Favorite`; CREATE TABLE `Favorite` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `UserId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '收藏的用户', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Position` int(32) NOT NULL DEFAULT '10000' COMMENT '收藏顺序', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `IX_UserId` (`UserId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='应用收藏表'; # Dump of table permission # ------------------------------------------------------------ DROP TABLE IF EXISTS `Permission`; CREATE TABLE `Permission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `PermissionType` varchar(32) NOT NULL DEFAULT '' COMMENT '权限类型', `TargetId` varchar(256) NOT NULL DEFAULT '' COMMENT '权限对象类型', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_TargetId_PermissionType` (`TargetId`(191),`PermissionType`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='permission表'; # Dump of table role # ------------------------------------------------------------ DROP TABLE IF EXISTS `Role`; CREATE TABLE `Role` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleName` varchar(256) NOT NULL DEFAULT '' COMMENT 'Role name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_RoleName` (`RoleName`(191)), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色表'; # Dump of table rolepermission # ------------------------------------------------------------ DROP TABLE IF EXISTS `RolePermission`; CREATE TABLE `RolePermission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `PermissionId` int(10) unsigned DEFAULT NULL COMMENT 'Permission Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_PermissionId` (`PermissionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和权限的绑定表'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table userrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `UserRole`; CREATE TABLE `UserRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `UserId` varchar(128) DEFAULT '' COMMENT '用户身份标识', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_UserId_RoleId` (`UserId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户和role的绑定表'; # Dump of table Users # ------------------------------------------------------------ DROP TABLE IF EXISTS `Users`; CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户登录账户', `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码', `UserDisplayName` varchar(512) NOT NULL DEFAULT 'default' COMMENT '用户名称', `Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', `Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; # Dump of table Authorities # ------------------------------------------------------------ DROP TABLE IF EXISTS `Authorities`; CREATE TABLE `Authorities` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL, `Authority` varchar(50) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.portal.envs', 'dev', '可支持的环境列表'), ('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'), ('superAdmin', 'apollo', 'Portal超级管理员'), ('api.readTimeout', '10000', 'http接口read timeout'), ('consumer.token.salt', 'someSalt', 'consumer token salt'), ('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'), ('configView.memberOnly.envs', 'pro', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔'), ('apollo.portal.meta.servers', '{}', '各环境Meta Service列表'); INSERT INTO `Users` (`Username`, `Password`, `UserDisplayName`, `Email`, `Enabled`) VALUES ('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo', 'apollo@acme.com', 1); INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user'); -- spring session (https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-mysql.sql) CREATE TABLE SPRING_SESSION ( PRIMARY_ID CHAR(36) NOT NULL, SESSION_ID CHAR(36) NOT NULL, CREATION_TIME BIGINT NOT NULL, LAST_ACCESS_TIME BIGINT NOT NULL, MAX_INACTIVE_INTERVAL INT NOT NULL, EXPIRY_TIME BIGINT NOT NULL, PRINCIPAL_NAME VARCHAR(100), CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); CREATE TABLE SPRING_SESSION_ATTRIBUTES ( SESSION_PRIMARY_ID CHAR(36) NOT NULL, ATTRIBUTE_NAME VARCHAR(200) NOT NULL, ATTRIBUTE_BYTES BLOB NOT NULL, CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/sql/delta/v180-v190/apolloportaldb-v180-v190.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v1.8.0 to v1.9.0 Use ApolloPortalDB; ALTER TABLE `App` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `AppNamespace` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Consumer` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ConsumerRole` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ConsumerToken` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Favorite` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Permission` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Role` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `RolePermission` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ServerConfig` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `UserRole` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Users` MODIFY COLUMN `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户登录账户', ADD COLUMN `UserDisplayName` varchar(512) NOT NULL DEFAULT 'default' COMMENT '用户名称' AFTER `Password`; UPDATE `Users` SET `UserDisplayName`=`Username` WHERE `UserDisplayName` = 'default'; ALTER TABLE `Users` MODIFY COLUMN `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码'; UPDATE `Users` SET `Password` = REPLACE(`Password`, '{nonsensical}', '{placeholder}') WHERE `Password` LIKE '{nonsensical}%'; -- note: add the {bcrypt} prefix for `Users`.`Password` is not mandatory, and it may break the old version of apollo-portal while upgrading. -- 注意: 向 `Users`.`Password` 添加 {bcrypt} 是非必须操作, 并且这个操作会导致升级 apollo-portal 集群的过程中旧版的 apollo-portal 无法使用. -- UPDATE `Users` SET `Password` = CONCAT('{bcrypt}', `Password`) WHERE `Password` NOT LIKE '{%}%';
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v1.8.0 to v1.9.0 Use ApolloPortalDB; ALTER TABLE `App` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `AppNamespace` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Consumer` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ConsumerRole` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ConsumerToken` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Favorite` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Permission` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Role` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `RolePermission` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ServerConfig` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `UserRole` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Users` MODIFY COLUMN `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户登录账户', ADD COLUMN `UserDisplayName` varchar(512) NOT NULL DEFAULT 'default' COMMENT '用户名称' AFTER `Password`; UPDATE `Users` SET `UserDisplayName`=`Username` WHERE `UserDisplayName` = 'default'; ALTER TABLE `Users` MODIFY COLUMN `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码'; UPDATE `Users` SET `Password` = REPLACE(`Password`, '{nonsensical}', '{placeholder}') WHERE `Password` LIKE '{nonsensical}%'; -- note: add the {bcrypt} prefix for `Users`.`Password` is not mandatory, and it may break the old version of apollo-portal while upgrading. -- 注意: 向 `Users`.`Password` 添加 {bcrypt} 是非必须操作, 并且这个操作会导致升级 apollo-portal 集群的过程中旧版的 apollo-portal 无法使用. -- UPDATE `Users` SET `Password` = CONCAT('{bcrypt}', `Password`) WHERE `Password` NOT LIKE '{%}%'; -- spring session (https://github.com/spring-projects/spring-session/blob/faee8f1bdb8822a5653a81eba838dddf224d92d6/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-mysql.sql) CREATE TABLE SPRING_SESSION ( PRIMARY_ID CHAR(36) NOT NULL, SESSION_ID CHAR(36) NOT NULL, CREATION_TIME BIGINT NOT NULL, LAST_ACCESS_TIME BIGINT NOT NULL, MAX_INACTIVE_INTERVAL INT NOT NULL, EXPIRY_TIME BIGINT NOT NULL, PRINCIPAL_NAME VARCHAR(100), CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); CREATE TABLE SPRING_SESSION_ATTRIBUTES ( SESSION_PRIMARY_ID CHAR(36) NOT NULL, ATTRIBUTE_NAME VARCHAR(200) NOT NULL, ATTRIBUTE_BYTES BLOB NOT NULL, CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/misc/apollo-benchmark.md
很多同学关心Apollo的性能和可靠性,以下数据是采集携程内部生产环境单台机器的数据。监控工具是[Cat](https://github.com/dianping/cat)。 ### 一、测试机器配置 #### 1.1 机器配置 4C12G #### 1.2 JVM参数 ```` -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=8 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom ```` #### 1.3 JVM版本 1.8.0_60 #### 1.4 Apollo版本 0.9.0 #### 1.5 单台机器客户端连接数(客户端数) 5600 #### 1.6 集群总客户端连接数(客户端数) 10W+ ### 二、性能指标 #### 2.1 获取配置Http接口响应时间 QPS: 160 平均响应时间: 0.1ms 95线响应时间: 0.3ms 999线响应时间: 2.5ms >注:config service开启了配置缓存,更多信息可以参考[分布式部署指南中的缓存配置](zh/deployment/distributed-deployment-guide#_323-config-servicecacheenabled-是否开启配置缓存) #### 2.2 Config Server GC情况 YGC: 平均2Min一次,一次耗时300ms OGC: 平均1H一次,一次耗时380ms #### 2.3 CPU指标 LoadAverage:0.5 System CPU利用率:6% Process CPU利用率:8%
很多同学关心Apollo的性能和可靠性,以下数据是采集携程内部生产环境单台机器的数据。监控工具是[Cat](https://github.com/dianping/cat)。 ### 一、测试机器配置 #### 1.1 机器配置 4C12G #### 1.2 JVM参数 ```` -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=8 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom ```` #### 1.3 JVM版本 1.8.0_60 #### 1.4 Apollo版本 0.9.0 #### 1.5 单台机器客户端连接数(客户端数) 5600 #### 1.6 集群总客户端连接数(客户端数) 10W+ ### 二、性能指标 #### 2.1 获取配置Http接口响应时间 QPS: 160 平均响应时间: 0.1ms 95线响应时间: 0.3ms 999线响应时间: 2.5ms >注:config service开启了配置缓存,更多信息可以参考[分布式部署指南中的缓存配置](zh/deployment/distributed-deployment-guide#_323-config-servicecacheenabled-是否开启配置缓存) #### 2.2 Config Server GC情况 YGC: 平均2Min一次,一次耗时300ms OGC: 平均1H一次,一次耗时380ms #### 2.3 CPU指标 LoadAverage:0.5 System CPU利用率:6% Process CPU利用率:8%
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/flyway/portaldb/V1.1.4__delegating-password-encoder.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- Use ApolloPortalDB; ALTER TABLE `Users` MODIFY COLUMN `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码'; UPDATE `Users` SET `Password` = REPLACE(`Password`, '{nonsensical}', '{placeholder}') WHERE `Password` LIKE '{nonsensical}%';
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- Use ApolloPortalDB; ALTER TABLE `Users` MODIFY COLUMN `Password` varchar(512) NOT NULL DEFAULT 'default' COMMENT '密码'; UPDATE `Users` SET `Password` = REPLACE(`Password`, '{nonsensical}', '{placeholder}') WHERE `Password` LIKE '{nonsensical}%';
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/sql/delta/v060-v062/apolloportaldb-v060-v062.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v0.6.0 to v0.6.2 Use ApolloPortalDB; ALTER TABLE `App` DROP INDEX `NAME`; CREATE INDEX `IX_NAME` ON App (`Name`(191));
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v0.6.0 to v0.6.2 Use ApolloPortalDB; ALTER TABLE `App` DROP INDEX `NAME`; CREATE INDEX `IX_NAME` ON App (`Name`(191));
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/flyway/configdb/V1.1.2__extend_username.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo config db from v1.7.0 to v1.8.0 Use ApolloConfigDB; ALTER TABLE `App` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `AppNamespace` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Audit` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Cluster` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Commit` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `GrayReleaseRule` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Item` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Namespace` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `NamespaceLock` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Release` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ReleaseHistory` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ServerConfig` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `AccessKey` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀';
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo config db from v1.7.0 to v1.8.0 Use ApolloConfigDB; ALTER TABLE `App` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `AppNamespace` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Audit` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Cluster` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Commit` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `GrayReleaseRule` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Item` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Namespace` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `NamespaceLock` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `Release` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ReleaseHistory` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `ServerConfig` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀'; ALTER TABLE `AccessKey` MODIFY COLUMN `DataChange_CreatedBy` VARCHAR(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', MODIFY COLUMN `DataChange_LastModifiedBy` VARCHAR(64) DEFAULT '' COMMENT '最后修改人邮箱前缀';
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/application-ctrip.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ctrip: appid: 100003173 email: send: code: 37030033 template: id: 37030033 survival: duration: 5
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ctrip: appid: 100003173 email: send: code: 37030033 template: id: 37030033 survival: duration: 5
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/en/usage/dotnet-sdk-user-guide.md
TODO
TODO
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/en/deployment/distributed-deployment-guide.md
TODO
TODO
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/test/resources/application.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: application: name: apollo-configservice server: port: ${port:8080} logging: level: org.springframework.cloud: 'DEBUG' file: name: /opt/logs/${ctrip.appid}/apollo-configservice.log ctrip: appid: 100003171 eureka: instance: hostname: ${hostname:localhost} preferIpAddress: true status-page-url-path: /info health-check-url-path: /health client: serviceUrl: defaultZone: http://${eureka.instance.hostname}:8080/eureka/ healthcheck: enabled: true management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: application: name: apollo-configservice server: port: ${port:8080} logging: level: org.springframework.cloud: 'DEBUG' file: name: /opt/logs/${ctrip.appid}/apollo-configservice.log ctrip: appid: 100003171 eureka: instance: hostname: ${hostname:localhost} preferIpAddress: true status-page-url-path: /info health-check-url-path: /health client: serviceUrl: defaultZone: http://${eureka.instance.hostname}:8080/eureka/ healthcheck: enabled: true management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/sql/delta/v040-v050/apolloportaldb-v040-v050.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v0.4.0 to v0.5.0 Use ApolloPortalDB; ALTER TABLE `AppNamespace` ADD KEY `IX_AppId` (`AppId`); ALTER TABLE `App` DROP INDEX `Name`; ALTER TABLE `App` ADD KEY `Name` (`Name`);
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v0.4.0 to v0.5.0 Use ApolloPortalDB; ALTER TABLE `AppNamespace` ADD KEY `IX_AppId` (`AppId`); ALTER TABLE `App` DROP INDEX `Name`; ALTER TABLE `App` ADD KEY `Name` (`Name`);
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/en/faq/common-issues-in-deployment-and-development-phase.md
TODO
TODO
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./.github/ISSUE_TEMPLATE/feature_request_zh.md
--- name: 请求特性 about: 给这个项目提一些建议、想法 title: '' labels: '' assignees: '' --- **你的特性请求和某个问题有关吗?请描述** 清晰简洁地描述这个问题是什么。即,当碰到xxx时,总是感觉很麻烦 **清晰简洁地描述一下你希望的解决方案** **清晰简洁地描述一下这个特性的备选方案** **其它背景** 在这里添加和这个特性请求有关的背景说明、截图
--- name: 请求特性 about: 给这个项目提一些建议、想法 title: '' labels: '' assignees: '' --- **你的特性请求和某个问题有关吗?请描述** 清晰简洁地描述这个问题是什么。即,当碰到xxx时,总是感觉很麻烦 **清晰简洁地描述一下你希望的解决方案** **清晰简洁地描述一下这个特性的备选方案** **其它背景** 在这里添加和这个特性请求有关的背景说明、截图
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/test/resources/data.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'application', false); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'fx.apollo.config', true); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'application', false); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'fx.apollo.admin', true); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'application', false); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'fx.apollo.portal', true); INSERT INTO AppNamespace (AppID, Name, IsPublic) VALUES ('fxhermesproducer', 'fx.hermes.producer', true);
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'application', false); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003171', 'fx.apollo.config', true); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'application', false); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003172', 'fx.apollo.admin', true); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'application', false); INSERT INTO AppNamespace (AppId, Name, IsPublic) VALUES ('100003173', 'fx.apollo.portal', true); INSERT INTO AppNamespace (AppID, Name, IsPublic) VALUES ('fxhermesproducer', 'fx.hermes.producer', true);
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/community/team.md
# Apollo 团队 Apollo 团队由 Member 和 Contributor 组成。Member 可以直接访问 Apollo 项目的源代码并基于代码库积极演进。Contributor 通过向 Member 提交补丁和建议来改善项目,项目的贡献者数量是没有限制的。无论是进行小规模的清理,提交新的功能或其它形式的贡献,都将受到极大的赞赏。 有关社区治理模型的更多信息,请参考[GOVERNANCE.md](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md)。 ## Member Member 包括 PMC 成员和 Committer,该列表按字母顺序排列。 ### Project Management Committee(PMC) | Github ID | Name | Organization | | ---------- | ---------- | ------------ | | JaredTan95 | Jared Tan | DaoCloud | | kezhenxu94 | Zhenxu Ke | Tetrate | | nobodyiam | Jason Song | Ant Group | | zouyx | Joe Zou | Shein | ### Committer | Github ID | Name | Organization | | ----------- | ------------- | ------------ | | Anilople | Xiaoquan Wang | Some Bank | | klboke | Kailing Chen | TapTap | | lepdou | Le Zhang | Ant Group | | nisiyong | Stephen Ni | Qihoo 360 | | pengweiqhca | Wei Peng | Tuhu | | vdisk-group | Lvqiu Ye | Hundsun | ## Contributor ### Apollo 主仓库 <a href="https://github.com/ctripcorp/apollo/graphs/contributors"><img src="https://opencollective.com/apollo/contributors.svg?width=880&button=false" /></a> ### apollo.net <a href="https://github.com/ctripcorp/apollo.net/graphs/contributors"><img src="https://opencollective.com/apollonet/contributors.svg?width=880&button=false" /></a> ## **如何成为提交者** 请参考 [How to become a Committer](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md#how-to-become-a-committer).
# Apollo 团队 Apollo 团队由 Member 和 Contributor 组成。Member 可以直接访问 Apollo 项目的源代码并基于代码库积极演进。Contributor 通过向 Member 提交补丁和建议来改善项目,项目的贡献者数量是没有限制的。无论是进行小规模的清理,提交新的功能或其它形式的贡献,都将受到极大的赞赏。 有关社区治理模型的更多信息,请参考[GOVERNANCE.md](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md)。 ## Member Member 包括 PMC 成员和 Committer,该列表按字母顺序排列。 ### Project Management Committee(PMC) | Github ID | Name | Organization | | ---------- | ---------- | ------------ | | JaredTan95 | Jared Tan | DaoCloud | | kezhenxu94 | Zhenxu Ke | Tetrate | | nobodyiam | Jason Song | Ant Group | | zouyx | Joe Zou | Shein | ### Committer | Github ID | Name | Organization | | ----------- | ------------- | ------------ | | Anilople | Xiaoquan Wang | Some Bank | | klboke | Kailing Chen | TapTap | | lepdou | Le Zhang | Ant Group | | nisiyong | Stephen Ni | Qihoo 360 | | pengweiqhca | Wei Peng | Tuhu | | vdisk-group | Lvqiu Ye | Hundsun | ## Contributor ### Apollo 主仓库 <a href="https://github.com/ctripcorp/apollo/graphs/contributors"><img src="https://opencollective.com/apollo/contributors.svg?width=880&button=false" /></a> ### apollo.net <a href="https://github.com/ctripcorp/apollo.net/graphs/contributors"><img src="https://opencollective.com/apollonet/contributors.svg?width=880&button=false" /></a> ## **如何成为提交者** 请参考 [How to become a Committer](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md#how-to-become-a-committer).
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/flyway/portaldb/V1.0.0__initialization.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloPortalDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloPortalDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(32) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table consumer # ------------------------------------------------------------ DROP TABLE IF EXISTS `Consumer`; CREATE TABLE `Consumer` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放API消费者'; # Dump of table consumeraudit # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerAudit`; CREATE TABLE `ConsumerAudit` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `Uri` varchar(1024) NOT NULL DEFAULT '' COMMENT '访问的Uri', `Method` varchar(16) NOT NULL DEFAULT '' COMMENT '访问的Method', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ConsumerId` (`ConsumerId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer审计表'; # Dump of table consumerrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerRole`; CREATE TABLE `ConsumerRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_ConsumerId_RoleId` (`ConsumerId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer和role的绑定表'; # Dump of table consumertoken # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerToken`; CREATE TABLE `ConsumerToken` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'ConsumerId', `Token` varchar(128) NOT NULL DEFAULT '' COMMENT 'token', `Expires` datetime NOT NULL DEFAULT '2099-01-01 00:00:00' COMMENT 'token失效时间', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_Token` (`Token`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer token表'; # Dump of table favorite # ------------------------------------------------------------ DROP TABLE IF EXISTS `Favorite`; CREATE TABLE `Favorite` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `UserId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '收藏的用户', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Position` int(32) NOT NULL DEFAULT '10000' COMMENT '收藏顺序', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `IX_UserId` (`UserId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='应用收藏表'; # Dump of table permission # ------------------------------------------------------------ DROP TABLE IF EXISTS `Permission`; CREATE TABLE `Permission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `PermissionType` varchar(32) NOT NULL DEFAULT '' COMMENT '权限类型', `TargetId` varchar(256) NOT NULL DEFAULT '' COMMENT '权限对象类型', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_TargetId_PermissionType` (`TargetId`(191),`PermissionType`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='permission表'; # Dump of table role # ------------------------------------------------------------ DROP TABLE IF EXISTS `Role`; CREATE TABLE `Role` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleName` varchar(256) NOT NULL DEFAULT '' COMMENT 'Role name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_RoleName` (`RoleName`(191)), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色表'; # Dump of table rolepermission # ------------------------------------------------------------ DROP TABLE IF EXISTS `RolePermission`; CREATE TABLE `RolePermission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `PermissionId` int(10) unsigned DEFAULT NULL COMMENT 'Permission Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_PermissionId` (`PermissionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和权限的绑定表'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table userrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `UserRole`; CREATE TABLE `UserRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `UserId` varchar(128) DEFAULT '' COMMENT '用户身份标识', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_UserId_RoleId` (`UserId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户和role的绑定表'; # Dump of table Users # ------------------------------------------------------------ DROP TABLE IF EXISTS `Users`; CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户名', `Password` varchar(64) NOT NULL DEFAULT 'default' COMMENT '密码', `Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', `Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; # Dump of table Authorities # ------------------------------------------------------------ DROP TABLE IF EXISTS `Authorities`; CREATE TABLE `Authorities` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL, `Authority` varchar(50) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.portal.envs', 'dev', '可支持的环境列表'), ('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'), ('superAdmin', 'apollo', 'Portal超级管理员'), ('api.readTimeout', '10000', 'http接口read timeout'), ('consumer.token.salt', 'someSalt', 'consumer token salt'), ('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'), ('configView.memberOnly.envs', 'pro', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔'); INSERT INTO `Users` (`Username`, `Password`, `Email`, `Enabled`) VALUES ('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo@acme.com', 1); INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloPortalDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloPortalDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(32) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table consumer # ------------------------------------------------------------ DROP TABLE IF EXISTS `Consumer`; CREATE TABLE `Consumer` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开放API消费者'; # Dump of table consumeraudit # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerAudit`; CREATE TABLE `ConsumerAudit` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `Uri` varchar(1024) NOT NULL DEFAULT '' COMMENT '访问的Uri', `Method` varchar(16) NOT NULL DEFAULT '' COMMENT '访问的Method', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ConsumerId` (`ConsumerId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer审计表'; # Dump of table consumerrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerRole`; CREATE TABLE `ConsumerRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'Consumer Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_ConsumerId_RoleId` (`ConsumerId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer和role的绑定表'; # Dump of table consumertoken # ------------------------------------------------------------ DROP TABLE IF EXISTS `ConsumerToken`; CREATE TABLE `ConsumerToken` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `ConsumerId` int(11) unsigned DEFAULT NULL COMMENT 'ConsumerId', `Token` varchar(128) NOT NULL DEFAULT '' COMMENT 'token', `Expires` datetime NOT NULL DEFAULT '2099-01-01 00:00:00' COMMENT 'token失效时间', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_Token` (`Token`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='consumer token表'; # Dump of table favorite # ------------------------------------------------------------ DROP TABLE IF EXISTS `Favorite`; CREATE TABLE `Favorite` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `UserId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '收藏的用户', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Position` int(32) NOT NULL DEFAULT '10000' COMMENT '收藏顺序', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `IX_UserId` (`UserId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='应用收藏表'; # Dump of table permission # ------------------------------------------------------------ DROP TABLE IF EXISTS `Permission`; CREATE TABLE `Permission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `PermissionType` varchar(32) NOT NULL DEFAULT '' COMMENT '权限类型', `TargetId` varchar(256) NOT NULL DEFAULT '' COMMENT '权限对象类型', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_TargetId_PermissionType` (`TargetId`(191),`PermissionType`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='permission表'; # Dump of table role # ------------------------------------------------------------ DROP TABLE IF EXISTS `Role`; CREATE TABLE `Role` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleName` varchar(256) NOT NULL DEFAULT '' COMMENT 'Role name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_RoleName` (`RoleName`(191)), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色表'; # Dump of table rolepermission # ------------------------------------------------------------ DROP TABLE IF EXISTS `RolePermission`; CREATE TABLE `RolePermission` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `PermissionId` int(10) unsigned DEFAULT NULL COMMENT 'Permission Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_PermissionId` (`PermissionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和权限的绑定表'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table userrole # ------------------------------------------------------------ DROP TABLE IF EXISTS `UserRole`; CREATE TABLE `UserRole` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `UserId` varchar(128) DEFAULT '' COMMENT '用户身份标识', `RoleId` int(10) unsigned DEFAULT NULL COMMENT 'Role Id', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(32) DEFAULT '' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(32) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_RoleId` (`RoleId`), KEY `IX_UserId_RoleId` (`UserId`,`RoleId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户和role的绑定表'; # Dump of table Users # ------------------------------------------------------------ DROP TABLE IF EXISTS `Users`; CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户名', `Password` varchar(64) NOT NULL DEFAULT 'default' COMMENT '密码', `Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', `Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; # Dump of table Authorities # ------------------------------------------------------------ DROP TABLE IF EXISTS `Authorities`; CREATE TABLE `Authorities` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL, `Authority` varchar(50) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.portal.envs', 'dev', '可支持的环境列表'), ('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'), ('superAdmin', 'apollo', 'Portal超级管理员'), ('api.readTimeout', '10000', 'http接口read timeout'), ('consumer.token.salt', 'someSalt', 'consumer token salt'), ('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'), ('configView.memberOnly.envs', 'pro', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔'); INSERT INTO `Users` (`Username`, `Password`, `Email`, `Enabled`) VALUES ('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo@acme.com', 1); INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/test/resources/application.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # server: port: 8070 spring: application: name: apollo-portal logging: level: org.springframework.cloud: 'DEBUG' file: name: /opt/logs/100003173/apollo-portal.log apollo: portal: envs: local management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # server: port: 8070 spring: application: name: apollo-portal logging: level: org.springframework.cloud: 'DEBUG' file: name: /opt/logs/100003173/apollo-portal.log apollo: portal: envs: local management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/flyway/portaldb/V1.1.1__extend_appId.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v1.7.0 to v1.8.0 Use ApolloPortalDB; alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v1.7.0 to v1.8.0 Use ApolloPortalDB; alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/sql/delta/v170-v180/apolloconfigdb-v170-v180.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo config db from v1.7.0 to v1.8.0 Use ApolloConfigDB; alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id'; alter table `Cluster` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id'; alter table `GrayReleaseRule` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id'; alter table `Instance` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id'; alter table `InstanceConfig` change ConfigAppId ConfigAppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id'; alter table `ReleaseHistory` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo config db from v1.7.0 to v1.8.0 Use ApolloConfigDB; alter table `AppNamespace` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id'; alter table `Cluster` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id'; alter table `GrayReleaseRule` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id'; alter table `Instance` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id'; alter table `InstanceConfig` change ConfigAppId ConfigAppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id'; alter table `ReleaseHistory` change AppId AppId varchar(64) NOT NULL DEFAULT 'default' COMMENT 'app id';
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/test/resources/spring/yaml/case6.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # apollo.test.testBean: true
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # apollo.test.testBean: true
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/test/resources/integration-test/test-release-public-default-override.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations) VALUES (994, 'TEST-RELEASE-KEY5', 'INTEGRATION-TEST-DEFAULT-OVERRIDE-PUBLIC','First Release','someAppId', 'default', 'somePublicNamespace', '{"k1":"override-v1"}');
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO RELEASE (id, ReleaseKey, Name, Comment, AppId, ClusterName, NamespaceName, Configurations) VALUES (994, 'TEST-RELEASE-KEY5', 'INTEGRATION-TEST-DEFAULT-OVERRIDE-PUBLIC','First Release','someAppId', 'default', 'somePublicNamespace', '{"k1":"override-v1"}');
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-assembly/src/test/resources/application.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: profiles: active: local
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: profiles: active: local
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/test/resources/sql/clean.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- DELETE FROM AccessKey; DELETE FROM App; DELETE FROM AppNamespace; DELETE FROM Cluster; DELETE FROM namespace; DELETE FROM grayreleaserule; DELETE FROM release; DELETE FROM item; DELETE FROM releasemessage; DELETE FROM releasehistory; DELETE FROM namespacelock; DELETE FROM `commit`;
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- DELETE FROM AccessKey; DELETE FROM App; DELETE FROM AppNamespace; DELETE FROM Cluster; DELETE FROM namespace; DELETE FROM grayreleaserule; DELETE FROM release; DELETE FROM item; DELETE FROM releasemessage; DELETE FROM releasehistory; DELETE FROM namespacelock; DELETE FROM `commit`;
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/deployment/distributed-deployment-guide.md
本文档介绍了如何按照分布式部署的方式编译、打包、部署Apollo配置中心,从而可以在开发、测试、生产等环境分别部署运行。 > 如果只是需要在本地快速部署试用Apollo的话,可以参考[Quick Start](zh/deployment/quick-start) # &nbsp; # 一、准备工作 ## 1.1 运行时环境 ### 1.1.1 OS 服务端基于Spring Boot,启动脚本理论上支持所有Linux发行版,建议[CentOS 7](https://www.centos.org/)。 ### 1.1.2 Java * Apollo服务端:1.8+ * Apollo客户端:1.7+ 由于需要同时运行服务端和客户端,所以建议安装Java 1.8+。 >对于Apollo客户端,运行时环境只需要1.7+即可。 >注:对于Apollo客户端,如果有需要的话,可以做少量代码修改来降级到Java 1.6,详细信息可以参考[Issue 483](https://github.com/ctripcorp/apollo/issues/483) 在配置好后,可以通过如下命令检查: ```sh java -version ``` 样例输出: ```sh java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode) ``` ## 1.2 MySQL * 版本要求:5.6.5+ Apollo的表结构对`timestamp`使用了多个default声明,所以需要5.6.5以上版本。 连接上MySQL后,可以通过如下命令检查: ```sql SHOW VARIABLES WHERE Variable_name = 'version'; ``` | Variable_name | Value | |---------------|--------| | version | 5.7.11 | > 注1:MySQL版本可以降级到5.5,详见[mysql 依赖降级讨论](https://github.com/ctripcorp/apollo/issues/481)。 > 注2:如果希望使用Oracle的话,可以参考[vanpersl](https://github.com/vanpersl)在Apollo 0.8.0基础上开发的[Oracle适配代码](https://github.com/ctripcorp/apollo/compare/v0.8.0...vanpersl:db-oracle),Oracle版本为10.2.0.1.0。 > 注3:如果希望使用Postgres的话,可以参考[oaksharks](https://github.com/oaksharks)在Apollo 0.9.1基础上开发的[Pg适配代码](https://github.com/oaksharks/apollo/compare/ac10768ee2e11c488523ca0e845984f6f71499ac...oaksharks:pg),Postgres的版本为9.3.20,也可以参考[xiao0yy](https://github.com/xiao0yy)在Apollo 0.10.2基础上开发的[Pg适配代码](https://github.com/ctripcorp/apollo/issues/1293),Postgres的版本为9.5。 ## 1.3 环境 分布式部署需要事先确定部署的环境以及部署方式。 Apollo目前支持以下环境: * DEV * 开发环境 * FAT * 测试环境,相当于alpha环境(功能测试) * UAT * 集成环境,相当于beta环境(回归测试) * PRO * 生产环境 > 如果希望添加自定义的环境名称,具体步骤可以参考[Portal如何增加环境](zh/faq/common-issues-in-deployment-and-development-phase?id=_4-portal如何增加环境?) 以ctrip为例,我们的部署策略如下: ![Deployment](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-deployment.png) * Portal部署在生产环境的机房,通过它来直接管理FAT、UAT、PRO等环境的配置 * Meta Server、Config Service和Admin Service在每个环境都单独部署,使用独立的数据库 * Meta Server、Config Service和Admin Service在生产环境部署在两个机房,实现双活 * Meta Server和Config Service部署在同一个JVM进程内,Admin Service部署在同一台服务器的另一个JVM进程内 另外也可以参考下[@lyliyongblue](https://github.com/lyliyongblue) 贡献的样例部署图(建议右键新窗口打开看大图): ![Deployment](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/lyliyongblue-apollo-deployment.png) ## 1.4 网络策略 分布式部署的时候,`apollo-configservice`和`apollo-adminservice`需要把自己的IP和端口注册到Meta Server(apollo-configservice本身)。 Apollo客户端和Portal会从Meta Server获取服务的地址(IP+端口),然后通过服务地址直接访问。 需要注意的是,`apollo-configservice`和`apollo-adminservice`是基于内网可信网络设计的,所以出于安全考虑,**请不要将`apollo-configservice`和`apollo-adminservice`直接暴露在公网**。 所以如果实际部署的机器有多块网卡(如docker),或者存在某些网卡的IP是Apollo客户端和Portal无法访问的(如网络安全限制),那么我们就需要在`apollo-configservice`和`apollo-adminservice`中做相关配置来解决连通性问题。 ### 1.4.1 忽略某些网卡 可以分别修改`apollo-configservice`和`apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会把`docker0`和`veth`开头的网卡在注册到Eureka时忽略掉。 JVM System Property示例: ```properties -Dspring.cloud.inetutils.ignoredInterfaces[0]=docker0 -Dspring.cloud.inetutils.ignoredInterfaces[1]=veth.* ``` OS Environment Variable示例: ```properties SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[0]=docker0 SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[1]=veth.* ``` ### 1.4.2 指定要注册的IP 可以分别修改`apollo-configservice`和`apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会指定注册的IP为`1.2.3.4`。 JVM System Property示例: ```properties -Deureka.instance.ip-address=1.2.3.4 ``` OS Environment Variable示例: ```properties EUREKA_INSTANCE_IP_ADDRESS=1.2.3.4 ``` ### 1.4.3 指定要注册的URL 可以分别修改`apollo-configservice`和`apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会指定注册的URL为`http://1.2.3.4:8080`。 JVM System Property示例: ```properties -Deureka.instance.homePageUrl=http://1.2.3.4:8080 -Deureka.instance.preferIpAddress=false ``` OS Environment Variable示例: ```properties EUREKA_INSTANCE_HOME_PAGE_URL=http://1.2.3.4:8080 EUREKA_INSTANCE_PREFER_IP_ADDRESS=false ``` ### 1.4.4 直接指定apollo-configservice地址 如果Apollo部署在公有云上,本地开发环境无法连接,但又需要做开发测试的话,客户端可以升级到0.11.0版本及以上,然后配置[跳过Apollo Meta Server服务发现](zh/usage/java-sdk-user-guide#_1222-跳过apollo-meta-server服务发现) # 二、部署步骤 部署步骤总体还是比较简单的,Apollo的唯一依赖是数据库,所以需要首先把数据库准备好,然后根据实际情况,选择不同的部署方式: > [@lingjiaju](https://github.com/lingjiaju)录制了一系列Apollo快速上手视频,如果看文档觉得略繁琐的话,不妨可以先看一下他的[视频教程](https://pan.baidu.com/s/1blv87EOZS77NWT8Amkijkw#list/path=%2F)。 > 如果部署过程中遇到了问题,可以参考[部署&开发遇到的常见问题](zh/faq/common-issues-in-deployment-and-development-phase),一般都能找到答案。 ## 2.1 创建数据库 Apollo服务端共需要两个数据库:`ApolloPortalDB`和`ApolloConfigDB`,我们把数据库、表的创建和样例数据都分别准备了sql文件,只需要导入数据库即可。 需要注意的是ApolloPortalDB只需要在生产环境部署一个即可,而ApolloConfigDB需要在每个环境部署一套,如fat、uat和pro分别部署3套ApolloConfigDB。 > 注意:如果你本地已经创建过Apollo数据库,请注意备份数据。我们准备的sql文件会清空Apollo相关的表。 ### 2.1.1 创建ApolloPortalDB 可以根据实际情况选择通过手动导入SQL或是通过[Flyway](https://flywaydb.org/)自动导入SQL创建。 #### 2.1.1.1 手动导入SQL创建 通过各种MySQL客户端导入[apolloportaldb.sql](https://github.com/ctripcorp/apollo/blob/master/scripts/sql/apolloportaldb.sql)即可。 以MySQL原生客户端为例: ```sql source /your_local_path/scripts/sql/apolloportaldb.sql ``` #### 2.1.1.2 通过Flyway导入SQL创建 > 需要1.3.0及以上版本 1. 根据实际情况修改[flyway-portaldb.properties](https://github.com/ctripcorp/apollo/blob/master/scripts/flyway/flyway-portaldb.properties)中的`flyway.user`、`flyway.password`和`flyway.url`配置 2. 在apollo项目根目录下执行`mvn -N -Pportaldb flyway:migrate` #### 2.1.1.3 验证 导入成功后,可以通过执行以下sql语句来验证: ```sql select `Id`, `Key`, `Value`, `Comment` from `ApolloPortalDB`.`ServerConfig` limit 1; ``` | Id | Key | Value | Comment | |----|--------------------|-------|------------------| | 1 | apollo.portal.envs | dev | 可支持的环境列表 | > 注:ApolloPortalDB只需要在生产环境部署一个即可 ### 2.1.2 创建ApolloConfigDB 可以根据实际情况选择通过手动导入SQL或是通过[Flyway](https://flywaydb.org/)自动导入SQL创建。 #### 2.1.2.1 手动导入SQL 通过各种MySQL客户端导入[apolloconfigdb.sql](https://github.com/ctripcorp/apollo/blob/master/scripts/sql/apolloconfigdb.sql)即可。 以MySQL原生客户端为例: ```sql source /your_local_path/scripts/sql/apolloconfigdb.sql ``` #### 2.1.2.2 通过Flyway导入SQL > 需要1.3.0及以上版本 1. 根据实际情况修改[flyway-configdb.properties](https://github.com/ctripcorp/apollo/blob/master/scripts/flyway/flyway-configdb.properties)中的`flyway.user`、`flyway.password`和`flyway.url`配置 2. 在apollo项目根目录下执行`mvn -N -Pconfigdb flyway:migrate` #### 2.1.2.3 验证 导入成功后,可以通过执行以下sql语句来验证: ```sql select `Id`, `Key`, `Value`, `Comment` from `ApolloConfigDB`.`ServerConfig` limit 1; ``` | Id | Key | Value | Comment | |----|--------------------|-------------------------------|---------------| | 1 | eureka.service.url | http://127.0.0.1:8080/eureka/ | Eureka服务Url | > 注:ApolloConfigDB需要在每个环境部署一套,如fat、uat和pro分别部署3套ApolloConfigDB #### 2.1.2.4 从别的环境导入ApolloConfigDB的项目数据 如果是全新部署的Apollo配置中心,请忽略此步。 如果不是全新部署的Apollo配置中心,比如已经使用了一段时间,这时在Apollo配置中心已经创建了不少项目以及namespace等,那么在新环境中的ApolloConfigDB中需要从其它正常运行的环境中导入必要的项目数据。 主要涉及ApolloConfigDB的下面4张表,下面同时附上需要导入的数据查询语句: 1. App * 导入全部的App * 如:insert into `新环境的ApolloConfigDB`.`App` select * from `其它环境的ApolloConfigDB`.`App` where `IsDeleted` = 0; 2. AppNamespace * 导入全部的AppNamespace * 如:insert into `新环境的ApolloConfigDB`.`AppNamespace` select * from `其它环境的ApolloConfigDB`.`AppNamespace` where `IsDeleted` = 0; 3. Cluster * 导入默认的default集群 * 如:insert into `新环境的ApolloConfigDB`.`Cluster` select * from `其它环境的ApolloConfigDB`.`Cluster` where `Name` = 'default' and `IsDeleted` = 0; 4. Namespace * 导入默认的default集群中的namespace * 如:insert into `新环境的ApolloConfigDB`.`Namespace` select * from `其它环境的ApolloConfigDB`.`Namespace` where `ClusterName` = 'default' and `IsDeleted` = 0; 同时也别忘了通知用户在新的环境给自己的项目设置正确的配置信息,尤其是一些影响面比较大的公共namespace配置。 > 如果是为正在运行的环境迁移数据,建议迁移完重启一下config service,因为config service中有appnamespace的缓存数据 ### 2.1.3 调整服务端配置 Apollo自身的一些配置是放在数据库里面的,所以需要针对实际情况做一些调整,具体参数说明请参考[三、服务端配置说明](#三、服务端配置说明)。 大部分配置可以先使用默认值,不过 [apollo.portal.envs](#_311-apolloportalenvs-可支持的环境列表) 和 [eureka.service.url](#_321-eurekaserviceurl-eureka服务url) 请务必配置正确后再进行下面的部署步骤。 ## 2.2 虚拟机/物理机部署 ### 2.2.1 获取安装包 可以通过两种方式获取安装包: 1. 直接下载安装包 * 从[GitHub Release](https://github.com/ctripcorp/apollo/releases)页面下载预先打好的安装包 * 如果对Apollo的代码没有定制需求,建议使用这种方式,可以省去本地打包的过程 2. 通过源码构建 * 从[GitHub Release](https://github.com/ctripcorp/apollo/releases)页面下载Source code包或直接clone[源码](https://github.com/ctripcorp/apollo)后在本地构建 * 如果需要对Apollo的做定制开发,需要使用这种方式 #### 2.2.1.1 直接下载安装包 ##### 2.2.1.1.1 获取apollo-configservice、apollo-adminservice、apollo-portal安装包 从[GitHub Release](https://github.com/ctripcorp/apollo/releases)页面下载最新版本的`apollo-configservice-x.x.x-github.zip`、`apollo-adminservice-x.x.x-github.zip`和`apollo-portal-x.x.x-github.zip`即可。 ##### 2.2.1.1.2 配置数据库连接信息 Apollo服务端需要知道如何连接到你前面创建的数据库,数据库连接串信息位于上一步下载的压缩包中的`config/application-github.properties`中。 ###### 2.2.1.1.2.1 配置apollo-configservice的数据库连接信息 1. 解压`apollo-configservice-x.x.x-github.zip` 2. 用程序员专用编辑器(如vim,notepad++,sublime等)打开`config`目录下的`application-github.properties`文件 3. 填写正确的ApolloConfigDB数据库连接串信息,注意用户名和密码后面不要有空格! 4. 修改完的效果如下: ```properties # DataSource spring.datasource.url = jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 spring.datasource.username = someuser spring.datasource.password = somepwd ``` > 注:由于ApolloConfigDB在每个环境都有部署,所以对不同的环境config-service需要配置对应环境的数据库参数 ###### 2.2.1.1.2.2 配置apollo-adminservice的数据库连接信息 1. 解压`apollo-adminservice-x.x.x-github.zip` 2. 用程序员专用编辑器(如vim,notepad++,sublime等)打开`config`目录下的`application-github.properties`文件 3. 填写正确的ApolloConfigDB数据库连接串信息,注意用户名和密码后面不要有空格! 4. 修改完的效果如下: ```properties # DataSource spring.datasource.url = jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 spring.datasource.username = someuser spring.datasource.password = somepwd ``` > 注:由于ApolloConfigDB在每个环境都有部署,所以对不同的环境admin-service需要配置对应环境的数据库参数 ###### 2.2.1.1.2.3 配置apollo-portal的数据库连接信息 1. 解压`apollo-portal-x.x.x-github.zip` 2. 用程序员专用编辑器(如vim,notepad++,sublime等)打开`config`目录下的`application-github.properties`文件 3. 填写正确的ApolloPortalDB数据库连接串信息,注意用户名和密码后面不要有空格! 4. 修改完的效果如下: ```properties # DataSource spring.datasource.url = jdbc:mysql://localhost:3306/ApolloPortalDB?useSSL=false&characterEncoding=utf8 spring.datasource.username = someuser spring.datasource.password = somepwd ``` ###### 2.2.1.1.2.4 配置apollo-portal的meta service信息 Apollo Portal需要在不同的环境访问不同的meta service(apollo-configservice)地址,所以我们需要在配置中提供这些信息。默认情况下,meta service和config service是部署在同一个JVM进程,所以meta service的地址就是config service的地址。 > 对于1.6.0及以上版本,可以通过ApolloPortalDB.ServerConfig中的配置项来配置Meta Service地址,详见[apollo.portal.meta.servers - 各环境Meta Service列表](#_312-apolloportalmetaservers-各环境meta-service列表) 使用程序员专用编辑器(如vim,notepad++,sublime等)打开`apollo-portal-x.x.x-github.zip`中`config`目录下的`apollo-env.properties`文件。 假设DEV的apollo-configservice未绑定域名,地址是1.1.1.1:8080,FAT的apollo-configservice绑定了域名apollo.fat.xxx.com,UAT的apollo-configservice绑定了域名apollo.uat.xxx.com,PRO的apollo-configservice绑定了域名apollo.xxx.com,那么可以如下修改各环境meta service服务地址,格式为`${env}.meta=http://${config-service-url:port}`,如果某个环境不需要,也可以直接删除对应的配置项(如lpt.meta): ```sh dev.meta=http://1.1.1.1:8080 fat.meta=http://apollo.fat.xxx.com uat.meta=http://apollo.uat.xxx.com pro.meta=http://apollo.xxx.com ``` 除了通过`apollo-env.properties`方式配置meta service以外,apollo也支持在运行时指定meta service(优先级比`apollo-env.properties`高): 1. 通过Java System Property `${env}_meta` * 可以通过Java的System Property `${env}_meta`来指定 * 如`java -Ddev_meta=http://config-service-url -jar xxx.jar` * 也可以通过程序指定,如`System.setProperty("dev_meta", "http://config-service-url");` 2. 通过操作系统的System Environment`${ENV}_META` * 如`DEV_META=http://config-service-url` * 注意key为全大写,且中间是`_`分隔 >注1: 为了实现meta service的高可用,推荐通过SLB(Software Load Balancer)做动态负载均衡 >注2: meta service地址也可以填入IP,0.11.0版本之前只支持填入一个IP。从0.11.0版本开始支持填入以逗号分隔的多个地址([PR #1214](https://github.com/ctripcorp/apollo/pull/1214)),如`http://1.1.1.1:8080,http://2.2.2.2:8080`,不过生产环境还是建议使用域名(走slb),因为机器扩容、缩容等都可能导致IP列表的变化。 #### 2.2.1.2 通过源码构建 ##### 2.2.1.2.1 配置数据库连接信息 Apollo服务端需要知道如何连接到你前面创建的数据库,所以需要编辑[scripts/build.sh](https://github.com/ctripcorp/apollo/blob/master/scripts/build.sh),修改ApolloPortalDB和ApolloConfigDB相关的数据库连接串信息。 > 注意:填入的用户需要具备对ApolloPortalDB和ApolloConfigDB数据的读写权限。 ```sh #apollo config db info apollo_config_db_url=jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 apollo_config_db_username=用户名 apollo_config_db_password=密码(如果没有密码,留空即可) # apollo portal db info apollo_portal_db_url=jdbc:mysql://localhost:3306/ApolloPortalDB?useSSL=false&characterEncoding=utf8 apollo_portal_db_username=用户名 apollo_portal_db_password=密码(如果没有密码,留空即可) ``` > 注1:由于ApolloConfigDB在每个环境都有部署,所以对不同的环境config-service和admin-service需要使用不同的数据库参数打不同的包,portal只需要打一次包即可 > 注2:如果不想config-service和admin-service每个环境打一个包的话,也可以通过运行时传入数据库连接串信息实现,具体可以参考 [Issue 869](https://github.com/ctripcorp/apollo/issues/869) > 注3:每个环境都需要独立部署一套config-service、admin-service和ApolloConfigDB ##### 2.2.1.2.2 配置各环境meta service地址 Apollo Portal需要在不同的环境访问不同的meta service(apollo-configservice)地址,所以需要在打包时提供这些信息。 假设DEV的apollo-configservice未绑定域名,地址是1.1.1.1:8080,FAT的apollo-configservice绑定了域名apollo.fat.xxx.com,UAT的apollo-configservice绑定了域名apollo.uat.xxx.com,PRO的apollo-configservice绑定了域名apollo.xxx.com,那么编辑[scripts/build.sh](https://github.com/ctripcorp/apollo/blob/master/scripts/build.sh),如下修改各环境meta service服务地址,格式为`${env}_meta=http://${config-service-url:port}`,如果某个环境不需要,也可以直接删除对应的配置项: ```sh dev_meta=http://1.1.1.1:8080 fat_meta=http://apollo.fat.xxx.com uat_meta=http://apollo.uat.xxx.com pro_meta=http://apollo.xxx.com META_SERVERS_OPTS="-Ddev_meta=$dev_meta -Dfat_meta=$fat_meta -Duat_meta=$uat_meta -Dpro_meta=$pro_meta" ``` 除了在打包时配置meta service以外,apollo也支持在运行时指定meta service: 1. 通过Java System Property `${env}_meta` * 可以通过Java的System Property `${env}_meta`来指定 * 如`java -Ddev_meta=http://config-service-url -jar xxx.jar` * 也可以通过程序指定,如`System.setProperty("dev_meta", "http://config-service-url");` 2. 通过操作系统的System Environment`${ENV}_META` * 如`DEV_META=http://config-service-url` * 注意key为全大写,且中间是`_`分隔 >注1: 为了实现meta service的高可用,推荐通过SLB(Software Load Balancer)做动态负载均衡 >注2: meta service地址也可以填入IP,0.11.0版本之前只支持填入一个IP。从0.11.0版本开始支持填入以逗号分隔的多个地址([PR #1214](https://github.com/ctripcorp/apollo/pull/1214)),如`http://1.1.1.1:8080,http://2.2.2.2:8080`,不过生产环境还是建议使用域名(走slb),因为机器扩容、缩容等都可能导致IP列表的变化。 ##### 2.2.1.2.3 执行编译、打包 做完上述配置后,就可以执行编译和打包了。 > 注:初次编译会从Maven中央仓库下载不少依赖,如果网络情况不佳时很容易出错,建议使用国内的Maven仓库源,比如[阿里云Maven镜像](http://www.cnblogs.com/geektown/p/5705405.html) ```sh ./build.sh ``` 该脚本会依次打包apollo-configservice, apollo-adminservice, apollo-portal。 > 注:由于ApolloConfigDB在每个环境都有部署,所以对不同环境的config-service和admin-service需要使用不同的数据库连接信息打不同的包,portal只需要打一次包即可 ##### 2.2.1.2.4 获取apollo-configservice安装包 位于`apollo-configservice/target/`目录下的`apollo-configservice-x.x.x-github.zip` 需要注意的是由于ApolloConfigDB在每个环境都有部署,所以对不同环境的config-service需要使用不同的数据库参数打不同的包后分别部署 ##### 2.2.1.2.5 获取apollo-adminservice安装包 位于`apollo-adminservice/target/`目录下的`apollo-adminservice-x.x.x-github.zip` 需要注意的是由于ApolloConfigDB在每个环境都有部署,所以对不同环境的admin-service需要使用不同的数据库参数打不同的包后分别部署 ##### 2.2.1.2.6 获取apollo-portal安装包 位于`apollo-portal/target/`目录下的`apollo-portal-x.x.x-github.zip` ##### 2.2.1.2.7 启用外部nacos服务注册中心替换内置eureka 1. 修改build.sh/build.bat,将config-service和admin-service的maven编译命令更改为 ```shell mvn clean package -Pgithub,nacos-discovery -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,nacos-discovery -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password ``` 2. 分别修改apollo-configservice和apollo-adminservice安装包中config目录下的application-github.properties,配置nacos服务器地址 ```properties nacos.discovery.server-addr=127.0.0.1:8848 # 更多 nacos 配置 nacos.discovery.access-key= nacos.discovery.username= nacos.discovery.password= nacos.discovery.secret-key= nacos.discovery.namespace= nacos.discovery.context-path= ``` ##### 2.2.1.2.8 启用外部Consul服务注册中心替换内置eureka 1. 修改build.sh/build.bat,将config-service和admin-service的maven编译命令更改为 ```shell mvn clean package -Pgithub -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,consul-discovery -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password ``` 2. 分别修改apollo-configservice和apollo-adminservice安装包中config目录下的application-github.properties,配置consul服务器地址 ```properties spring.cloud.consul.host=127.0.0.1 spring.cloud.consul.port=8500 ``` ### 2.2.2 部署Apollo服务端 #### 2.2.2.1 部署apollo-configservice 将对应环境的`apollo-configservice-x.x.x-github.zip`上传到服务器上,解压后执行scripts/startup.sh即可。如需停止服务,执行scripts/shutdown.sh. 记得在scripts/startup.sh中按照实际的环境设置一个JVM内存,以下是我们的默认设置,供参考: ```bash export JAVA_OPTS="-server -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=18" ``` > 注1:如果需要修改JVM参数,可以修改scripts/startup.sh的`JAVA_OPTS`部分。 > 注2:如要调整服务的日志输出路径,可以修改scripts/startup.sh和apollo-configservice.conf中的`LOG_DIR`。 > 注3:如要调整服务的监听端口,可以修改scripts/startup.sh中的`SERVER_PORT`。另外apollo-configservice同时承担meta server职责,如果要修改端口,注意要同时ApolloConfigDB.ServerConfig表中的`eureka.service.url`配置项以及apollo-portal和apollo-client中的使用到的meta server信息,详见:[2.2.1.1.2.4 配置apollo-portal的meta service信息](#_221124-配置apollo-portal的meta-service信息)和[1.2.2 Apollo Meta Server](zh/usage/java-sdk-user-guide#_122-apollo-meta-server)。 > 注4:如果ApolloConfigDB.ServerConfig的eureka.service.url只配了当前正在启动的机器的话,在启动apollo-configservice的过程中会在日志中输出eureka注册失败的信息,如`com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused`。需要注意的是,这个是预期的情况,因为apollo-configservice需要向Meta Server(它自己)注册服务,但是因为在启动过程中,自己还没起来,所以会报这个错。后面会进行重试的动作,所以等自己服务起来后就会注册正常了。 > 注5:如果你看到了这里,相信你一定是一个细心阅读文档的人,而且离成功就差一点点了,继续加油,应该很快就能完成Apollo的分布式部署了!不过你是否有感觉Apollo的分布式部署步骤有点繁琐?是否有啥建议想要和作者说?如果答案是肯定的话,请移步 [#1424](https://github.com/ctripcorp/apollo/issues/1424),期待你的建议! #### 2.2.2.2 部署apollo-adminservice 将对应环境的`apollo-adminservice-x.x.x-github.zip`上传到服务器上,解压后执行scripts/startup.sh即可。如需停止服务,执行scripts/shutdown.sh. 记得在scripts/startup.sh中按照实际的环境设置一个JVM内存,以下是我们的默认设置,供参考: ```bash export JAVA_OPTS="-server -Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:SurvivorRatio=22" ``` > 注1:如果需要修改JVM参数,可以修改scripts/startup.sh的`JAVA_OPTS`部分。 > 注2:如要调整服务的日志输出路径,可以修改scripts/startup.sh和apollo-adminservice.conf中的`LOG_DIR`。 > 注3:如要调整服务的监听端口,可以修改scripts/startup.sh中的`SERVER_PORT`。 #### 2.2.2.3 部署apollo-portal 将`apollo-portal-x.x.x-github.zip`上传到服务器上,解压后执行scripts/startup.sh即可。如需停止服务,执行scripts/shutdown.sh. 记得在startup.sh中按照实际的环境设置一个JVM内存,以下是我们的默认设置,供参考: ```bash export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22" ``` > 注1:如果需要修改JVM参数,可以修改scripts/startup.sh的`JAVA_OPTS`部分。 > 注2:如要调整服务的日志输出路径,可以修改scripts/startup.sh和apollo-portal.conf中的`LOG_DIR`。 > 注3:如要调整服务的监听端口,可以修改scripts/startup.sh中的`SERVER_PORT`。 ## 2.3 Docker部署 ### 2.3.1 1.7.0及以上版本 Apollo 1.7.0版本开始会默认上传Docker镜像到[Docker Hub](https://hub.docker.com/u/apolloconfig),可以按照如下步骤获取 #### 2.3.1.1 Apollo Config Service ##### 2.3.1.1.1 获取镜像 ```bash docker pull apolloconfig/apollo-configservice:${version} ``` ##### 2.3.1.1.2 运行镜像 示例: ```bash docker run -p 8080:8080 \ -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" \ -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword \ -d -v /tmp/logs:/opt/logs --name apollo-configservice apolloconfig/apollo-configservice:${version} ``` 参数说明: * SPRING_DATASOURCE_URL: 对应环境ApolloConfigDB的地址 * SPRING_DATASOURCE_USERNAME: 对应环境ApolloConfigDB的用户名 * SPRING_DATASOURCE_PASSWORD: 对应环境ApolloConfigDB的密码 #### 2.3.1.2 Apollo Admin Service ##### 2.3.1.2.1 获取镜像 ```bash docker pull apolloconfig/apollo-adminservice:${version} ``` ##### 2.3.1.2.2 运行镜像 示例: ```bash docker run -p 8090:8090 \ -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" \ -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword \ -d -v /tmp/logs:/opt/logs --name apollo-adminservice apolloconfig/apollo-adminservice:${version} ``` 参数说明: * SPRING_DATASOURCE_URL: 对应环境ApolloConfigDB的地址 * SPRING_DATASOURCE_USERNAME: 对应环境ApolloConfigDB的用户名 * SPRING_DATASOURCE_PASSWORD: 对应环境ApolloConfigDB的密码 #### 2.3.1.3 Apollo Portal ##### 2.3.1.3.1 获取镜像 ```bash docker pull apolloconfig/apollo-portal:${version} ``` ##### 2.3.1.3.2 运行镜像 示例: ```bash docker run -p 8070:8070 \ -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloPortalDB?characterEncoding=utf8" \ -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword \ -e APOLLO_PORTAL_ENVS=dev,pro \ -e DEV_META=http://fill-in-dev-meta-server:8080 -e PRO_META=http://fill-in-pro-meta-server:8080 \ -d -v /tmp/logs:/opt/logs --name apollo-portal apolloconfig/apollo-portal:${version} ``` 参数说明: * SPRING_DATASOURCE_URL: 对应环境ApolloPortalDB的地址 * SPRING_DATASOURCE_USERNAME: 对应环境ApolloPortalDB的用户名 * SPRING_DATASOURCE_PASSWORD: 对应环境ApolloPortalDB的密码 * APOLLO_PORTAL_ENVS(可选): 对应ApolloPortalDB中的[apollo.portal.envs](#_311-apolloportalenvs-可支持的环境列表)配置项,如果没有在数据库中配置的话,可以通过此环境参数配置 * DEV_META/PRO_META(可选): 配置对应环境的Meta Service地址,以${ENV}_META命名,需要注意的是如果配置了ApolloPortalDB中的[apollo.portal.meta.servers](#_312-apolloportalmetaservers-各环境meta-service列表)配置,则以apollo.portal.meta.servers中的配置为准 #### 2.3.1.4 通过源码构建 Docker 镜像 如果修改了 apollo 服务端的代码,希望通过源码构建 Docker 镜像,可以参考下面的步骤: 1. 通过源码构建安装包:`./scripts/build.sh` 2. 构建 Docker 镜像:`mvn docker:build -pl apollo-configservice,apollo-adminservice,apollo-portal` ### 2.3.2 1.7.0之前的版本 Apollo项目已经自带了Docker file,可以参照[2.2.1 获取安装包](#_221-获取安装包)配置好安装包后通过下面的文件来打Docker镜像: 1. [apollo-configservice](https://github.com/ctripcorp/apollo/blob/master/apollo-configservice/src/main/docker/Dockerfile) 2. [apollo-adminservice](https://github.com/ctripcorp/apollo/blob/master/apollo-adminservice/src/main/docker/Dockerfile) 3. [apollo-portal](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/docker/Dockerfile) 也可以参考Apollo用户[@kulovecc](https://github.com/kulovecc)的[docker-apollo](https://github.com/kulovecc/docker-apollo)项目和[@idoop](https://github.com/idoop)的[docker-apollo](https://github.com/idoop/docker-apollo)项目。 ## 2.4 Kubernetes部署 ### 2.4.1 基于Kubernetes原生服务发现 Apollo 1.7.0版本增加了基于Kubernetes原生服务发现的部署模式,由于不再使用内置的Eureka,所以在整体部署上有很大简化,同时也提供了Helm Charts,便于部署。 > 更多设计说明可以参考[#3054](https://github.com/ctripcorp/apollo/issues/3054)。 #### 2.4.1.1 环境要求 - Kubernetes 1.10+ - Helm 3 #### 2.4.1.2 添加Apollo Helm Chart仓库 ```bash $ helm repo add apollo https://www.apolloconfig.com/charts $ helm search repo apollo ``` #### 2.4.1.3 部署apollo-configservice和apollo-adminservice ##### 2.4.1.3.1 安装apollo-configservice和apollo-adminservice 需要在每个环境中安装apollo-configservice和apollo-adminservice,所以建议在release名称中加入环境信息,例如:`apollo-service-dev` ```bash $ helm install apollo-service-dev \ --set configdb.host=1.2.3.4 \ --set configdb.userName=apollo \ --set configdb.password=apollo \ --set configdb.service.enabled=true \ --set configService.replicaCount=1 \ --set adminService.replicaCount=1 \ -n your-namespace \ apollo/apollo-service ``` 一般部署建议通过 values.yaml 来配置: ```bash $ helm install apollo-service-dev -f values.yaml -n your-namespace apollo/apollo-service ``` 安装完成后会提示对应环境的Meta Server地址,需要记录下来,apollo-portal安装时需要用到: ```bash Get meta service url for current release by running these commands: echo http://apollo-service-dev-apollo-configservice:8080 ``` > 更多配置项说明可以参考[2.4.1.3.3 配置项说明](#_24133-配置项说明) ##### 2.4.1.3.2 卸载apollo-configservice和apollo-adminservice 例如要卸载`apollo-service-dev`的部署: ```bash $ helm uninstall -n your-namespace apollo-service-dev ``` ##### 2.4.1.3.3 配置项说明 下表列出了apollo-service chart的可配置参数及其默认值: | Parameter | Description | Default | |----------------------|---------------------------------------------|---------------------| | `configdb.host` | The host for apollo config db | `nil` | | `configdb.port` | The port for apollo config db | `3306` | | `configdb.dbName` | The database name for apollo config db | `ApolloConfigDB` | | `configdb.userName` | The user name for apollo config db | `nil` | | `configdb.password` | The password for apollo config db | `nil` | | `configdb.connectionStringProperties` | The connection string properties for apollo config db | `characterEncoding=utf8` | | `configdb.service.enabled` | Whether to create a Kubernetes Service for `configdb.host` or not. Set it to `true` if `configdb.host` is an endpoint outside of the kubernetes cluster | `false` | | `configdb.service.fullNameOverride` | Override the service name for apollo config db | `nil` | | `configdb.service.port` | The port for the service of apollo config db | `3306` | | `configdb.service.type` | The service type of apollo config db: `ClusterIP` or `ExternalName`. If the host is a DNS name, please specify `ExternalName` as the service type, e.g. `xxx.mysql.rds.aliyuncs.com` | `ClusterIP` | | `configService.fullNameOverride` | Override the deployment name for apollo-configservice | `nil` | | `configService.replicaCount` | Replica count of apollo-configservice | `2` | | `configService.containerPort` | Container port of apollo-configservice | `8080` | | `configService.image.repository` | Image repository of apollo-configservice | `apolloconfig/apollo-configservice` | | `configService.image.tag` | Image tag of apollo-configservice, e.g. `1.8.0`, leave it to `nil` to use the default version. _(chart version >= 0.2.0)_ | `nil` | | `configService.image.pullPolicy` | Image pull policy of apollo-configservice | `IfNotPresent` | | `configService.imagePullSecrets` | Image pull secrets of apollo-configservice | `[]` | | `configService.service.fullNameOverride` | Override the service name for apollo-configservice | `nil` | | `configService.service.port` | The port for the service of apollo-configservice | `8080` | | `configService.service.targetPort` | The target port for the service of apollo-configservice | `8080` | | `configService.service.type` | The service type of apollo-configservice | `ClusterIP` | | `configService.ingress.enabled` | Whether to enable the ingress for config-service or not. _(chart version >= 0.2.0)_ | `false` | | `configService.ingress.annotations` | The annotations of the ingress for config-service. _(chart version >= 0.2.0)_ | `{}` | | `configService.ingress.hosts.host` | The host of the ingress for config-service. _(chart version >= 0.2.0)_ | `nil` | | `configService.ingress.hosts.paths` | The paths of the ingress for config-service. _(chart version >= 0.2.0)_ | `[]` | | `configService.ingress.tls` | The tls definition of the ingress for config-service. _(chart version >= 0.2.0)_ | `[]` | | `configService.liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `configService.liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `configService.readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `configService.readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `configService.config.profiles` | specify the spring profiles to activate | `github,kubernetes` | | `configService.config.configServiceUrlOverride` | Override `apollo.config-service.url`: config service url to be accessed by apollo-client, e.g. `http://apollo-config-service-dev:8080` | `nil` | | `configService.config.adminServiceUrlOverride` | Override `apollo.admin-service.url`: admin service url to be accessed by apollo-portal, e.g. `http://apollo-admin-service-dev:8090` | `nil` | | `configService.config.contextPath` | specify the context path, e.g. `/apollo`, then users could access config service via `http://{config_service_address}/apollo`. _(chart version >= 0.2.0)_ | `nil` | | `configService.env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `configService.strategy` | The deployment strategy of apollo-configservice | `{}` | | `configService.resources` | The resources definition of apollo-configservice | `{}` | | `configService.nodeSelector` | The node selector definition of apollo-configservice | `{}` | | `configService.tolerations` | The tolerations definition of apollo-configservice | `[]` | | `configService.affinity` | The affinity definition of apollo-configservice | `{}` | | `adminService.fullNameOverride` | Override the deployment name for apollo-adminservice | `nil` | | `adminService.replicaCount` | Replica count of apollo-adminservice | `2` | | `adminService.containerPort` | Container port of apollo-adminservice | `8090` | | `adminService.image.repository` | Image repository of apollo-adminservice | `apolloconfig/apollo-adminservice` | | `adminService.image.tag` | Image tag of apollo-adminservice, e.g. `1.8.0`, leave it to `nil` to use the default version. _(chart version >= 0.2.0)_ | `nil` | | `adminService.image.pullPolicy` | Image pull policy of apollo-adminservice | `IfNotPresent` | | `adminService.imagePullSecrets` | Image pull secrets of apollo-adminservice | `[]` | | `adminService.service.fullNameOverride` | Override the service name for apollo-adminservice | `nil` | | `adminService.service.port` | The port for the service of apollo-adminservice | `8090` | | `adminService.service.targetPort` | The target port for the service of apollo-adminservice | `8090` | | `adminService.service.type` | The service type of apollo-adminservice | `ClusterIP` | | `adminService.ingress.enabled` | Whether to enable the ingress for admin-service or not. _(chart version >= 0.2.0)_ | `false` | | `adminService.ingress.annotations` | The annotations of the ingress for admin-service. _(chart version >= 0.2.0)_ | `{}` | | `adminService.ingress.hosts.host` | The host of the ingress for admin-service. _(chart version >= 0.2.0)_ | `nil` | | `adminService.ingress.hosts.paths` | The paths of the ingress for admin-service. _(chart version >= 0.2.0)_ | `[]` | | `adminService.ingress.tls` | The tls definition of the ingress for admin-service. _(chart version >= 0.2.0)_ | `[]` | | `adminService.liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `adminService.liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `adminService.readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `adminService.readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `adminService.config.profiles` | specify the spring profiles to activate | `github,kubernetes` | | `adminService.config.contextPath` | specify the context path, e.g. `/apollo`, then users could access admin service via `http://{admin_service_address}/apollo`. _(chart version >= 0.2.0)_ | `nil` | | `adminService.env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `adminService.strategy` | The deployment strategy of apollo-adminservice | `{}` | | `adminService.resources` | The resources definition of apollo-adminservice | `{}` | | `adminService.nodeSelector` | The node selector definition of apollo-adminservice | `{}` | | `adminService.tolerations` | The tolerations definition of apollo-adminservice | `[]` | | `adminService.affinity` | The affinity definition of apollo-adminservice | `{}` | ##### 2.4.1.3.4 配置样例 ###### 2.4.1.3.4.1 ConfigDB的host是k8s集群外的IP ```yaml configdb: host: 1.2.3.4 dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true ``` ###### 2.4.1.3.4.2 ConfigDB的host是k8s集群外的域名 ```yaml configdb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName ``` ###### 2.4.1.3.4.3 ConfigDB的host是k8s集群内的一个服务 ```yaml configdb: host: apollodb-mysql.mysql dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false ``` ###### 2.4.1.3.4.4 指定Meta Server返回的apollo-configservice地址 如果apollo-client无法直接访问apollo-configservice的Service(比如不在同一个k8s集群),那么可以参照下面的示例指定Meta Server返回给apollo-client的地址(比如可以通过nodeport访问) ```yaml configService: config: configServiceUrlOverride: http://1.2.3.4:12345 ``` ###### 2.4.1.3.4.5 指定Meta Server返回的apollo-adminservice地址 如果apollo-portal无法直接访问apollo-adminservice的Service(比如不在同一个k8s集群),那么可以参照下面的示例指定Meta Server返回给apollo-portal的地址(比如可以通过nodeport访问) ```yaml configService: config: adminServiceUrlOverride: http://1.2.3.4:23456 ``` ###### 2.4.1.3.4.6 以Ingress配置自定义路径`/config`形式暴露apollo-configservice服务 ```yaml # use /config as root, should specify configService.config.contextPath as /config configService: config: contextPath: /config ingress: enabled: true hosts: - paths: - /config ``` ###### 2.4.1.3.4.7 以Ingress配置自定义路径`/admin`形式暴露apollo-adminservice服务 ```yaml # use /admin as root, should specify adminService.config.contextPath as /admin adminService: config: contextPath: /admin ingress: enabled: true hosts: - paths: - /admin ``` #### 2.4.1.4 部署apollo-portal ##### 2.4.1.4.1 安装apollo-portal 假设有dev, pro两个环境,且meta server地址分别为`http://apollo-service-dev-apollo-configservice:8080`和`http://apollo-service-pro-apollo-configservice:8080`: ```bash $ helm install apollo-portal \ --set portaldb.host=1.2.3.4 \ --set portaldb.userName=apollo \ --set portaldb.password=apollo \ --set portaldb.service.enabled=true \ --set config.envs="dev\,pro" \ --set config.metaServers.dev=http://apollo-service-dev-apollo-configservice:8080 \ --set config.metaServers.pro=http://apollo-service-pro-apollo-configservice:8080 \ --set replicaCount=1 \ -n your-namespace \ apollo/apollo-portal ``` 一般部署建议通过 values.yaml 来配置: ```bash $ helm install apollo-portal -f values.yaml -n your-namespace apollo/apollo-portal ``` > 更多配置项说明可以参考[2.4.1.4.3 配置项说明](#_24143-配置项说明) ##### 2.4.1.4.2 卸载apollo-portal 例如要卸载`apollo-portal`的部署: ```bash $ helm uninstall -n your-namespace apollo-portal ``` ##### 2.4.1.4.3 配置项说明 下表列出了apollo-portal chart的可配置参数及其默认值: | Parameter | Description | Default | |----------------------|---------------------------------------------|-----------------------| | `fullNameOverride` | Override the deployment name for apollo-portal | `nil` | | `replicaCount` | Replica count of apollo-portal | `2` | | `containerPort` | Container port of apollo-portal | `8070` | | `image.repository` | Image repository of apollo-portal | `apolloconfig/apollo-portal` | | `image.tag` | Image tag of apollo-portal, e.g. `1.8.0`, leave it to `nil` to use the default version. _(chart version >= 0.2.0)_ | `nil` | | `image.pullPolicy` | Image pull policy of apollo-portal | `IfNotPresent` | | `imagePullSecrets` | Image pull secrets of apollo-portal | `[]` | | `service.fullNameOverride` | Override the service name for apollo-portal | `nil` | | `service.port` | The port for the service of apollo-portal | `8070` | | `service.targetPort` | The target port for the service of apollo-portal | `8070` | | `service.type` | The service type of apollo-portal | `ClusterIP` | | `service.sessionAffinity` | The session affinity for the service of apollo-portal | `ClientIP` | | `ingress.enabled` | Whether to enable the ingress or not | `false` | | `ingress.annotations` | The annotations of the ingress | `{}` | | `ingress.hosts.host` | The host of the ingress | `nil` | | `ingress.hosts.paths` | The paths of the ingress | `[]` | | `ingress.tls` | The tls definition of the ingress | `[]` | | `liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `strategy` | The deployment strategy of apollo-portal | `{}` | | `resources` | The resources definition of apollo-portal | `{}` | | `nodeSelector` | The node selector definition of apollo-portal | `{}` | | `tolerations` | The tolerations definition of apollo-portal | `[]` | | `affinity` | The affinity definition of apollo-portal | `{}` | | `config.profiles` | specify the spring profiles to activate | `github,auth` | | `config.envs` | specify the env names, e.g. `dev,pro` | `nil` | | `config.contextPath` | specify the context path, e.g. `/apollo`, then users could access portal via `http://{portal_address}/apollo` | `nil` | | `config.metaServers` | specify the meta servers, e.g.<br />`dev: http://apollo-configservice-dev:8080`<br />`pro: http://apollo-configservice-pro:8080` | `{}` | | `config.files` | specify the extra config files for apollo-portal, e.g. `application-ldap.yml` | `{}` | | `portaldb.host` | The host for apollo portal db | `nil` | | `portaldb.port` | The port for apollo portal db | `3306` | | `portaldb.dbName` | The database name for apollo portal db | `ApolloPortalDB` | | `portaldb.userName` | The user name for apollo portal db | `nil` | | `portaldb.password` | The password for apollo portal db | `nil` | | `portaldb.connectionStringProperties` | The connection string properties for apollo portal db | `characterEncoding=utf8` | | `portaldb.service.enabled` | Whether to create a Kubernetes Service for `portaldb.host` or not. Set it to `true` if `portaldb.host` is an endpoint outside of the kubernetes cluster | `false` | | `portaldb.service.fullNameOverride` | Override the service name for apollo portal db | `nil` | | `portaldb.service.port` | The port for the service of apollo portal db | `3306` | | `portaldb.service.type` | The service type of apollo portal db: `ClusterIP` or `ExternalName`. If the host is a DNS name, please specify `ExternalName` as the service type, e.g. `xxx.mysql.rds.aliyuncs.com` | `ClusterIP` | ##### 2.4.1.4.4 配置样例 ###### 2.4.1.4.4.1 PortalDB的host是k8s集群外的IP ```yaml portaldb: host: 1.2.3.4 dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true ``` ###### 2.4.1.4.4.2 PortalDB的host是k8s集群外的域名 ```yaml portaldb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName ``` ###### 2.4.1.4.4.3 PortalDB的host是k8s集群内的一个服务 ```yaml portaldb: host: apollodb-mysql.mysql dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false ``` ###### 2.4.1.4.4.4 配置环境信息 ```yaml config: envs: dev,pro metaServers: dev: http://apollo-service-dev-apollo-configservice:8080 pro: http://apollo-service-pro-apollo-configservice:8080 ``` ###### 2.4.1.4.4.5 以Load Balancer形式暴露服务 ```yaml service: type: LoadBalancer ``` ###### 2.4.1.4.4.6 以Ingress形式暴露服务 ```yaml ingress: enabled: true hosts: - paths: - / ``` ###### 2.4.1.4.4.7 以Ingress配置自定义路径`/apollo`形式暴露服务 ```yaml # use /apollo as root, should specify config.contextPath as /apollo ingress: enabled: true hosts: - paths: - /apollo config: ... contextPath: /apollo ... ``` ###### 2.4.1.4.4.8 以Ingress配置session affinity形式暴露服务 ```yaml ingress: enabled: true annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/affinity-mode: "persistent" nginx.ingress.kubernetes.io/session-cookie-conditional-samesite-none: "true" nginx.ingress.kubernetes.io/session-cookie-expires: "172800" nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" hosts: - host: xxx.somedomain.com # host is required to make session affinity work paths: - / ``` ###### 2.4.1.4.4.9 启用 LDAP 支持 ```yaml config: ... profiles: github,ldap ... files: application-ldap.yml: | spring: ldap: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" password: "password" searchFilter: "(uid={0})" urls: - "ldap://xxx.somedomain.com:389" ldap: mapping: objectClass: "inetOrgPerson" loginId: "uid" userDisplayName: "cn" email: "mail" ``` #### 2.4.1.5 通过源码构建 Docker 镜像 如果修改了 apollo 服务端的代码,希望通过源码构建 Docker 镜像,可以参考[2.3.1.4 通过源码构建 Docker 镜像](#_2314-通过源码构建-docker-镜像)的步骤。 ### 2.4.2 基于内置的Eureka服务发现 感谢[AiotCEO](https://github.com/AiotCEO)提供了k8s的部署支持,使用说明可以参考[apollo-on-kubernetes](https://github.com/ctripcorp/apollo/blob/master/scripts/apollo-on-kubernetes/README.md)。 感谢[qct](https://github.com/qct)提供的Helm Chart部署支持,使用说明可以参考[qct/apollo-helm](https://github.com/qct/apollo-helm)。 # 三、服务端配置说明 > 以下配置除了支持在数据库中配置以外,也支持通过-D参数、application.properties等配置,且-D参数、application.properties等优先级高于数据库中的配置 ## 3.1 调整ApolloPortalDB配置 配置项统一存储在ApolloPortalDB.ServerConfig表中,也可以通过`管理员工具 - 系统参数`页面进行配置,无特殊说明则修改完一分钟实时生效。 ### 3.1.1 apollo.portal.envs - 可支持的环境列表 默认值是dev,如果portal需要管理多个环境的话,以逗号分隔即可(大小写不敏感),如: ``` DEV,FAT,UAT,PRO ``` 修改完需要重启生效。 >注1:一套Portal可以管理多个环境,但是每个环境都需要独立部署一套Config Service、Admin Service和ApolloConfigDB,具体请参考:[2.1.2 创建ApolloConfigDB](#_212-创建apolloconfigdb),[3.2 调整ApolloConfigDB配置](zh/deployment/distributed-deployment-guide?id=_32-调整apolloconfigdb配置),[2.2.1.1.2 配置数据库连接信息](#_22112-配置数据库连接信息),另外如果是为已经运行了一段时间的Apollo配置中心增加环境,别忘了参考[2.1.2.4 从别的环境导入ApolloConfigDB的项目数据](#_2124-从别的环境导入apolloconfigdb的项目数据)对新的环境做初始化。 >注2:只在数据库添加环境是不起作用的,还需要为apollo-portal添加新增环境对应的meta server地址,具体参考:[2.2.1.1.2.4 配置apollo-portal的meta service信息](#_221124-配置apollo-portal的meta-service信息)。apollo-client在新的环境下使用时也需要做好相应的配置,具体参考:[1.2.2 Apollo Meta Server](zh/usage/java-sdk-user-guide#_122-apollo-meta-server)。 >注3:如果希望添加自定义的环境名称,具体步骤可以参考[Portal如何增加环境](zh/faq/common-issues-in-deployment-and-development-phase?id=_4-portal如何增加环境?)。 >注4:1.1.0版本增加了系统信息页面(`管理员工具` -> `系统信息`),可以通过该页面检查配置是否正确 ### 3.1.2 apollo.portal.meta.servers - 各环境Meta Service列表 > 适用于1.6.0及以上版本 Apollo Portal需要在不同的环境访问不同的meta service(apollo-configservice)地址,所以我们需要在配置中提供这些信息。默认情况下,meta service和config service是部署在同一个JVM进程,所以meta service的地址就是config service的地址。 样例如下: ```json { "DEV":"http://1.1.1.1:8080", "FAT":"http://apollo.fat.xxx.com", "UAT":"http://apollo.uat.xxx.com", "PRO":"http://apollo.xxx.com" } ``` 修改完需要重启生效。 > 该配置优先级高于其它方式设置的Meta Service地址,更多信息可以参考[2.2.1.1.2.4 配置apollo-portal的meta service信息](#_221124-配置apollo-portal的meta-service信息)。 ### 3.1.3 organizations - 部门列表 Portal中新建的App都需要选择部门,所以需要在这里配置可选的部门信息,样例如下: ```json [{"orgId":"TEST1","orgName":"样例部门1"},{"orgId":"TEST2","orgName":"样例部门2"}] ``` ### 3.1.4 superAdmin - Portal超级管理员 超级管理员拥有所有权限,需要谨慎设置。 如果没有接入自己公司的SSO系统的话,可以先暂时使用默认值apollo(默认用户)。等接入后,修改为实际使用的账号,多个账号以英文逗号分隔(,)。 ### 3.1.5 consumer.token.salt - consumer token salt 如果会使用开放平台API的话,可以设置一个token salt。如果不使用,可以忽略。 ### 3.1.6 wiki.address portal上“帮助”链接的地址,默认是Apollo github的wiki首页,可自行设置。 ### 3.1.7 admin.createPrivateNamespace.switch 是否允许项目管理员创建private namespace。设置为`true`允许创建,设置为`false`则项目管理员在页面上看不到创建private namespace的选项。[了解更多Namespace](zh/design/apollo-core-concept-namespace) ### 3.1.8 emergencyPublish.supported.envs 配置允许紧急发布的环境列表,多个env以英文逗号分隔。 当config service开启一次发布只能有一个人修改开关(`namespace.lock.switch`)后,一次配置发布只能是一个人修改,另一个发布。为了避免遇到紧急情况时(如非工作时间、节假日)无法发布配置,可以配置此项以允许某些环境可以操作紧急发布,即同一个人可以修改并发布配置。 ### 3.1.9 configView.memberOnly.envs 只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔。 对设定了只对项目成员显示配置信息的环境,只有该项目的管理员或拥有该namespace的编辑或发布权限的用户才能看到该私有namespace的配置信息和发布历史。公共namespace始终对所有用户可见。 > 从1.1.0版本开始支持,详见[PR 1531](https://github.com/ctripcorp/apollo/pull/1531) ### 3.1.10 role.create-application.enabled - 是否开启创建项目权限控制 > 适用于1.5.0及以上版本 默认为false,所有用户都可以创建项目 如果设置为true,那么只有超级管理员和拥有创建项目权限的帐号可以创建项目,超级管理员可以通过`管理员工具 - 系统权限管理`给用户分配创建项目权限 ### 3.1.11 role.manage-app-master.enabled - 是否开启项目管理员分配权限控制 > 适用于1.5.0及以上版本 默认为false,所有项目的管理员可以为项目添加/删除管理员 如果设置为true,那么只有超级管理员和拥有项目管理员分配权限的帐号可以为特定项目添加/删除管理员,超级管理员可以通过`管理员工具 - 系统权限管理`给用户分配特定项目的管理员分配权限 ### 3.1.12 admin-service.access.tokens - 设置apollo-portal访问各环境apollo-adminservice所需的access token > 适用于1.7.1及以上版本 如果对应环境的apollo-adminservice开启了[访问控制](#_326-admin-serviceaccesscontrolenabled-配置apollo-adminservice是否开启访问控制),那么需要在此配置apollo-portal访问该环境apollo-adminservice所需的access token,否则会访问失败 格式为json,如下所示: ```json { "dev" : "098f6bcd4621d373cade4e832627b4f6", "pro" : "ad0234829205b9033196ba818f7a872b" } ``` ## 3.2 调整ApolloConfigDB配置 配置项统一存储在ApolloConfigDB.ServerConfig表中,需要注意每个环境的ApolloConfigDB.ServerConfig都需要单独配置,修改完一分钟实时生效。 ### 3.2.1 eureka.service.url - Eureka服务Url > 不适用于基于Kubernetes原生服务发现场景 不管是apollo-configservice还是apollo-adminservice都需要向eureka服务注册,所以需要配置eureka服务地址。 按照目前的实现,apollo-configservice本身就是一个eureka服务,所以只需要填入apollo-configservice的地址即可,如有多个,用逗号分隔(注意不要忘了/eureka/后缀)。 需要注意的是每个环境只填入自己环境的eureka服务地址,比如FAT的apollo-configservice是1.1.1.1:8080和2.2.2.2:8080,UAT的apollo-configservice是3.3.3.3:8080和4.4.4.4:8080,PRO的apollo-configservice是5.5.5.5:8080和6.6.6.6:8080,那么: 1. 在FAT环境的ApolloConfigDB.ServerConfig表中设置eureka.service.url为: ``` http://1.1.1.1:8080/eureka/,http://2.2.2.2:8080/eureka/ ``` 2. 在UAT环境的ApolloConfigDB.ServerConfig表中设置eureka.service.url为: ``` http://3.3.3.3:8080/eureka/,http://4.4.4.4:8080/eureka/ ``` 3. 在PRO环境的ApolloConfigDB.ServerConfig表中设置eureka.service.url为: ``` http://5.5.5.5:8080/eureka/,http://6.6.6.6:8080/eureka/ ``` >注1:这里需要填写本环境中全部的eureka服务地址,因为eureka需要互相复制注册信息 >注2:如果希望将Config Service和Admin Service注册到公司统一的Eureka上,可以参考[部署&开发遇到的常见问题 - 将Config Service和Admin Service注册到单独的Eureka Server上](zh/faq/common-issues-in-deployment-and-development-phase#_8-将config-service和admin-service注册到单独的eureka-server上)章节 >注3:在多机房部署时,往往希望config service和admin service只向同机房的eureka注册,要实现这个效果,需要利用`ServerConfig`表中的cluster字段,config service和admin service会读取所在机器的`/opt/settings/server.properties`(Mac/Linux)或`C:\opt\settings\server.properties`(Windows)中的idc属性,如果该idc有对应的eureka.service.url配置,那么就只会向该机房的eureka注册。比如config service和admin service会部署到`SHAOY`和`SHAJQ`两个IDC,那么为了实现这两个机房中的服务只向该机房注册,那么可以在`ServerConfig`表中新增两条记录,分别填入`SHAOY`和`SHAJQ`两个机房的eureka地址即可,`default` cluster的记录可以保留,如果有config service和admin service不是部署在`SHAOY`和`SHAJQ`这两个机房的,就会使用这条默认配置。 | Key |Cluster | Value | Comment | |--------------------|-----------|-------------------------------|---------------------| | eureka.service.url | default | http://1.1.1.1:8080/eureka/ | 默认的Eureka服务Url | | eureka.service.url | SHAOY | http://2.2.2.2:8080/eureka/ | SHAOY的Eureka服务Url | | eureka.service.url | SHAJQ | http://3.3.3.3:8080/eureka/ | SHAJQ的Eureka服务Url | ### 3.2.2 namespace.lock.switch - 一次发布只能有一个人修改开关,用于发布审核 这是一个功能开关,如果配置为true的话,那么一次配置发布只能是一个人修改,另一个发布。 > 生产环境建议开启此选项 ### 3.2.3 config-service.cache.enabled - 是否开启配置缓存 这是一个功能开关,如果配置为true的话,config service会缓存加载过的配置信息,从而加快后续配置获取性能。 默认为false,开启前请先评估总配置大小并调整config service内存配置。 > 开启缓存后必须确保应用中配置的app.id大小写正确,否则将获取不到正确的配置 ### 3.2.4 item.key.length.limit - 配置项 key 最大长度限制 默认配置是128。 ### 3.2.5 item.value.length.limit - 配置项 value 最大长度限制 默认配置是20000。 #### 3.2.5.1 namespace.value.length.limit.override - namespace 的配置项 value 最大长度限制 此配置用来覆盖 `item.value.length.limit` 的配置,做到细粒度控制 namespace 的 value 最大长度限制,配置的值是一个 json 格式,json 的 key 为 namespace 在数据库中的 id 值,格式如下: ``` namespace.value.length.limit.override = {1:200,3:20} ``` 以上配置指定了 ApolloConfigDB.Namespace 表中 id=1 的 namespace 的 value 最大长度限制为 200,id=3 的 namespace 的 value 最大长度限制为 20 ### 3.2.6 admin-service.access.control.enabled - 配置apollo-adminservice是否开启访问控制 > 适用于1.7.1及以上版本 默认为false,如果配置为true,那么apollo-portal就需要[正确配置](#_3112-admin-serviceaccesstokens-设置apollo-portal访问各环境apollo-adminservice所需的access-token)访问该环境的access token,否则访问会被拒绝 ### 3.2.7 admin-service.access.tokens - 配置允许访问apollo-adminservice的access token列表 > 适用于1.7.1及以上版本 如果该配置项为空,那么访问控制不会生效。如果允许多个token,token 之间以英文逗号分隔 样例: ```properties admin-service.access.tokens=098f6bcd4621d373cade4e832627b4f6 admin-service.access.tokens=098f6bcd4621d373cade4e832627b4f6,ad0234829205b9033196ba818f7a872b ```
本文档介绍了如何按照分布式部署的方式编译、打包、部署Apollo配置中心,从而可以在开发、测试、生产等环境分别部署运行。 > 如果只是需要在本地快速部署试用Apollo的话,可以参考[Quick Start](zh/deployment/quick-start) # &nbsp; # 一、准备工作 ## 1.1 运行时环境 ### 1.1.1 OS 服务端基于Spring Boot,启动脚本理论上支持所有Linux发行版,建议[CentOS 7](https://www.centos.org/)。 ### 1.1.2 Java * Apollo服务端:1.8+ * Apollo客户端:1.7+ 由于需要同时运行服务端和客户端,所以建议安装Java 1.8+。 >对于Apollo客户端,运行时环境只需要1.7+即可。 >注:对于Apollo客户端,如果有需要的话,可以做少量代码修改来降级到Java 1.6,详细信息可以参考[Issue 483](https://github.com/ctripcorp/apollo/issues/483) 在配置好后,可以通过如下命令检查: ```sh java -version ``` 样例输出: ```sh java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode) ``` ## 1.2 MySQL * 版本要求:5.6.5+ Apollo的表结构对`timestamp`使用了多个default声明,所以需要5.6.5以上版本。 连接上MySQL后,可以通过如下命令检查: ```sql SHOW VARIABLES WHERE Variable_name = 'version'; ``` | Variable_name | Value | |---------------|--------| | version | 5.7.11 | > 注1:MySQL版本可以降级到5.5,详见[mysql 依赖降级讨论](https://github.com/ctripcorp/apollo/issues/481)。 > 注2:如果希望使用Oracle的话,可以参考[vanpersl](https://github.com/vanpersl)在Apollo 0.8.0基础上开发的[Oracle适配代码](https://github.com/ctripcorp/apollo/compare/v0.8.0...vanpersl:db-oracle),Oracle版本为10.2.0.1.0。 > 注3:如果希望使用Postgres的话,可以参考[oaksharks](https://github.com/oaksharks)在Apollo 0.9.1基础上开发的[Pg适配代码](https://github.com/oaksharks/apollo/compare/ac10768ee2e11c488523ca0e845984f6f71499ac...oaksharks:pg),Postgres的版本为9.3.20,也可以参考[xiao0yy](https://github.com/xiao0yy)在Apollo 0.10.2基础上开发的[Pg适配代码](https://github.com/ctripcorp/apollo/issues/1293),Postgres的版本为9.5。 ## 1.3 环境 分布式部署需要事先确定部署的环境以及部署方式。 Apollo目前支持以下环境: * DEV * 开发环境 * FAT * 测试环境,相当于alpha环境(功能测试) * UAT * 集成环境,相当于beta环境(回归测试) * PRO * 生产环境 > 如果希望添加自定义的环境名称,具体步骤可以参考[Portal如何增加环境](zh/faq/common-issues-in-deployment-and-development-phase?id=_4-portal如何增加环境?) 以ctrip为例,我们的部署策略如下: ![Deployment](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-deployment.png) * Portal部署在生产环境的机房,通过它来直接管理FAT、UAT、PRO等环境的配置 * Meta Server、Config Service和Admin Service在每个环境都单独部署,使用独立的数据库 * Meta Server、Config Service和Admin Service在生产环境部署在两个机房,实现双活 * Meta Server和Config Service部署在同一个JVM进程内,Admin Service部署在同一台服务器的另一个JVM进程内 另外也可以参考下[@lyliyongblue](https://github.com/lyliyongblue) 贡献的样例部署图(建议右键新窗口打开看大图): ![Deployment](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/lyliyongblue-apollo-deployment.png) ## 1.4 网络策略 分布式部署的时候,`apollo-configservice`和`apollo-adminservice`需要把自己的IP和端口注册到Meta Server(apollo-configservice本身)。 Apollo客户端和Portal会从Meta Server获取服务的地址(IP+端口),然后通过服务地址直接访问。 需要注意的是,`apollo-configservice`和`apollo-adminservice`是基于内网可信网络设计的,所以出于安全考虑,**请不要将`apollo-configservice`和`apollo-adminservice`直接暴露在公网**。 所以如果实际部署的机器有多块网卡(如docker),或者存在某些网卡的IP是Apollo客户端和Portal无法访问的(如网络安全限制),那么我们就需要在`apollo-configservice`和`apollo-adminservice`中做相关配置来解决连通性问题。 ### 1.4.1 忽略某些网卡 可以分别修改`apollo-configservice`和`apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会把`docker0`和`veth`开头的网卡在注册到Eureka时忽略掉。 JVM System Property示例: ```properties -Dspring.cloud.inetutils.ignoredInterfaces[0]=docker0 -Dspring.cloud.inetutils.ignoredInterfaces[1]=veth.* ``` OS Environment Variable示例: ```properties SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[0]=docker0 SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[1]=veth.* ``` ### 1.4.2 指定要注册的IP 可以分别修改`apollo-configservice`和`apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会指定注册的IP为`1.2.3.4`。 JVM System Property示例: ```properties -Deureka.instance.ip-address=1.2.3.4 ``` OS Environment Variable示例: ```properties EUREKA_INSTANCE_IP_ADDRESS=1.2.3.4 ``` ### 1.4.3 指定要注册的URL 可以分别修改`apollo-configservice`和`apollo-adminservice`的startup.sh,通过JVM System Property传入-D参数,也可以通过OS Environment Variable传入,下面的例子会指定注册的URL为`http://1.2.3.4:8080`。 JVM System Property示例: ```properties -Deureka.instance.homePageUrl=http://1.2.3.4:8080 -Deureka.instance.preferIpAddress=false ``` OS Environment Variable示例: ```properties EUREKA_INSTANCE_HOME_PAGE_URL=http://1.2.3.4:8080 EUREKA_INSTANCE_PREFER_IP_ADDRESS=false ``` ### 1.4.4 直接指定apollo-configservice地址 如果Apollo部署在公有云上,本地开发环境无法连接,但又需要做开发测试的话,客户端可以升级到0.11.0版本及以上,然后配置[跳过Apollo Meta Server服务发现](zh/usage/java-sdk-user-guide#_1222-跳过apollo-meta-server服务发现) # 二、部署步骤 部署步骤总体还是比较简单的,Apollo的唯一依赖是数据库,所以需要首先把数据库准备好,然后根据实际情况,选择不同的部署方式: > [@lingjiaju](https://github.com/lingjiaju)录制了一系列Apollo快速上手视频,如果看文档觉得略繁琐的话,不妨可以先看一下他的[视频教程](https://pan.baidu.com/s/1blv87EOZS77NWT8Amkijkw#list/path=%2F)。 > 如果部署过程中遇到了问题,可以参考[部署&开发遇到的常见问题](zh/faq/common-issues-in-deployment-and-development-phase),一般都能找到答案。 ## 2.1 创建数据库 Apollo服务端共需要两个数据库:`ApolloPortalDB`和`ApolloConfigDB`,我们把数据库、表的创建和样例数据都分别准备了sql文件,只需要导入数据库即可。 需要注意的是ApolloPortalDB只需要在生产环境部署一个即可,而ApolloConfigDB需要在每个环境部署一套,如fat、uat和pro分别部署3套ApolloConfigDB。 > 注意:如果你本地已经创建过Apollo数据库,请注意备份数据。我们准备的sql文件会清空Apollo相关的表。 ### 2.1.1 创建ApolloPortalDB 可以根据实际情况选择通过手动导入SQL或是通过[Flyway](https://flywaydb.org/)自动导入SQL创建。 #### 2.1.1.1 手动导入SQL创建 通过各种MySQL客户端导入[apolloportaldb.sql](https://github.com/ctripcorp/apollo/blob/master/scripts/sql/apolloportaldb.sql)即可。 以MySQL原生客户端为例: ```sql source /your_local_path/scripts/sql/apolloportaldb.sql ``` #### 2.1.1.2 通过Flyway导入SQL创建 > 需要1.3.0及以上版本 1. 根据实际情况修改[flyway-portaldb.properties](https://github.com/ctripcorp/apollo/blob/master/scripts/flyway/flyway-portaldb.properties)中的`flyway.user`、`flyway.password`和`flyway.url`配置 2. 在apollo项目根目录下执行`mvn -N -Pportaldb flyway:migrate` #### 2.1.1.3 验证 导入成功后,可以通过执行以下sql语句来验证: ```sql select `Id`, `Key`, `Value`, `Comment` from `ApolloPortalDB`.`ServerConfig` limit 1; ``` | Id | Key | Value | Comment | |----|--------------------|-------|------------------| | 1 | apollo.portal.envs | dev | 可支持的环境列表 | > 注:ApolloPortalDB只需要在生产环境部署一个即可 ### 2.1.2 创建ApolloConfigDB 可以根据实际情况选择通过手动导入SQL或是通过[Flyway](https://flywaydb.org/)自动导入SQL创建。 #### 2.1.2.1 手动导入SQL 通过各种MySQL客户端导入[apolloconfigdb.sql](https://github.com/ctripcorp/apollo/blob/master/scripts/sql/apolloconfigdb.sql)即可。 以MySQL原生客户端为例: ```sql source /your_local_path/scripts/sql/apolloconfigdb.sql ``` #### 2.1.2.2 通过Flyway导入SQL > 需要1.3.0及以上版本 1. 根据实际情况修改[flyway-configdb.properties](https://github.com/ctripcorp/apollo/blob/master/scripts/flyway/flyway-configdb.properties)中的`flyway.user`、`flyway.password`和`flyway.url`配置 2. 在apollo项目根目录下执行`mvn -N -Pconfigdb flyway:migrate` #### 2.1.2.3 验证 导入成功后,可以通过执行以下sql语句来验证: ```sql select `Id`, `Key`, `Value`, `Comment` from `ApolloConfigDB`.`ServerConfig` limit 1; ``` | Id | Key | Value | Comment | |----|--------------------|-------------------------------|---------------| | 1 | eureka.service.url | http://127.0.0.1:8080/eureka/ | Eureka服务Url | > 注:ApolloConfigDB需要在每个环境部署一套,如fat、uat和pro分别部署3套ApolloConfigDB #### 2.1.2.4 从别的环境导入ApolloConfigDB的项目数据 如果是全新部署的Apollo配置中心,请忽略此步。 如果不是全新部署的Apollo配置中心,比如已经使用了一段时间,这时在Apollo配置中心已经创建了不少项目以及namespace等,那么在新环境中的ApolloConfigDB中需要从其它正常运行的环境中导入必要的项目数据。 主要涉及ApolloConfigDB的下面4张表,下面同时附上需要导入的数据查询语句: 1. App * 导入全部的App * 如:insert into `新环境的ApolloConfigDB`.`App` select * from `其它环境的ApolloConfigDB`.`App` where `IsDeleted` = 0; 2. AppNamespace * 导入全部的AppNamespace * 如:insert into `新环境的ApolloConfigDB`.`AppNamespace` select * from `其它环境的ApolloConfigDB`.`AppNamespace` where `IsDeleted` = 0; 3. Cluster * 导入默认的default集群 * 如:insert into `新环境的ApolloConfigDB`.`Cluster` select * from `其它环境的ApolloConfigDB`.`Cluster` where `Name` = 'default' and `IsDeleted` = 0; 4. Namespace * 导入默认的default集群中的namespace * 如:insert into `新环境的ApolloConfigDB`.`Namespace` select * from `其它环境的ApolloConfigDB`.`Namespace` where `ClusterName` = 'default' and `IsDeleted` = 0; 同时也别忘了通知用户在新的环境给自己的项目设置正确的配置信息,尤其是一些影响面比较大的公共namespace配置。 > 如果是为正在运行的环境迁移数据,建议迁移完重启一下config service,因为config service中有appnamespace的缓存数据 ### 2.1.3 调整服务端配置 Apollo自身的一些配置是放在数据库里面的,所以需要针对实际情况做一些调整,具体参数说明请参考[三、服务端配置说明](#三、服务端配置说明)。 大部分配置可以先使用默认值,不过 [apollo.portal.envs](#_311-apolloportalenvs-可支持的环境列表) 和 [eureka.service.url](#_321-eurekaserviceurl-eureka服务url) 请务必配置正确后再进行下面的部署步骤。 ## 2.2 虚拟机/物理机部署 ### 2.2.1 获取安装包 可以通过两种方式获取安装包: 1. 直接下载安装包 * 从[GitHub Release](https://github.com/ctripcorp/apollo/releases)页面下载预先打好的安装包 * 如果对Apollo的代码没有定制需求,建议使用这种方式,可以省去本地打包的过程 2. 通过源码构建 * 从[GitHub Release](https://github.com/ctripcorp/apollo/releases)页面下载Source code包或直接clone[源码](https://github.com/ctripcorp/apollo)后在本地构建 * 如果需要对Apollo的做定制开发,需要使用这种方式 #### 2.2.1.1 直接下载安装包 ##### 2.2.1.1.1 获取apollo-configservice、apollo-adminservice、apollo-portal安装包 从[GitHub Release](https://github.com/ctripcorp/apollo/releases)页面下载最新版本的`apollo-configservice-x.x.x-github.zip`、`apollo-adminservice-x.x.x-github.zip`和`apollo-portal-x.x.x-github.zip`即可。 ##### 2.2.1.1.2 配置数据库连接信息 Apollo服务端需要知道如何连接到你前面创建的数据库,数据库连接串信息位于上一步下载的压缩包中的`config/application-github.properties`中。 ###### 2.2.1.1.2.1 配置apollo-configservice的数据库连接信息 1. 解压`apollo-configservice-x.x.x-github.zip` 2. 用程序员专用编辑器(如vim,notepad++,sublime等)打开`config`目录下的`application-github.properties`文件 3. 填写正确的ApolloConfigDB数据库连接串信息,注意用户名和密码后面不要有空格! 4. 修改完的效果如下: ```properties # DataSource spring.datasource.url = jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 spring.datasource.username = someuser spring.datasource.password = somepwd ``` > 注:由于ApolloConfigDB在每个环境都有部署,所以对不同的环境config-service需要配置对应环境的数据库参数 ###### 2.2.1.1.2.2 配置apollo-adminservice的数据库连接信息 1. 解压`apollo-adminservice-x.x.x-github.zip` 2. 用程序员专用编辑器(如vim,notepad++,sublime等)打开`config`目录下的`application-github.properties`文件 3. 填写正确的ApolloConfigDB数据库连接串信息,注意用户名和密码后面不要有空格! 4. 修改完的效果如下: ```properties # DataSource spring.datasource.url = jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 spring.datasource.username = someuser spring.datasource.password = somepwd ``` > 注:由于ApolloConfigDB在每个环境都有部署,所以对不同的环境admin-service需要配置对应环境的数据库参数 ###### 2.2.1.1.2.3 配置apollo-portal的数据库连接信息 1. 解压`apollo-portal-x.x.x-github.zip` 2. 用程序员专用编辑器(如vim,notepad++,sublime等)打开`config`目录下的`application-github.properties`文件 3. 填写正确的ApolloPortalDB数据库连接串信息,注意用户名和密码后面不要有空格! 4. 修改完的效果如下: ```properties # DataSource spring.datasource.url = jdbc:mysql://localhost:3306/ApolloPortalDB?useSSL=false&characterEncoding=utf8 spring.datasource.username = someuser spring.datasource.password = somepwd ``` ###### 2.2.1.1.2.4 配置apollo-portal的meta service信息 Apollo Portal需要在不同的环境访问不同的meta service(apollo-configservice)地址,所以我们需要在配置中提供这些信息。默认情况下,meta service和config service是部署在同一个JVM进程,所以meta service的地址就是config service的地址。 > 对于1.6.0及以上版本,可以通过ApolloPortalDB.ServerConfig中的配置项来配置Meta Service地址,详见[apollo.portal.meta.servers - 各环境Meta Service列表](#_312-apolloportalmetaservers-各环境meta-service列表) 使用程序员专用编辑器(如vim,notepad++,sublime等)打开`apollo-portal-x.x.x-github.zip`中`config`目录下的`apollo-env.properties`文件。 假设DEV的apollo-configservice未绑定域名,地址是1.1.1.1:8080,FAT的apollo-configservice绑定了域名apollo.fat.xxx.com,UAT的apollo-configservice绑定了域名apollo.uat.xxx.com,PRO的apollo-configservice绑定了域名apollo.xxx.com,那么可以如下修改各环境meta service服务地址,格式为`${env}.meta=http://${config-service-url:port}`,如果某个环境不需要,也可以直接删除对应的配置项(如lpt.meta): ```sh dev.meta=http://1.1.1.1:8080 fat.meta=http://apollo.fat.xxx.com uat.meta=http://apollo.uat.xxx.com pro.meta=http://apollo.xxx.com ``` 除了通过`apollo-env.properties`方式配置meta service以外,apollo也支持在运行时指定meta service(优先级比`apollo-env.properties`高): 1. 通过Java System Property `${env}_meta` * 可以通过Java的System Property `${env}_meta`来指定 * 如`java -Ddev_meta=http://config-service-url -jar xxx.jar` * 也可以通过程序指定,如`System.setProperty("dev_meta", "http://config-service-url");` 2. 通过操作系统的System Environment`${ENV}_META` * 如`DEV_META=http://config-service-url` * 注意key为全大写,且中间是`_`分隔 >注1: 为了实现meta service的高可用,推荐通过SLB(Software Load Balancer)做动态负载均衡 >注2: meta service地址也可以填入IP,0.11.0版本之前只支持填入一个IP。从0.11.0版本开始支持填入以逗号分隔的多个地址([PR #1214](https://github.com/ctripcorp/apollo/pull/1214)),如`http://1.1.1.1:8080,http://2.2.2.2:8080`,不过生产环境还是建议使用域名(走slb),因为机器扩容、缩容等都可能导致IP列表的变化。 #### 2.2.1.2 通过源码构建 ##### 2.2.1.2.1 配置数据库连接信息 Apollo服务端需要知道如何连接到你前面创建的数据库,所以需要编辑[scripts/build.sh](https://github.com/ctripcorp/apollo/blob/master/scripts/build.sh),修改ApolloPortalDB和ApolloConfigDB相关的数据库连接串信息。 > 注意:填入的用户需要具备对ApolloPortalDB和ApolloConfigDB数据的读写权限。 ```sh #apollo config db info apollo_config_db_url=jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8 apollo_config_db_username=用户名 apollo_config_db_password=密码(如果没有密码,留空即可) # apollo portal db info apollo_portal_db_url=jdbc:mysql://localhost:3306/ApolloPortalDB?useSSL=false&characterEncoding=utf8 apollo_portal_db_username=用户名 apollo_portal_db_password=密码(如果没有密码,留空即可) ``` > 注1:由于ApolloConfigDB在每个环境都有部署,所以对不同的环境config-service和admin-service需要使用不同的数据库参数打不同的包,portal只需要打一次包即可 > 注2:如果不想config-service和admin-service每个环境打一个包的话,也可以通过运行时传入数据库连接串信息实现,具体可以参考 [Issue 869](https://github.com/ctripcorp/apollo/issues/869) > 注3:每个环境都需要独立部署一套config-service、admin-service和ApolloConfigDB ##### 2.2.1.2.2 配置各环境meta service地址 Apollo Portal需要在不同的环境访问不同的meta service(apollo-configservice)地址,所以需要在打包时提供这些信息。 假设DEV的apollo-configservice未绑定域名,地址是1.1.1.1:8080,FAT的apollo-configservice绑定了域名apollo.fat.xxx.com,UAT的apollo-configservice绑定了域名apollo.uat.xxx.com,PRO的apollo-configservice绑定了域名apollo.xxx.com,那么编辑[scripts/build.sh](https://github.com/ctripcorp/apollo/blob/master/scripts/build.sh),如下修改各环境meta service服务地址,格式为`${env}_meta=http://${config-service-url:port}`,如果某个环境不需要,也可以直接删除对应的配置项: ```sh dev_meta=http://1.1.1.1:8080 fat_meta=http://apollo.fat.xxx.com uat_meta=http://apollo.uat.xxx.com pro_meta=http://apollo.xxx.com META_SERVERS_OPTS="-Ddev_meta=$dev_meta -Dfat_meta=$fat_meta -Duat_meta=$uat_meta -Dpro_meta=$pro_meta" ``` 除了在打包时配置meta service以外,apollo也支持在运行时指定meta service: 1. 通过Java System Property `${env}_meta` * 可以通过Java的System Property `${env}_meta`来指定 * 如`java -Ddev_meta=http://config-service-url -jar xxx.jar` * 也可以通过程序指定,如`System.setProperty("dev_meta", "http://config-service-url");` 2. 通过操作系统的System Environment`${ENV}_META` * 如`DEV_META=http://config-service-url` * 注意key为全大写,且中间是`_`分隔 >注1: 为了实现meta service的高可用,推荐通过SLB(Software Load Balancer)做动态负载均衡 >注2: meta service地址也可以填入IP,0.11.0版本之前只支持填入一个IP。从0.11.0版本开始支持填入以逗号分隔的多个地址([PR #1214](https://github.com/ctripcorp/apollo/pull/1214)),如`http://1.1.1.1:8080,http://2.2.2.2:8080`,不过生产环境还是建议使用域名(走slb),因为机器扩容、缩容等都可能导致IP列表的变化。 ##### 2.2.1.2.3 执行编译、打包 做完上述配置后,就可以执行编译和打包了。 > 注:初次编译会从Maven中央仓库下载不少依赖,如果网络情况不佳时很容易出错,建议使用国内的Maven仓库源,比如[阿里云Maven镜像](http://www.cnblogs.com/geektown/p/5705405.html) ```sh ./build.sh ``` 该脚本会依次打包apollo-configservice, apollo-adminservice, apollo-portal。 > 注:由于ApolloConfigDB在每个环境都有部署,所以对不同环境的config-service和admin-service需要使用不同的数据库连接信息打不同的包,portal只需要打一次包即可 ##### 2.2.1.2.4 获取apollo-configservice安装包 位于`apollo-configservice/target/`目录下的`apollo-configservice-x.x.x-github.zip` 需要注意的是由于ApolloConfigDB在每个环境都有部署,所以对不同环境的config-service需要使用不同的数据库参数打不同的包后分别部署 ##### 2.2.1.2.5 获取apollo-adminservice安装包 位于`apollo-adminservice/target/`目录下的`apollo-adminservice-x.x.x-github.zip` 需要注意的是由于ApolloConfigDB在每个环境都有部署,所以对不同环境的admin-service需要使用不同的数据库参数打不同的包后分别部署 ##### 2.2.1.2.6 获取apollo-portal安装包 位于`apollo-portal/target/`目录下的`apollo-portal-x.x.x-github.zip` ##### 2.2.1.2.7 启用外部nacos服务注册中心替换内置eureka 1. 修改build.sh/build.bat,将config-service和admin-service的maven编译命令更改为 ```shell mvn clean package -Pgithub,nacos-discovery -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,nacos-discovery -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password ``` 2. 分别修改apollo-configservice和apollo-adminservice安装包中config目录下的application-github.properties,配置nacos服务器地址 ```properties nacos.discovery.server-addr=127.0.0.1:8848 # 更多 nacos 配置 nacos.discovery.access-key= nacos.discovery.username= nacos.discovery.password= nacos.discovery.secret-key= nacos.discovery.namespace= nacos.discovery.context-path= ``` ##### 2.2.1.2.8 启用外部Consul服务注册中心替换内置eureka 1. 修改build.sh/build.bat,将config-service和admin-service的maven编译命令更改为 ```shell mvn clean package -Pgithub -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,consul-discovery -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password ``` 2. 分别修改apollo-configservice和apollo-adminservice安装包中config目录下的application-github.properties,配置consul服务器地址 ```properties spring.cloud.consul.host=127.0.0.1 spring.cloud.consul.port=8500 ``` ### 2.2.2 部署Apollo服务端 #### 2.2.2.1 部署apollo-configservice 将对应环境的`apollo-configservice-x.x.x-github.zip`上传到服务器上,解压后执行scripts/startup.sh即可。如需停止服务,执行scripts/shutdown.sh. 记得在scripts/startup.sh中按照实际的环境设置一个JVM内存,以下是我们的默认设置,供参考: ```bash export JAVA_OPTS="-server -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=18" ``` > 注1:如果需要修改JVM参数,可以修改scripts/startup.sh的`JAVA_OPTS`部分。 > 注2:如要调整服务的日志输出路径,可以修改scripts/startup.sh和apollo-configservice.conf中的`LOG_DIR`。 > 注3:如要调整服务的监听端口,可以修改scripts/startup.sh中的`SERVER_PORT`。另外apollo-configservice同时承担meta server职责,如果要修改端口,注意要同时ApolloConfigDB.ServerConfig表中的`eureka.service.url`配置项以及apollo-portal和apollo-client中的使用到的meta server信息,详见:[2.2.1.1.2.4 配置apollo-portal的meta service信息](#_221124-配置apollo-portal的meta-service信息)和[1.2.2 Apollo Meta Server](zh/usage/java-sdk-user-guide#_122-apollo-meta-server)。 > 注4:如果ApolloConfigDB.ServerConfig的eureka.service.url只配了当前正在启动的机器的话,在启动apollo-configservice的过程中会在日志中输出eureka注册失败的信息,如`com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused`。需要注意的是,这个是预期的情况,因为apollo-configservice需要向Meta Server(它自己)注册服务,但是因为在启动过程中,自己还没起来,所以会报这个错。后面会进行重试的动作,所以等自己服务起来后就会注册正常了。 > 注5:如果你看到了这里,相信你一定是一个细心阅读文档的人,而且离成功就差一点点了,继续加油,应该很快就能完成Apollo的分布式部署了!不过你是否有感觉Apollo的分布式部署步骤有点繁琐?是否有啥建议想要和作者说?如果答案是肯定的话,请移步 [#1424](https://github.com/ctripcorp/apollo/issues/1424),期待你的建议! #### 2.2.2.2 部署apollo-adminservice 将对应环境的`apollo-adminservice-x.x.x-github.zip`上传到服务器上,解压后执行scripts/startup.sh即可。如需停止服务,执行scripts/shutdown.sh. 记得在scripts/startup.sh中按照实际的环境设置一个JVM内存,以下是我们的默认设置,供参考: ```bash export JAVA_OPTS="-server -Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:SurvivorRatio=22" ``` > 注1:如果需要修改JVM参数,可以修改scripts/startup.sh的`JAVA_OPTS`部分。 > 注2:如要调整服务的日志输出路径,可以修改scripts/startup.sh和apollo-adminservice.conf中的`LOG_DIR`。 > 注3:如要调整服务的监听端口,可以修改scripts/startup.sh中的`SERVER_PORT`。 #### 2.2.2.3 部署apollo-portal 将`apollo-portal-x.x.x-github.zip`上传到服务器上,解压后执行scripts/startup.sh即可。如需停止服务,执行scripts/shutdown.sh. 记得在startup.sh中按照实际的环境设置一个JVM内存,以下是我们的默认设置,供参考: ```bash export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22" ``` > 注1:如果需要修改JVM参数,可以修改scripts/startup.sh的`JAVA_OPTS`部分。 > 注2:如要调整服务的日志输出路径,可以修改scripts/startup.sh和apollo-portal.conf中的`LOG_DIR`。 > 注3:如要调整服务的监听端口,可以修改scripts/startup.sh中的`SERVER_PORT`。 ## 2.3 Docker部署 ### 2.3.1 1.7.0及以上版本 Apollo 1.7.0版本开始会默认上传Docker镜像到[Docker Hub](https://hub.docker.com/u/apolloconfig),可以按照如下步骤获取 #### 2.3.1.1 Apollo Config Service ##### 2.3.1.1.1 获取镜像 ```bash docker pull apolloconfig/apollo-configservice:${version} ``` ##### 2.3.1.1.2 运行镜像 示例: ```bash docker run -p 8080:8080 \ -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" \ -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword \ -d -v /tmp/logs:/opt/logs --name apollo-configservice apolloconfig/apollo-configservice:${version} ``` 参数说明: * SPRING_DATASOURCE_URL: 对应环境ApolloConfigDB的地址 * SPRING_DATASOURCE_USERNAME: 对应环境ApolloConfigDB的用户名 * SPRING_DATASOURCE_PASSWORD: 对应环境ApolloConfigDB的密码 #### 2.3.1.2 Apollo Admin Service ##### 2.3.1.2.1 获取镜像 ```bash docker pull apolloconfig/apollo-adminservice:${version} ``` ##### 2.3.1.2.2 运行镜像 示例: ```bash docker run -p 8090:8090 \ -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloConfigDB?characterEncoding=utf8" \ -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword \ -d -v /tmp/logs:/opt/logs --name apollo-adminservice apolloconfig/apollo-adminservice:${version} ``` 参数说明: * SPRING_DATASOURCE_URL: 对应环境ApolloConfigDB的地址 * SPRING_DATASOURCE_USERNAME: 对应环境ApolloConfigDB的用户名 * SPRING_DATASOURCE_PASSWORD: 对应环境ApolloConfigDB的密码 #### 2.3.1.3 Apollo Portal ##### 2.3.1.3.1 获取镜像 ```bash docker pull apolloconfig/apollo-portal:${version} ``` ##### 2.3.1.3.2 运行镜像 示例: ```bash docker run -p 8070:8070 \ -e SPRING_DATASOURCE_URL="jdbc:mysql://fill-in-the-correct-server:3306/ApolloPortalDB?characterEncoding=utf8" \ -e SPRING_DATASOURCE_USERNAME=FillInCorrectUser -e SPRING_DATASOURCE_PASSWORD=FillInCorrectPassword \ -e APOLLO_PORTAL_ENVS=dev,pro \ -e DEV_META=http://fill-in-dev-meta-server:8080 -e PRO_META=http://fill-in-pro-meta-server:8080 \ -d -v /tmp/logs:/opt/logs --name apollo-portal apolloconfig/apollo-portal:${version} ``` 参数说明: * SPRING_DATASOURCE_URL: 对应环境ApolloPortalDB的地址 * SPRING_DATASOURCE_USERNAME: 对应环境ApolloPortalDB的用户名 * SPRING_DATASOURCE_PASSWORD: 对应环境ApolloPortalDB的密码 * APOLLO_PORTAL_ENVS(可选): 对应ApolloPortalDB中的[apollo.portal.envs](#_311-apolloportalenvs-可支持的环境列表)配置项,如果没有在数据库中配置的话,可以通过此环境参数配置 * DEV_META/PRO_META(可选): 配置对应环境的Meta Service地址,以${ENV}_META命名,需要注意的是如果配置了ApolloPortalDB中的[apollo.portal.meta.servers](#_312-apolloportalmetaservers-各环境meta-service列表)配置,则以apollo.portal.meta.servers中的配置为准 #### 2.3.1.4 通过源码构建 Docker 镜像 如果修改了 apollo 服务端的代码,希望通过源码构建 Docker 镜像,可以参考下面的步骤: 1. 通过源码构建安装包:`./scripts/build.sh` 2. 构建 Docker 镜像:`mvn docker:build -pl apollo-configservice,apollo-adminservice,apollo-portal` ### 2.3.2 1.7.0之前的版本 Apollo项目已经自带了Docker file,可以参照[2.2.1 获取安装包](#_221-获取安装包)配置好安装包后通过下面的文件来打Docker镜像: 1. [apollo-configservice](https://github.com/ctripcorp/apollo/blob/master/apollo-configservice/src/main/docker/Dockerfile) 2. [apollo-adminservice](https://github.com/ctripcorp/apollo/blob/master/apollo-adminservice/src/main/docker/Dockerfile) 3. [apollo-portal](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/docker/Dockerfile) 也可以参考Apollo用户[@kulovecc](https://github.com/kulovecc)的[docker-apollo](https://github.com/kulovecc/docker-apollo)项目和[@idoop](https://github.com/idoop)的[docker-apollo](https://github.com/idoop/docker-apollo)项目。 ## 2.4 Kubernetes部署 ### 2.4.1 基于Kubernetes原生服务发现 Apollo 1.7.0版本增加了基于Kubernetes原生服务发现的部署模式,由于不再使用内置的Eureka,所以在整体部署上有很大简化,同时也提供了Helm Charts,便于部署。 > 更多设计说明可以参考[#3054](https://github.com/ctripcorp/apollo/issues/3054)。 #### 2.4.1.1 环境要求 - Kubernetes 1.10+ - Helm 3 #### 2.4.1.2 添加Apollo Helm Chart仓库 ```bash $ helm repo add apollo https://www.apolloconfig.com/charts $ helm search repo apollo ``` #### 2.4.1.3 部署apollo-configservice和apollo-adminservice ##### 2.4.1.3.1 安装apollo-configservice和apollo-adminservice 需要在每个环境中安装apollo-configservice和apollo-adminservice,所以建议在release名称中加入环境信息,例如:`apollo-service-dev` ```bash $ helm install apollo-service-dev \ --set configdb.host=1.2.3.4 \ --set configdb.userName=apollo \ --set configdb.password=apollo \ --set configdb.service.enabled=true \ --set configService.replicaCount=1 \ --set adminService.replicaCount=1 \ -n your-namespace \ apollo/apollo-service ``` 一般部署建议通过 values.yaml 来配置: ```bash $ helm install apollo-service-dev -f values.yaml -n your-namespace apollo/apollo-service ``` 安装完成后会提示对应环境的Meta Server地址,需要记录下来,apollo-portal安装时需要用到: ```bash Get meta service url for current release by running these commands: echo http://apollo-service-dev-apollo-configservice:8080 ``` > 更多配置项说明可以参考[2.4.1.3.3 配置项说明](#_24133-配置项说明) ##### 2.4.1.3.2 卸载apollo-configservice和apollo-adminservice 例如要卸载`apollo-service-dev`的部署: ```bash $ helm uninstall -n your-namespace apollo-service-dev ``` ##### 2.4.1.3.3 配置项说明 下表列出了apollo-service chart的可配置参数及其默认值: | Parameter | Description | Default | |----------------------|---------------------------------------------|---------------------| | `configdb.host` | The host for apollo config db | `nil` | | `configdb.port` | The port for apollo config db | `3306` | | `configdb.dbName` | The database name for apollo config db | `ApolloConfigDB` | | `configdb.userName` | The user name for apollo config db | `nil` | | `configdb.password` | The password for apollo config db | `nil` | | `configdb.connectionStringProperties` | The connection string properties for apollo config db | `characterEncoding=utf8` | | `configdb.service.enabled` | Whether to create a Kubernetes Service for `configdb.host` or not. Set it to `true` if `configdb.host` is an endpoint outside of the kubernetes cluster | `false` | | `configdb.service.fullNameOverride` | Override the service name for apollo config db | `nil` | | `configdb.service.port` | The port for the service of apollo config db | `3306` | | `configdb.service.type` | The service type of apollo config db: `ClusterIP` or `ExternalName`. If the host is a DNS name, please specify `ExternalName` as the service type, e.g. `xxx.mysql.rds.aliyuncs.com` | `ClusterIP` | | `configService.fullNameOverride` | Override the deployment name for apollo-configservice | `nil` | | `configService.replicaCount` | Replica count of apollo-configservice | `2` | | `configService.containerPort` | Container port of apollo-configservice | `8080` | | `configService.image.repository` | Image repository of apollo-configservice | `apolloconfig/apollo-configservice` | | `configService.image.tag` | Image tag of apollo-configservice, e.g. `1.8.0`, leave it to `nil` to use the default version. _(chart version >= 0.2.0)_ | `nil` | | `configService.image.pullPolicy` | Image pull policy of apollo-configservice | `IfNotPresent` | | `configService.imagePullSecrets` | Image pull secrets of apollo-configservice | `[]` | | `configService.service.fullNameOverride` | Override the service name for apollo-configservice | `nil` | | `configService.service.port` | The port for the service of apollo-configservice | `8080` | | `configService.service.targetPort` | The target port for the service of apollo-configservice | `8080` | | `configService.service.type` | The service type of apollo-configservice | `ClusterIP` | | `configService.ingress.enabled` | Whether to enable the ingress for config-service or not. _(chart version >= 0.2.0)_ | `false` | | `configService.ingress.annotations` | The annotations of the ingress for config-service. _(chart version >= 0.2.0)_ | `{}` | | `configService.ingress.hosts.host` | The host of the ingress for config-service. _(chart version >= 0.2.0)_ | `nil` | | `configService.ingress.hosts.paths` | The paths of the ingress for config-service. _(chart version >= 0.2.0)_ | `[]` | | `configService.ingress.tls` | The tls definition of the ingress for config-service. _(chart version >= 0.2.0)_ | `[]` | | `configService.liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `configService.liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `configService.readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `configService.readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `configService.config.profiles` | specify the spring profiles to activate | `github,kubernetes` | | `configService.config.configServiceUrlOverride` | Override `apollo.config-service.url`: config service url to be accessed by apollo-client, e.g. `http://apollo-config-service-dev:8080` | `nil` | | `configService.config.adminServiceUrlOverride` | Override `apollo.admin-service.url`: admin service url to be accessed by apollo-portal, e.g. `http://apollo-admin-service-dev:8090` | `nil` | | `configService.config.contextPath` | specify the context path, e.g. `/apollo`, then users could access config service via `http://{config_service_address}/apollo`. _(chart version >= 0.2.0)_ | `nil` | | `configService.env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `configService.strategy` | The deployment strategy of apollo-configservice | `{}` | | `configService.resources` | The resources definition of apollo-configservice | `{}` | | `configService.nodeSelector` | The node selector definition of apollo-configservice | `{}` | | `configService.tolerations` | The tolerations definition of apollo-configservice | `[]` | | `configService.affinity` | The affinity definition of apollo-configservice | `{}` | | `adminService.fullNameOverride` | Override the deployment name for apollo-adminservice | `nil` | | `adminService.replicaCount` | Replica count of apollo-adminservice | `2` | | `adminService.containerPort` | Container port of apollo-adminservice | `8090` | | `adminService.image.repository` | Image repository of apollo-adminservice | `apolloconfig/apollo-adminservice` | | `adminService.image.tag` | Image tag of apollo-adminservice, e.g. `1.8.0`, leave it to `nil` to use the default version. _(chart version >= 0.2.0)_ | `nil` | | `adminService.image.pullPolicy` | Image pull policy of apollo-adminservice | `IfNotPresent` | | `adminService.imagePullSecrets` | Image pull secrets of apollo-adminservice | `[]` | | `adminService.service.fullNameOverride` | Override the service name for apollo-adminservice | `nil` | | `adminService.service.port` | The port for the service of apollo-adminservice | `8090` | | `adminService.service.targetPort` | The target port for the service of apollo-adminservice | `8090` | | `adminService.service.type` | The service type of apollo-adminservice | `ClusterIP` | | `adminService.ingress.enabled` | Whether to enable the ingress for admin-service or not. _(chart version >= 0.2.0)_ | `false` | | `adminService.ingress.annotations` | The annotations of the ingress for admin-service. _(chart version >= 0.2.0)_ | `{}` | | `adminService.ingress.hosts.host` | The host of the ingress for admin-service. _(chart version >= 0.2.0)_ | `nil` | | `adminService.ingress.hosts.paths` | The paths of the ingress for admin-service. _(chart version >= 0.2.0)_ | `[]` | | `adminService.ingress.tls` | The tls definition of the ingress for admin-service. _(chart version >= 0.2.0)_ | `[]` | | `adminService.liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `adminService.liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `adminService.readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `adminService.readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `adminService.config.profiles` | specify the spring profiles to activate | `github,kubernetes` | | `adminService.config.contextPath` | specify the context path, e.g. `/apollo`, then users could access admin service via `http://{admin_service_address}/apollo`. _(chart version >= 0.2.0)_ | `nil` | | `adminService.env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `adminService.strategy` | The deployment strategy of apollo-adminservice | `{}` | | `adminService.resources` | The resources definition of apollo-adminservice | `{}` | | `adminService.nodeSelector` | The node selector definition of apollo-adminservice | `{}` | | `adminService.tolerations` | The tolerations definition of apollo-adminservice | `[]` | | `adminService.affinity` | The affinity definition of apollo-adminservice | `{}` | ##### 2.4.1.3.4 配置样例 ###### 2.4.1.3.4.1 ConfigDB的host是k8s集群外的IP ```yaml configdb: host: 1.2.3.4 dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true ``` ###### 2.4.1.3.4.2 ConfigDB的host是k8s集群外的域名 ```yaml configdb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName ``` ###### 2.4.1.3.4.3 ConfigDB的host是k8s集群内的一个服务 ```yaml configdb: host: apollodb-mysql.mysql dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false ``` ###### 2.4.1.3.4.4 指定Meta Server返回的apollo-configservice地址 如果apollo-client无法直接访问apollo-configservice的Service(比如不在同一个k8s集群),那么可以参照下面的示例指定Meta Server返回给apollo-client的地址(比如可以通过nodeport访问) ```yaml configService: config: configServiceUrlOverride: http://1.2.3.4:12345 ``` ###### 2.4.1.3.4.5 指定Meta Server返回的apollo-adminservice地址 如果apollo-portal无法直接访问apollo-adminservice的Service(比如不在同一个k8s集群),那么可以参照下面的示例指定Meta Server返回给apollo-portal的地址(比如可以通过nodeport访问) ```yaml configService: config: adminServiceUrlOverride: http://1.2.3.4:23456 ``` ###### 2.4.1.3.4.6 以Ingress配置自定义路径`/config`形式暴露apollo-configservice服务 ```yaml # use /config as root, should specify configService.config.contextPath as /config configService: config: contextPath: /config ingress: enabled: true hosts: - paths: - /config ``` ###### 2.4.1.3.4.7 以Ingress配置自定义路径`/admin`形式暴露apollo-adminservice服务 ```yaml # use /admin as root, should specify adminService.config.contextPath as /admin adminService: config: contextPath: /admin ingress: enabled: true hosts: - paths: - /admin ``` #### 2.4.1.4 部署apollo-portal ##### 2.4.1.4.1 安装apollo-portal 假设有dev, pro两个环境,且meta server地址分别为`http://apollo-service-dev-apollo-configservice:8080`和`http://apollo-service-pro-apollo-configservice:8080`: ```bash $ helm install apollo-portal \ --set portaldb.host=1.2.3.4 \ --set portaldb.userName=apollo \ --set portaldb.password=apollo \ --set portaldb.service.enabled=true \ --set config.envs="dev\,pro" \ --set config.metaServers.dev=http://apollo-service-dev-apollo-configservice:8080 \ --set config.metaServers.pro=http://apollo-service-pro-apollo-configservice:8080 \ --set replicaCount=1 \ -n your-namespace \ apollo/apollo-portal ``` 一般部署建议通过 values.yaml 来配置: ```bash $ helm install apollo-portal -f values.yaml -n your-namespace apollo/apollo-portal ``` > 更多配置项说明可以参考[2.4.1.4.3 配置项说明](#_24143-配置项说明) ##### 2.4.1.4.2 卸载apollo-portal 例如要卸载`apollo-portal`的部署: ```bash $ helm uninstall -n your-namespace apollo-portal ``` ##### 2.4.1.4.3 配置项说明 下表列出了apollo-portal chart的可配置参数及其默认值: | Parameter | Description | Default | |----------------------|---------------------------------------------|-----------------------| | `fullNameOverride` | Override the deployment name for apollo-portal | `nil` | | `replicaCount` | Replica count of apollo-portal | `2` | | `containerPort` | Container port of apollo-portal | `8070` | | `image.repository` | Image repository of apollo-portal | `apolloconfig/apollo-portal` | | `image.tag` | Image tag of apollo-portal, e.g. `1.8.0`, leave it to `nil` to use the default version. _(chart version >= 0.2.0)_ | `nil` | | `image.pullPolicy` | Image pull policy of apollo-portal | `IfNotPresent` | | `imagePullSecrets` | Image pull secrets of apollo-portal | `[]` | | `service.fullNameOverride` | Override the service name for apollo-portal | `nil` | | `service.port` | The port for the service of apollo-portal | `8070` | | `service.targetPort` | The target port for the service of apollo-portal | `8070` | | `service.type` | The service type of apollo-portal | `ClusterIP` | | `service.sessionAffinity` | The session affinity for the service of apollo-portal | `ClientIP` | | `ingress.enabled` | Whether to enable the ingress or not | `false` | | `ingress.annotations` | The annotations of the ingress | `{}` | | `ingress.hosts.host` | The host of the ingress | `nil` | | `ingress.hosts.paths` | The paths of the ingress | `[]` | | `ingress.tls` | The tls definition of the ingress | `[]` | | `liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `strategy` | The deployment strategy of apollo-portal | `{}` | | `resources` | The resources definition of apollo-portal | `{}` | | `nodeSelector` | The node selector definition of apollo-portal | `{}` | | `tolerations` | The tolerations definition of apollo-portal | `[]` | | `affinity` | The affinity definition of apollo-portal | `{}` | | `config.profiles` | specify the spring profiles to activate | `github,auth` | | `config.envs` | specify the env names, e.g. `dev,pro` | `nil` | | `config.contextPath` | specify the context path, e.g. `/apollo`, then users could access portal via `http://{portal_address}/apollo` | `nil` | | `config.metaServers` | specify the meta servers, e.g.<br />`dev: http://apollo-configservice-dev:8080`<br />`pro: http://apollo-configservice-pro:8080` | `{}` | | `config.files` | specify the extra config files for apollo-portal, e.g. `application-ldap.yml` | `{}` | | `portaldb.host` | The host for apollo portal db | `nil` | | `portaldb.port` | The port for apollo portal db | `3306` | | `portaldb.dbName` | The database name for apollo portal db | `ApolloPortalDB` | | `portaldb.userName` | The user name for apollo portal db | `nil` | | `portaldb.password` | The password for apollo portal db | `nil` | | `portaldb.connectionStringProperties` | The connection string properties for apollo portal db | `characterEncoding=utf8` | | `portaldb.service.enabled` | Whether to create a Kubernetes Service for `portaldb.host` or not. Set it to `true` if `portaldb.host` is an endpoint outside of the kubernetes cluster | `false` | | `portaldb.service.fullNameOverride` | Override the service name for apollo portal db | `nil` | | `portaldb.service.port` | The port for the service of apollo portal db | `3306` | | `portaldb.service.type` | The service type of apollo portal db: `ClusterIP` or `ExternalName`. If the host is a DNS name, please specify `ExternalName` as the service type, e.g. `xxx.mysql.rds.aliyuncs.com` | `ClusterIP` | ##### 2.4.1.4.4 配置样例 ###### 2.4.1.4.4.1 PortalDB的host是k8s集群外的IP ```yaml portaldb: host: 1.2.3.4 dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true ``` ###### 2.4.1.4.4.2 PortalDB的host是k8s集群外的域名 ```yaml portaldb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName ``` ###### 2.4.1.4.4.3 PortalDB的host是k8s集群内的一个服务 ```yaml portaldb: host: apollodb-mysql.mysql dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false ``` ###### 2.4.1.4.4.4 配置环境信息 ```yaml config: envs: dev,pro metaServers: dev: http://apollo-service-dev-apollo-configservice:8080 pro: http://apollo-service-pro-apollo-configservice:8080 ``` ###### 2.4.1.4.4.5 以Load Balancer形式暴露服务 ```yaml service: type: LoadBalancer ``` ###### 2.4.1.4.4.6 以Ingress形式暴露服务 ```yaml ingress: enabled: true hosts: - paths: - / ``` ###### 2.4.1.4.4.7 以Ingress配置自定义路径`/apollo`形式暴露服务 ```yaml # use /apollo as root, should specify config.contextPath as /apollo ingress: enabled: true hosts: - paths: - /apollo config: ... contextPath: /apollo ... ``` ###### 2.4.1.4.4.8 以Ingress配置session affinity形式暴露服务 ```yaml ingress: enabled: true annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/affinity-mode: "persistent" nginx.ingress.kubernetes.io/session-cookie-conditional-samesite-none: "true" nginx.ingress.kubernetes.io/session-cookie-expires: "172800" nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" hosts: - host: xxx.somedomain.com # host is required to make session affinity work paths: - / ``` ###### 2.4.1.4.4.9 启用 LDAP 支持 ```yaml config: ... profiles: github,ldap ... files: application-ldap.yml: | spring: ldap: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" password: "password" searchFilter: "(uid={0})" urls: - "ldap://xxx.somedomain.com:389" ldap: mapping: objectClass: "inetOrgPerson" loginId: "uid" userDisplayName: "cn" email: "mail" ``` #### 2.4.1.5 通过源码构建 Docker 镜像 如果修改了 apollo 服务端的代码,希望通过源码构建 Docker 镜像,可以参考[2.3.1.4 通过源码构建 Docker 镜像](#_2314-通过源码构建-docker-镜像)的步骤。 ### 2.4.2 基于内置的Eureka服务发现 感谢[AiotCEO](https://github.com/AiotCEO)提供了k8s的部署支持,使用说明可以参考[apollo-on-kubernetes](https://github.com/ctripcorp/apollo/blob/master/scripts/apollo-on-kubernetes/README.md)。 感谢[qct](https://github.com/qct)提供的Helm Chart部署支持,使用说明可以参考[qct/apollo-helm](https://github.com/qct/apollo-helm)。 # 三、服务端配置说明 > 以下配置除了支持在数据库中配置以外,也支持通过-D参数、application.properties等配置,且-D参数、application.properties等优先级高于数据库中的配置 ## 3.1 调整ApolloPortalDB配置 配置项统一存储在ApolloPortalDB.ServerConfig表中,也可以通过`管理员工具 - 系统参数`页面进行配置,无特殊说明则修改完一分钟实时生效。 ### 3.1.1 apollo.portal.envs - 可支持的环境列表 默认值是dev,如果portal需要管理多个环境的话,以逗号分隔即可(大小写不敏感),如: ``` DEV,FAT,UAT,PRO ``` 修改完需要重启生效。 >注1:一套Portal可以管理多个环境,但是每个环境都需要独立部署一套Config Service、Admin Service和ApolloConfigDB,具体请参考:[2.1.2 创建ApolloConfigDB](#_212-创建apolloconfigdb),[3.2 调整ApolloConfigDB配置](zh/deployment/distributed-deployment-guide?id=_32-调整apolloconfigdb配置),[2.2.1.1.2 配置数据库连接信息](#_22112-配置数据库连接信息),另外如果是为已经运行了一段时间的Apollo配置中心增加环境,别忘了参考[2.1.2.4 从别的环境导入ApolloConfigDB的项目数据](#_2124-从别的环境导入apolloconfigdb的项目数据)对新的环境做初始化。 >注2:只在数据库添加环境是不起作用的,还需要为apollo-portal添加新增环境对应的meta server地址,具体参考:[2.2.1.1.2.4 配置apollo-portal的meta service信息](#_221124-配置apollo-portal的meta-service信息)。apollo-client在新的环境下使用时也需要做好相应的配置,具体参考:[1.2.2 Apollo Meta Server](zh/usage/java-sdk-user-guide#_122-apollo-meta-server)。 >注3:如果希望添加自定义的环境名称,具体步骤可以参考[Portal如何增加环境](zh/faq/common-issues-in-deployment-and-development-phase?id=_4-portal如何增加环境?)。 >注4:1.1.0版本增加了系统信息页面(`管理员工具` -> `系统信息`),可以通过该页面检查配置是否正确 ### 3.1.2 apollo.portal.meta.servers - 各环境Meta Service列表 > 适用于1.6.0及以上版本 Apollo Portal需要在不同的环境访问不同的meta service(apollo-configservice)地址,所以我们需要在配置中提供这些信息。默认情况下,meta service和config service是部署在同一个JVM进程,所以meta service的地址就是config service的地址。 样例如下: ```json { "DEV":"http://1.1.1.1:8080", "FAT":"http://apollo.fat.xxx.com", "UAT":"http://apollo.uat.xxx.com", "PRO":"http://apollo.xxx.com" } ``` 修改完需要重启生效。 > 该配置优先级高于其它方式设置的Meta Service地址,更多信息可以参考[2.2.1.1.2.4 配置apollo-portal的meta service信息](#_221124-配置apollo-portal的meta-service信息)。 ### 3.1.3 organizations - 部门列表 Portal中新建的App都需要选择部门,所以需要在这里配置可选的部门信息,样例如下: ```json [{"orgId":"TEST1","orgName":"样例部门1"},{"orgId":"TEST2","orgName":"样例部门2"}] ``` ### 3.1.4 superAdmin - Portal超级管理员 超级管理员拥有所有权限,需要谨慎设置。 如果没有接入自己公司的SSO系统的话,可以先暂时使用默认值apollo(默认用户)。等接入后,修改为实际使用的账号,多个账号以英文逗号分隔(,)。 ### 3.1.5 consumer.token.salt - consumer token salt 如果会使用开放平台API的话,可以设置一个token salt。如果不使用,可以忽略。 ### 3.1.6 wiki.address portal上“帮助”链接的地址,默认是Apollo github的wiki首页,可自行设置。 ### 3.1.7 admin.createPrivateNamespace.switch 是否允许项目管理员创建private namespace。设置为`true`允许创建,设置为`false`则项目管理员在页面上看不到创建private namespace的选项。[了解更多Namespace](zh/design/apollo-core-concept-namespace) ### 3.1.8 emergencyPublish.supported.envs 配置允许紧急发布的环境列表,多个env以英文逗号分隔。 当config service开启一次发布只能有一个人修改开关(`namespace.lock.switch`)后,一次配置发布只能是一个人修改,另一个发布。为了避免遇到紧急情况时(如非工作时间、节假日)无法发布配置,可以配置此项以允许某些环境可以操作紧急发布,即同一个人可以修改并发布配置。 ### 3.1.9 configView.memberOnly.envs 只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔。 对设定了只对项目成员显示配置信息的环境,只有该项目的管理员或拥有该namespace的编辑或发布权限的用户才能看到该私有namespace的配置信息和发布历史。公共namespace始终对所有用户可见。 > 从1.1.0版本开始支持,详见[PR 1531](https://github.com/ctripcorp/apollo/pull/1531) ### 3.1.10 role.create-application.enabled - 是否开启创建项目权限控制 > 适用于1.5.0及以上版本 默认为false,所有用户都可以创建项目 如果设置为true,那么只有超级管理员和拥有创建项目权限的帐号可以创建项目,超级管理员可以通过`管理员工具 - 系统权限管理`给用户分配创建项目权限 ### 3.1.11 role.manage-app-master.enabled - 是否开启项目管理员分配权限控制 > 适用于1.5.0及以上版本 默认为false,所有项目的管理员可以为项目添加/删除管理员 如果设置为true,那么只有超级管理员和拥有项目管理员分配权限的帐号可以为特定项目添加/删除管理员,超级管理员可以通过`管理员工具 - 系统权限管理`给用户分配特定项目的管理员分配权限 ### 3.1.12 admin-service.access.tokens - 设置apollo-portal访问各环境apollo-adminservice所需的access token > 适用于1.7.1及以上版本 如果对应环境的apollo-adminservice开启了[访问控制](#_326-admin-serviceaccesscontrolenabled-配置apollo-adminservice是否开启访问控制),那么需要在此配置apollo-portal访问该环境apollo-adminservice所需的access token,否则会访问失败 格式为json,如下所示: ```json { "dev" : "098f6bcd4621d373cade4e832627b4f6", "pro" : "ad0234829205b9033196ba818f7a872b" } ``` ## 3.2 调整ApolloConfigDB配置 配置项统一存储在ApolloConfigDB.ServerConfig表中,需要注意每个环境的ApolloConfigDB.ServerConfig都需要单独配置,修改完一分钟实时生效。 ### 3.2.1 eureka.service.url - Eureka服务Url > 不适用于基于Kubernetes原生服务发现场景 不管是apollo-configservice还是apollo-adminservice都需要向eureka服务注册,所以需要配置eureka服务地址。 按照目前的实现,apollo-configservice本身就是一个eureka服务,所以只需要填入apollo-configservice的地址即可,如有多个,用逗号分隔(注意不要忘了/eureka/后缀)。 需要注意的是每个环境只填入自己环境的eureka服务地址,比如FAT的apollo-configservice是1.1.1.1:8080和2.2.2.2:8080,UAT的apollo-configservice是3.3.3.3:8080和4.4.4.4:8080,PRO的apollo-configservice是5.5.5.5:8080和6.6.6.6:8080,那么: 1. 在FAT环境的ApolloConfigDB.ServerConfig表中设置eureka.service.url为: ``` http://1.1.1.1:8080/eureka/,http://2.2.2.2:8080/eureka/ ``` 2. 在UAT环境的ApolloConfigDB.ServerConfig表中设置eureka.service.url为: ``` http://3.3.3.3:8080/eureka/,http://4.4.4.4:8080/eureka/ ``` 3. 在PRO环境的ApolloConfigDB.ServerConfig表中设置eureka.service.url为: ``` http://5.5.5.5:8080/eureka/,http://6.6.6.6:8080/eureka/ ``` >注1:这里需要填写本环境中全部的eureka服务地址,因为eureka需要互相复制注册信息 >注2:如果希望将Config Service和Admin Service注册到公司统一的Eureka上,可以参考[部署&开发遇到的常见问题 - 将Config Service和Admin Service注册到单独的Eureka Server上](zh/faq/common-issues-in-deployment-and-development-phase#_8-将config-service和admin-service注册到单独的eureka-server上)章节 >注3:在多机房部署时,往往希望config service和admin service只向同机房的eureka注册,要实现这个效果,需要利用`ServerConfig`表中的cluster字段,config service和admin service会读取所在机器的`/opt/settings/server.properties`(Mac/Linux)或`C:\opt\settings\server.properties`(Windows)中的idc属性,如果该idc有对应的eureka.service.url配置,那么就只会向该机房的eureka注册。比如config service和admin service会部署到`SHAOY`和`SHAJQ`两个IDC,那么为了实现这两个机房中的服务只向该机房注册,那么可以在`ServerConfig`表中新增两条记录,分别填入`SHAOY`和`SHAJQ`两个机房的eureka地址即可,`default` cluster的记录可以保留,如果有config service和admin service不是部署在`SHAOY`和`SHAJQ`这两个机房的,就会使用这条默认配置。 | Key |Cluster | Value | Comment | |--------------------|-----------|-------------------------------|---------------------| | eureka.service.url | default | http://1.1.1.1:8080/eureka/ | 默认的Eureka服务Url | | eureka.service.url | SHAOY | http://2.2.2.2:8080/eureka/ | SHAOY的Eureka服务Url | | eureka.service.url | SHAJQ | http://3.3.3.3:8080/eureka/ | SHAJQ的Eureka服务Url | ### 3.2.2 namespace.lock.switch - 一次发布只能有一个人修改开关,用于发布审核 这是一个功能开关,如果配置为true的话,那么一次配置发布只能是一个人修改,另一个发布。 > 生产环境建议开启此选项 ### 3.2.3 config-service.cache.enabled - 是否开启配置缓存 这是一个功能开关,如果配置为true的话,config service会缓存加载过的配置信息,从而加快后续配置获取性能。 默认为false,开启前请先评估总配置大小并调整config service内存配置。 > 开启缓存后必须确保应用中配置的app.id大小写正确,否则将获取不到正确的配置 ### 3.2.4 item.key.length.limit - 配置项 key 最大长度限制 默认配置是128。 ### 3.2.5 item.value.length.limit - 配置项 value 最大长度限制 默认配置是20000。 #### 3.2.5.1 namespace.value.length.limit.override - namespace 的配置项 value 最大长度限制 此配置用来覆盖 `item.value.length.limit` 的配置,做到细粒度控制 namespace 的 value 最大长度限制,配置的值是一个 json 格式,json 的 key 为 namespace 在数据库中的 id 值,格式如下: ``` namespace.value.length.limit.override = {1:200,3:20} ``` 以上配置指定了 ApolloConfigDB.Namespace 表中 id=1 的 namespace 的 value 最大长度限制为 200,id=3 的 namespace 的 value 最大长度限制为 20 ### 3.2.6 admin-service.access.control.enabled - 配置apollo-adminservice是否开启访问控制 > 适用于1.7.1及以上版本 默认为false,如果配置为true,那么apollo-portal就需要[正确配置](#_3112-admin-serviceaccesstokens-设置apollo-portal访问各环境apollo-adminservice所需的access-token)访问该环境的access token,否则访问会被拒绝 ### 3.2.7 admin-service.access.tokens - 配置允许访问apollo-adminservice的access token列表 > 适用于1.7.1及以上版本 如果该配置项为空,那么访问控制不会生效。如果允许多个token,token 之间以英文逗号分隔 样例: ```properties admin-service.access.tokens=098f6bcd4621d373cade4e832627b4f6 admin-service.access.tokens=098f6bcd4621d373cade4e832627b4f6,ad0234829205b9033196ba818f7a872b ```
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./README.md
<img src="https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/logo/logo-simple.png" alt="apollo-logo" width="40%"> # Apollo - A reliable configuration management system [![Build Status](https://github.com/ctripcorp/apollo/workflows/build/badge.svg)](https://github.com/ctripcorp/apollo/actions) [![GitHub Release](https://img.shields.io/github/release/ctripcorp/apollo.svg)](https://github.com/ctripcorp/apollo/releases) [![Maven Central Repo](https://img.shields.io/maven-central/v/com.ctrip.framework.apollo/apollo.svg)](https://mvnrepository.com/artifact/com.ctrip.framework.apollo/apollo-client) [![codecov.io](https://codecov.io/github/ctripcorp/apollo/coverage.svg?branch=master)](https://codecov.io/github/ctripcorp/apollo?branch=master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) Apollo is a reliable configuration management system. It can centrally manage the configurations of different applications and different clusters. It is suitable for microservice configuration management scenarios. The server side is developed based on Spring Boot and Spring Cloud, which can simply run without the need to install additional application containers such as Tomcat. The Java SDK does not rely on any framework and can run in all Java runtime environments. It also has good support for Spring/Spring Boot environments. The .Net SDK does not rely on any framework and can run in all .Net runtime environments. For more details of the product introduction, please refer [Introduction to Apollo Configuration Center](https://www.apolloconfig.com/#/zh/design/apollo-introduction). For local demo purpose, please refer [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start). Demo Environment: - [http://106.54.227.205](http://106.54.227.205/) - User/Password: apollo/admin # Screenshots ![Screenshot](https://raw.githubusercontent.com/ctripcorp/apollo/master/docs/en/images/apollo-home-screenshot.jpg) # Features * **Unified management of the configurations of different environments and different clusters** * Apollo provides a unified interface to centrally manage the configurations of different environments, different clusters, and different namespaces * The same codebase could have different configurations when deployed in different clusters * With the namespace concept, it is easy to support multiple applications to share the same configurations, while also allowing them to customize the configurations * Multiple languages is provided in user interface(currently Chinese and English) * **Configuration changes takes effect in real time (hot release)** * After the user modified the configuration and released it in Apollo, the sdk will receive the latest configurations in real time (1 second) and notify the application * **Release version management** * Every configuration releases are versioned, which is friendly to support configuration rollback * **Grayscale release** * Support grayscale configuration release, for example, after clicking release, it will only take effect for some application instances. After a period of observation, we could push the configurations to all application instances if there is no problem * **Authorization management, release approval and operation audit** * Great authorization mechanism is designed for applications and configurations management, and the management of configurations is divided into two operations: editing and publishing, therefore greatly reducing human errors * All operations have audit logs for easy tracking of problems * **Client side configuration information monitoring** * It's very easy to see which instances are using the configurations and what versions they are using * **Rich SDKs available** * Provides native sdks of Java and .Net to facilitate application integration * Support Spring Placeholder, Annotation and Spring Boot ConfigurationProperties for easy application use (requires Spring 3.1.1+) * Http APIs are provided, so non-Java and .Net applications can integrate conveniently * Rich third party sdks are also available, e.g. Golang, Python, NodeJS, PHP, C, etc * **Open platform API** * Apollo itself provides a unified configuration management interface, which supports features such as multi-environment, multi-data center configuration management, permissions, and process governance * However, for the sake of versatility, Apollo will not put too many restrictions on the modification of the configuration, as long as it conforms to the basic format, it can be saved. * In our research, we found that for some users, their configurations may have more complicated formats, such as xml, json, and the format needs to be verified * There are also some users such as DAL, which not only have a specific format, but also need to verify the entered value before saving, such as checking whether the database, username and password match * For this type of application, Apollo allows the application to modify and release configurations through open APIs, which has great authorization and permission control mechanism built in * **Simple deployment** * As an infrastructure service, the configuration center has very high availability requirements, which forces Apollo to rely on external dependencies as little as possible * Currently, the only external dependency is MySQL, so the deployment is very simple. Apollo can run as long as Java and MySQL are installed * Apollo also provides a packaging script, which can generate all required installation packages with just one click, and supports customization of runtime parameters # Usage 1. [Apollo User Guide](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide) 2. [Java SDK User Guide](https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide) 3. [.Net SDK user Guide](https://www.apolloconfig.com/#/zh/usage/dotnet-sdk-user-guide) 4. [Third Party SDK User Guide](https://www.apolloconfig.com/#/zh/usage/third-party-sdks-user-guide) 5. [Other Language Client User Guide](https://www.apolloconfig.com/#/zh/usage/other-language-client-user-guide) 6. [Apollo Open APIs](https://www.apolloconfig.com/#/zh/usage/apollo-open-api-platform) 7. [Apollo Use Cases](https://github.com/ctripcorp/apollo-use-cases) 8. [Apollo User Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-practices) 9. [Apollo Security Best Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3) # Design * [Apollo Design](https://www.apolloconfig.com/#/zh/design/apollo-design) * [Apollo Core Concept - Namespace](https://www.apolloconfig.com/#/zh/design/apollo-core-concept-namespace) * [Apollo Architecture Analysis](https://mp.weixin.qq.com/s/-hUaQPzfsl9Lm3IqQW3VDQ) * [Apollo Source Code Explanation](http://www.iocoder.cn/categories/Apollo/) # Development * [Apollo Development Guide](https://www.apolloconfig.com/#/zh/development/apollo-development-guide) * Code Styles * [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) * [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) # Deployment * [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start) * [Distributed Deployment Guide](https://www.apolloconfig.com/#/zh/deployment/distributed-deployment-guide) # Release Notes * [Releases](https://github.com/ctripcorp/apollo/releases) # FAQ * [FAQ](https://www.apolloconfig.com/#/zh/faq/faq) * [Common Issues in Deployment & Development Phase](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase) # Presentation * [Design and Implementation Details of Apollo](http://www.itdks.com/dakalive/detail/3420) * [Slides](https://myslide.cn/slides/10168) * [Configuration Center Makes Microservices Smart](https://2018.qconshanghai.com/presentation/799) * [Slides](https://myslide.cn/slides/10035) # Publication * [Design and Implementation Details of Apollo](https://www.infoq.cn/article/open-source-configuration-center-apollo) * [Configuration Center Makes Microservices Smart](https://mp.weixin.qq.com/s/iDmYJre_ULEIxuliu1EbIQ) # Community * [Apollo Team](https://www.apolloconfig.com/#/en/community/team) * [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) * [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) # License The project is licensed under the [Apache 2 license](https://github.com/ctripcorp/apollo/blob/master/LICENSE). # Known Users > Sorted by registration order,users are welcome to register in [https://github.com/ctripcorp/apollo/issues/451](https://github.com/ctripcorp/apollo/issues/451) (reference purpose only for the community) <table> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctrip.png" alt="携程"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bluestone.png" alt="青石证券"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sagreen.png" alt="沙绿"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/umetrip.jpg" alt="航旅纵横"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuanzhuan.png" alt="58转转"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/phone580.png" alt="蜂助手"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hainan-airlines.png" alt="海南航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cvte.png" alt="CVTE"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mainbo.jpg" alt="明博教育"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/madailicai.png" alt="麻袋理财"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mxnavi.jpg" alt="美行科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fshows.jpg" alt="首展科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/feezu.png" alt="易微行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rencaijia.png" alt="人才加"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/keking.png" alt="凯京集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leoao.png" alt="乐刻运动"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dji.png" alt="大疆"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kkmh.png" alt="快看漫画"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wolaidai.png" alt="我来贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xsrj.png" alt="虚实软件"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yanxuan.png" alt="网易严选"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sjzg.png" alt="视觉中国"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zc360.png" alt="资产360"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ecarx.png" alt="亿咖通"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5173.png" alt="5173"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hujiang.png" alt="沪江"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163yun.png" alt="网易云基础服务"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cash-bus.png" alt="现金巴士"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/smartisan.png" alt="锤子科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toodc.png" alt="头等仓"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/juneyaoair.png" alt="吉祥航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/263mobile.png" alt="263移动通信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toutoujinrong.png" alt="投投金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mytijian.png" alt="每天健康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyabank.png" alt="麦芽金服"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fengunion.png" alt="蜂向科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/geex-logo.png" alt="即科金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beike.png" alt="贝壳网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/youzan.png" alt="有赞"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunjihuitong.png" alt="云集汇通"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rhinotech.png" alt="犀牛瀚海科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nxin.png" alt="农信互联"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mgzf.png" alt="蘑菇租房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huli-logo.png" alt="狐狸金服"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mandao.png" alt="漫道集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enmonster.png" alt="怪兽充电"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nanguazufang.png" alt="南瓜租房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shitoujinrong.png" alt="石投金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tubatu.png" alt="土巴兔"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/payh_logo.png" alt="平安银行"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinxindai.png" alt="新新贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chrtc.png" alt="中国华戎科技集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuya_logo.png" alt="涂鸦智能"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/szlcsc.jpg" alt="立创商城"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hairongyi.png" alt="乐赚金服"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kxqc.png" alt="开心汽车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppcredit.png" alt="乐赚金服"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/primeton.png" alt="普元信息"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoskeeper.png" alt="医帮管家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fula.png" alt="付啦信用卡管家"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uzai.png" alt="悠哉网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/91wutong.png" alt="梧桐诚选"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppdai.png" alt="拍拍贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinyongfei.png" alt="信用飞"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dxy.png" alt="丁香园"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ghtech.png" alt="国槐科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qbb.png" alt="亲宝宝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huawei_logo.png" alt="华为视频直播"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weiboyi.png" alt="微播易"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ofpay.png" alt="欧飞"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mishuo.png" alt="迷说"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yixia.png" alt="一下科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daocloud.png" alt="DaoCloud"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnvex.png" alt="汽摩交易所"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100tal.png" alt="好未来教育集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ainirobot.png" alt="猎户星空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuojian.png" alt="卓健科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoyor.png" alt="银江股份"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuhu.png" alt="途虎养车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/homedo.png" alt="河姆渡"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xwbank.png" alt="新网银行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctspcl.png" alt="中旅安信云贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meiyou.png" alt="美柚"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkh-logo.png" alt="震坤行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wgss.png" alt="万谷盛世"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/plateno.png" alt="铂涛旅行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lifesense.png" alt="乐心"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/reachmedia.png" alt="亿投传媒"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guxiansheng.png" alt="股先生"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caixuetang.png" alt="财学堂"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/4399.png" alt="4399"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autohome.png" alt="汽车之家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mbcaijing.png" alt="面包财经"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoopchina.png" alt="虎扑"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sohu-auto.png" alt="搜狐汽车"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/liangfuzhengxin.png" alt="量富征信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maihaoche.png" alt="卖好车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiot.jpg" alt="中移物联网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/biauto.png" alt="易车网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyaole.png" alt="一药网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoying.png" alt="小影"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caibeike.png" alt="彩贝壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeelight.png" alt="YEELIGHT"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/itsgmu.png" alt="积目"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acmedcare.png" alt="极致医疗"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhui365.png" alt="金汇金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/900etrip.png" alt="久柏易游"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/24xiaomai.png" alt="小麦铺"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vvic.png" alt="搜款网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mizlicai.png" alt="米庄理财"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bjt.png" alt="贝吉塔网络科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weimob.png" alt="微盟"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kada.png" alt="网易卡搭"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kapbook.png" alt="股书"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jumore.png" alt="聚贸"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bimface.png" alt="广联达bimface"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/globalgrow.png" alt="环球易购"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jollychic.png" alt="浙江执御"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2dfire.jpg" alt="二维火"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shopin.png" alt="上品"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inspur.png" alt="浪潮集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ngarihealth.png" alt="纳里健康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oraro.png" alt="橙红科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dragonpass.png" alt="龙腾出行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lizhi.fm.png" alt="荔枝"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/htd.png" alt="汇通达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunrong.png" alt="云融金科"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tszg360.png" alt="天生掌柜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rongplus.png" alt="容联光辉"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/intellif.png" alt="云天励飞"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jiayundata.png" alt="嘉云数据"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zts.png" alt="中泰证券网络金融部"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163dun.png" alt="网易易盾"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiangwushuo.png" alt="享物说"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sto.png" alt="申通"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhe.png" alt="金和网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2345.png" alt="二三四五"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chtwm.jpg" alt="恒天财富"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uweixin.png" alt="沐雪微信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wzeye.png" alt="温州医科大学附属眼视光医院"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/10010pay.png" alt="联通支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanshu.png" alt="杉数科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fenlibao.png" alt="分利宝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hetao101.png" alt="核桃编程"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaohongshu.png" alt="小红书"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/blissmall.png" alt="幸福西饼"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ky-express.png" alt="跨越速运"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oyohotels.png" alt="OYO"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100-me.png" alt="叮咚买菜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhidaohulian.jpg" alt="智道网联"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xueqiu.jpg" alt="雪球"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autocloudpro.png" alt="车通云"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dadaabc.png" alt="哒哒英语"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xedaojia.jpg" alt="小E微店"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daling.png" alt="达令家"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/renliwo.png" alt="人力窝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mocire.jpg" alt="嘉美在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uepay.png" alt="极易付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wdom.png" alt="智慧开源"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cheshiku.png" alt="车仕库"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/taimeitech.png" alt="太美医疗科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yilianbaihui.png" alt="亿联百汇"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhoupu123.png" alt="舟谱数据"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/frxs.png" alt="芙蓉兴盛"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beastshop.png" alt="野兽派"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kaishustory.png" alt="凯叔讲故事"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/haodf.png" alt="好大夫在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/insyunmi.png" alt="云幂信息技术"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/duiba.png" alt="兑吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/9ji.png" alt="九机网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sui.png" alt="随手科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aixiangdao.png" alt="万谷盛世"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunzhangfang.png" alt="云账房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yuantutech.png" alt="浙江远图互联"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qk365.png" alt="青客公寓"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/eastmoney.png" alt="东方财富"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jikexiu.png" alt="极客修"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meix.png" alt="美市科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zto.png" alt="中通快递"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/e6yun.png" alt="易流科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoyuanzhao.png" alt="实习僧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dalingjia.png" alt="达令家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/secoo.png" alt="寺库"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lianlianpay.png" alt="连连支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhongan.png" alt="众安保险"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/360jinrong.png" alt="360金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caschina.png" alt="中航服商旅"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ke.png" alt="贝壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeahmobi.png" alt="Yeahmobi易点天下"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/idengyun.png" alt="北京登云美业网络科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinher.png" alt="金和网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/komect.png" alt="中移(杭州)信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beisen.png" alt="北森"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/log56.png" alt="合肥维天运通"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meboth.png" alt="北京蜜步科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/postop.png" alt="术康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rfchina.png" alt="富力集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tfxing.png" alt="天府行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/8travelpay.png" alt="八商山"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/centaline.png" alt="中原地产"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkyda.png" alt="智科云达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/house730.png" alt="中原730"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/pagoda.png" alt="百果园"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bolome.png" alt="波罗蜜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xignite.png" alt="Xignite"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aduer.png" alt="杭州有云科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jojoreading.png" alt="成都书声科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sweetome.png" alt="斯维登集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vipthink.png" alt="广东快乐种子科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tongxuecool.png" alt="上海盈翼文化传播有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sccfc.png" alt="上海尚诚消费金融股份有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ziroom.png" alt="自如网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jd.png" alt="京东"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rabbitpre.png" alt="兔展智能"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhubei.png" alt="竹贝"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/imile.png" alt="iMile(中东)"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/helloglobal.png" alt="哈罗出行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhaopin.png" alt="智联招聘"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acadsoc.png" alt="阿卡索"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mojory.png" alt="妙知旅"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chengduoduo.png" alt="程多多"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baojunev.png" alt="上汽通用五菱"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leyan.png" alt="乐言科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dushu.png" alt="樊登读书"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiz.png" alt="找一找教程网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bppc.png" alt="中油碧辟石油有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanglv51.png" alt="四川商旅无忧科技服务有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/waijiao365.png" alt="懿鸢网络科技(上海)有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaoding.jpg" alt="稿定科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ricacorp.png" alt="搵樓 - 利嘉閣"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/t3go.png" alt="南京领行科技股份有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mokahr.jpg" alt="北京希瑞亚斯科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/printrainbow.png" alt="印彩虹印刷公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/milliontech.png" alt="Million Tech"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guoguokeji.jpg" alt="果果科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/airkunming.png" alt="昆明航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5i5j.png" alt="我爱我家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gjzq.png" alt="国金证券"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoymusic.jpg" alt="不亦乐乎"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnhnb.png" alt="惠农网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daoklab.jpg" alt="成都道壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ausnutria.jpg" alt="澳优乳业"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/deiyoudian.png" alt="河南有态度信息科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezhiyang.png" alt="智阳第一人力"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shie.png" alt="上海保险交易所"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wsecar.png" alt="万顺叫车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shouqinba.jpg" alt="收钱吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baozun.png" alt="宝尊电商"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xbnwl.png" alt="喜百年供应链"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gwwisdom.png" alt="南京观为智慧软件科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ztrip.png" alt="在途商旅"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hualala.png" alt="哗啦啦"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xin.png" alt="优信二手车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maycur.png" alt="每刻科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bullyun.png" alt="杭州蛮牛"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bestpay.png" alt="翼支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mockuai.png" alt="魔筷科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ct108.png" alt="畅唐网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jusdaglobal.jpg" alt="准时达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/izaodao.png" alt="早道网校"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ovopark.jpg" alt="万店掌"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/funstory.jpg" alt="推文科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lemonbox.png" alt="Lemonbox"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/polyt.png" alt="保利票务"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chipwing.png" alt="芯翼科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbank.png" alt="浙商银行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbyqy.png" alt="易企银科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yundun.jpg" alt="上海云盾"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaiaworks.jpg" alt="苏州盖雅信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mengxiang.png" alt="爱库存"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jidouauto.png" alt="极豆车联网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ipalfish.png" alt="伴鱼少儿英语"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/iqboard.png" alt="锐达科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/koolearn.png" alt="新东方在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kingcome.png" alt="金康高科"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/soulapp.png" alt="soul"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezrpro.png" alt="驿氪"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hc360.png" alt="慧聪"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/21cp.png" alt="中塑在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/goinglink.jpg" alt="甄云科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aitrace.jpg" alt="追溯科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/moqipobing.png" alt="玩吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cassan.png" alt="广州卡桑信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shuidichou.png" alt="水滴"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kuwo.png" alt="酷我音乐"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mi.png" alt="小米"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mvmyun.png" alt="今典"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/visabao.jpg" alt="签宝科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inrice.png" alt="广州趣米网络科技有限公司"></td> <td><a target="_blank" href="https://github.com/ctripcorp/apollo/issues/451">More...</a></td> </tr> </table> # Awards <img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/awards/oschina-2018-award.jpg" width="240px" alt="The most popular Chinese open source software in 2018"> # Stargazers over time [![Stargazers over time](https://starcharts.herokuapp.com/ctripcorp/apollo.svg)](https://starcharts.herokuapp.com/ctripcorp/apollo)
<img src="https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/logo/logo-simple.png" alt="apollo-logo" width="40%"> # Apollo - A reliable configuration management system [![Build Status](https://github.com/ctripcorp/apollo/workflows/build/badge.svg)](https://github.com/ctripcorp/apollo/actions) [![GitHub Release](https://img.shields.io/github/release/ctripcorp/apollo.svg)](https://github.com/ctripcorp/apollo/releases) [![Maven Central Repo](https://img.shields.io/maven-central/v/com.ctrip.framework.apollo/apollo.svg)](https://mvnrepository.com/artifact/com.ctrip.framework.apollo/apollo-client) [![codecov.io](https://codecov.io/github/ctripcorp/apollo/coverage.svg?branch=master)](https://codecov.io/github/ctripcorp/apollo?branch=master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) Apollo is a reliable configuration management system. It can centrally manage the configurations of different applications and different clusters. It is suitable for microservice configuration management scenarios. The server side is developed based on Spring Boot and Spring Cloud, which can simply run without the need to install additional application containers such as Tomcat. The Java SDK does not rely on any framework and can run in all Java runtime environments. It also has good support for Spring/Spring Boot environments. The .Net SDK does not rely on any framework and can run in all .Net runtime environments. For more details of the product introduction, please refer [Introduction to Apollo Configuration Center](https://www.apolloconfig.com/#/zh/design/apollo-introduction). For local demo purpose, please refer [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start). Demo Environment: - [http://106.54.227.205](http://106.54.227.205/) - User/Password: apollo/admin # Screenshots ![Screenshot](https://raw.githubusercontent.com/ctripcorp/apollo/master/docs/en/images/apollo-home-screenshot.jpg) # Features * **Unified management of the configurations of different environments and different clusters** * Apollo provides a unified interface to centrally manage the configurations of different environments, different clusters, and different namespaces * The same codebase could have different configurations when deployed in different clusters * With the namespace concept, it is easy to support multiple applications to share the same configurations, while also allowing them to customize the configurations * Multiple languages is provided in user interface(currently Chinese and English) * **Configuration changes takes effect in real time (hot release)** * After the user modified the configuration and released it in Apollo, the sdk will receive the latest configurations in real time (1 second) and notify the application * **Release version management** * Every configuration releases are versioned, which is friendly to support configuration rollback * **Grayscale release** * Support grayscale configuration release, for example, after clicking release, it will only take effect for some application instances. After a period of observation, we could push the configurations to all application instances if there is no problem * **Authorization management, release approval and operation audit** * Great authorization mechanism is designed for applications and configurations management, and the management of configurations is divided into two operations: editing and publishing, therefore greatly reducing human errors * All operations have audit logs for easy tracking of problems * **Client side configuration information monitoring** * It's very easy to see which instances are using the configurations and what versions they are using * **Rich SDKs available** * Provides native sdks of Java and .Net to facilitate application integration * Support Spring Placeholder, Annotation and Spring Boot ConfigurationProperties for easy application use (requires Spring 3.1.1+) * Http APIs are provided, so non-Java and .Net applications can integrate conveniently * Rich third party sdks are also available, e.g. Golang, Python, NodeJS, PHP, C, etc * **Open platform API** * Apollo itself provides a unified configuration management interface, which supports features such as multi-environment, multi-data center configuration management, permissions, and process governance * However, for the sake of versatility, Apollo will not put too many restrictions on the modification of the configuration, as long as it conforms to the basic format, it can be saved. * In our research, we found that for some users, their configurations may have more complicated formats, such as xml, json, and the format needs to be verified * There are also some users such as DAL, which not only have a specific format, but also need to verify the entered value before saving, such as checking whether the database, username and password match * For this type of application, Apollo allows the application to modify and release configurations through open APIs, which has great authorization and permission control mechanism built in * **Simple deployment** * As an infrastructure service, the configuration center has very high availability requirements, which forces Apollo to rely on external dependencies as little as possible * Currently, the only external dependency is MySQL, so the deployment is very simple. Apollo can run as long as Java and MySQL are installed * Apollo also provides a packaging script, which can generate all required installation packages with just one click, and supports customization of runtime parameters # Usage 1. [Apollo User Guide](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide) 2. [Java SDK User Guide](https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide) 3. [.Net SDK user Guide](https://www.apolloconfig.com/#/zh/usage/dotnet-sdk-user-guide) 4. [Third Party SDK User Guide](https://www.apolloconfig.com/#/zh/usage/third-party-sdks-user-guide) 5. [Other Language Client User Guide](https://www.apolloconfig.com/#/zh/usage/other-language-client-user-guide) 6. [Apollo Open APIs](https://www.apolloconfig.com/#/zh/usage/apollo-open-api-platform) 7. [Apollo Use Cases](https://github.com/ctripcorp/apollo-use-cases) 8. [Apollo User Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-practices) 9. [Apollo Security Best Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3) # Design * [Apollo Design](https://www.apolloconfig.com/#/zh/design/apollo-design) * [Apollo Core Concept - Namespace](https://www.apolloconfig.com/#/zh/design/apollo-core-concept-namespace) * [Apollo Architecture Analysis](https://mp.weixin.qq.com/s/-hUaQPzfsl9Lm3IqQW3VDQ) * [Apollo Source Code Explanation](http://www.iocoder.cn/categories/Apollo/) # Development * [Apollo Development Guide](https://www.apolloconfig.com/#/zh/development/apollo-development-guide) * Code Styles * [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) * [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) # Deployment * [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start) * [Distributed Deployment Guide](https://www.apolloconfig.com/#/zh/deployment/distributed-deployment-guide) # Release Notes * [Releases](https://github.com/ctripcorp/apollo/releases) # FAQ * [FAQ](https://www.apolloconfig.com/#/zh/faq/faq) * [Common Issues in Deployment & Development Phase](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase) # Presentation * [Design and Implementation Details of Apollo](http://www.itdks.com/dakalive/detail/3420) * [Slides](https://myslide.cn/slides/10168) * [Configuration Center Makes Microservices Smart](https://2018.qconshanghai.com/presentation/799) * [Slides](https://myslide.cn/slides/10035) # Publication * [Design and Implementation Details of Apollo](https://www.infoq.cn/article/open-source-configuration-center-apollo) * [Configuration Center Makes Microservices Smart](https://mp.weixin.qq.com/s/iDmYJre_ULEIxuliu1EbIQ) # Community * [Apollo Team](https://www.apolloconfig.com/#/en/community/team) * [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) * [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) # License The project is licensed under the [Apache 2 license](https://github.com/ctripcorp/apollo/blob/master/LICENSE). # Known Users > Sorted by registration order,users are welcome to register in [https://github.com/ctripcorp/apollo/issues/451](https://github.com/ctripcorp/apollo/issues/451) (reference purpose only for the community) <table> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctrip.png" alt="携程"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bluestone.png" alt="青石证券"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sagreen.png" alt="沙绿"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/umetrip.jpg" alt="航旅纵横"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuanzhuan.png" alt="58转转"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/phone580.png" alt="蜂助手"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hainan-airlines.png" alt="海南航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cvte.png" alt="CVTE"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mainbo.jpg" alt="明博教育"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/madailicai.png" alt="麻袋理财"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mxnavi.jpg" alt="美行科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fshows.jpg" alt="首展科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/feezu.png" alt="易微行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rencaijia.png" alt="人才加"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/keking.png" alt="凯京集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leoao.png" alt="乐刻运动"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dji.png" alt="大疆"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kkmh.png" alt="快看漫画"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wolaidai.png" alt="我来贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xsrj.png" alt="虚实软件"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yanxuan.png" alt="网易严选"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sjzg.png" alt="视觉中国"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zc360.png" alt="资产360"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ecarx.png" alt="亿咖通"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5173.png" alt="5173"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hujiang.png" alt="沪江"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163yun.png" alt="网易云基础服务"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cash-bus.png" alt="现金巴士"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/smartisan.png" alt="锤子科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toodc.png" alt="头等仓"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/juneyaoair.png" alt="吉祥航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/263mobile.png" alt="263移动通信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toutoujinrong.png" alt="投投金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mytijian.png" alt="每天健康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyabank.png" alt="麦芽金服"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fengunion.png" alt="蜂向科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/geex-logo.png" alt="即科金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beike.png" alt="贝壳网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/youzan.png" alt="有赞"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunjihuitong.png" alt="云集汇通"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rhinotech.png" alt="犀牛瀚海科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nxin.png" alt="农信互联"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mgzf.png" alt="蘑菇租房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huli-logo.png" alt="狐狸金服"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mandao.png" alt="漫道集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enmonster.png" alt="怪兽充电"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nanguazufang.png" alt="南瓜租房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shitoujinrong.png" alt="石投金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tubatu.png" alt="土巴兔"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/payh_logo.png" alt="平安银行"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinxindai.png" alt="新新贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chrtc.png" alt="中国华戎科技集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuya_logo.png" alt="涂鸦智能"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/szlcsc.jpg" alt="立创商城"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hairongyi.png" alt="乐赚金服"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kxqc.png" alt="开心汽车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppcredit.png" alt="乐赚金服"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/primeton.png" alt="普元信息"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoskeeper.png" alt="医帮管家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fula.png" alt="付啦信用卡管家"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uzai.png" alt="悠哉网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/91wutong.png" alt="梧桐诚选"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppdai.png" alt="拍拍贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinyongfei.png" alt="信用飞"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dxy.png" alt="丁香园"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ghtech.png" alt="国槐科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qbb.png" alt="亲宝宝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huawei_logo.png" alt="华为视频直播"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weiboyi.png" alt="微播易"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ofpay.png" alt="欧飞"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mishuo.png" alt="迷说"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yixia.png" alt="一下科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daocloud.png" alt="DaoCloud"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnvex.png" alt="汽摩交易所"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100tal.png" alt="好未来教育集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ainirobot.png" alt="猎户星空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuojian.png" alt="卓健科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoyor.png" alt="银江股份"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuhu.png" alt="途虎养车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/homedo.png" alt="河姆渡"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xwbank.png" alt="新网银行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctspcl.png" alt="中旅安信云贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meiyou.png" alt="美柚"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkh-logo.png" alt="震坤行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wgss.png" alt="万谷盛世"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/plateno.png" alt="铂涛旅行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lifesense.png" alt="乐心"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/reachmedia.png" alt="亿投传媒"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guxiansheng.png" alt="股先生"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caixuetang.png" alt="财学堂"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/4399.png" alt="4399"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autohome.png" alt="汽车之家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mbcaijing.png" alt="面包财经"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoopchina.png" alt="虎扑"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sohu-auto.png" alt="搜狐汽车"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/liangfuzhengxin.png" alt="量富征信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maihaoche.png" alt="卖好车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiot.jpg" alt="中移物联网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/biauto.png" alt="易车网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyaole.png" alt="一药网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoying.png" alt="小影"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caibeike.png" alt="彩贝壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeelight.png" alt="YEELIGHT"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/itsgmu.png" alt="积目"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acmedcare.png" alt="极致医疗"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhui365.png" alt="金汇金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/900etrip.png" alt="久柏易游"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/24xiaomai.png" alt="小麦铺"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vvic.png" alt="搜款网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mizlicai.png" alt="米庄理财"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bjt.png" alt="贝吉塔网络科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weimob.png" alt="微盟"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kada.png" alt="网易卡搭"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kapbook.png" alt="股书"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jumore.png" alt="聚贸"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bimface.png" alt="广联达bimface"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/globalgrow.png" alt="环球易购"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jollychic.png" alt="浙江执御"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2dfire.jpg" alt="二维火"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shopin.png" alt="上品"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inspur.png" alt="浪潮集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ngarihealth.png" alt="纳里健康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oraro.png" alt="橙红科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dragonpass.png" alt="龙腾出行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lizhi.fm.png" alt="荔枝"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/htd.png" alt="汇通达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunrong.png" alt="云融金科"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tszg360.png" alt="天生掌柜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rongplus.png" alt="容联光辉"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/intellif.png" alt="云天励飞"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jiayundata.png" alt="嘉云数据"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zts.png" alt="中泰证券网络金融部"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163dun.png" alt="网易易盾"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiangwushuo.png" alt="享物说"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sto.png" alt="申通"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhe.png" alt="金和网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2345.png" alt="二三四五"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chtwm.jpg" alt="恒天财富"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uweixin.png" alt="沐雪微信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wzeye.png" alt="温州医科大学附属眼视光医院"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/10010pay.png" alt="联通支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanshu.png" alt="杉数科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fenlibao.png" alt="分利宝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hetao101.png" alt="核桃编程"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaohongshu.png" alt="小红书"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/blissmall.png" alt="幸福西饼"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ky-express.png" alt="跨越速运"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oyohotels.png" alt="OYO"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100-me.png" alt="叮咚买菜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhidaohulian.jpg" alt="智道网联"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xueqiu.jpg" alt="雪球"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autocloudpro.png" alt="车通云"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dadaabc.png" alt="哒哒英语"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xedaojia.jpg" alt="小E微店"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daling.png" alt="达令家"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/renliwo.png" alt="人力窝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mocire.jpg" alt="嘉美在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uepay.png" alt="极易付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wdom.png" alt="智慧开源"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cheshiku.png" alt="车仕库"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/taimeitech.png" alt="太美医疗科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yilianbaihui.png" alt="亿联百汇"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhoupu123.png" alt="舟谱数据"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/frxs.png" alt="芙蓉兴盛"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beastshop.png" alt="野兽派"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kaishustory.png" alt="凯叔讲故事"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/haodf.png" alt="好大夫在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/insyunmi.png" alt="云幂信息技术"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/duiba.png" alt="兑吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/9ji.png" alt="九机网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sui.png" alt="随手科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aixiangdao.png" alt="万谷盛世"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunzhangfang.png" alt="云账房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yuantutech.png" alt="浙江远图互联"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qk365.png" alt="青客公寓"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/eastmoney.png" alt="东方财富"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jikexiu.png" alt="极客修"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meix.png" alt="美市科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zto.png" alt="中通快递"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/e6yun.png" alt="易流科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoyuanzhao.png" alt="实习僧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dalingjia.png" alt="达令家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/secoo.png" alt="寺库"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lianlianpay.png" alt="连连支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhongan.png" alt="众安保险"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/360jinrong.png" alt="360金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caschina.png" alt="中航服商旅"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ke.png" alt="贝壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeahmobi.png" alt="Yeahmobi易点天下"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/idengyun.png" alt="北京登云美业网络科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinher.png" alt="金和网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/komect.png" alt="中移(杭州)信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beisen.png" alt="北森"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/log56.png" alt="合肥维天运通"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meboth.png" alt="北京蜜步科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/postop.png" alt="术康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rfchina.png" alt="富力集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tfxing.png" alt="天府行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/8travelpay.png" alt="八商山"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/centaline.png" alt="中原地产"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkyda.png" alt="智科云达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/house730.png" alt="中原730"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/pagoda.png" alt="百果园"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bolome.png" alt="波罗蜜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xignite.png" alt="Xignite"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aduer.png" alt="杭州有云科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jojoreading.png" alt="成都书声科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sweetome.png" alt="斯维登集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vipthink.png" alt="广东快乐种子科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tongxuecool.png" alt="上海盈翼文化传播有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sccfc.png" alt="上海尚诚消费金融股份有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ziroom.png" alt="自如网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jd.png" alt="京东"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rabbitpre.png" alt="兔展智能"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhubei.png" alt="竹贝"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/imile.png" alt="iMile(中东)"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/helloglobal.png" alt="哈罗出行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhaopin.png" alt="智联招聘"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acadsoc.png" alt="阿卡索"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mojory.png" alt="妙知旅"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chengduoduo.png" alt="程多多"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baojunev.png" alt="上汽通用五菱"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leyan.png" alt="乐言科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dushu.png" alt="樊登读书"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiz.png" alt="找一找教程网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bppc.png" alt="中油碧辟石油有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanglv51.png" alt="四川商旅无忧科技服务有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/waijiao365.png" alt="懿鸢网络科技(上海)有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaoding.jpg" alt="稿定科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ricacorp.png" alt="搵樓 - 利嘉閣"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/t3go.png" alt="南京领行科技股份有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mokahr.jpg" alt="北京希瑞亚斯科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/printrainbow.png" alt="印彩虹印刷公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/milliontech.png" alt="Million Tech"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guoguokeji.jpg" alt="果果科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/airkunming.png" alt="昆明航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5i5j.png" alt="我爱我家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gjzq.png" alt="国金证券"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoymusic.jpg" alt="不亦乐乎"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnhnb.png" alt="惠农网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daoklab.jpg" alt="成都道壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ausnutria.jpg" alt="澳优乳业"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/deiyoudian.png" alt="河南有态度信息科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezhiyang.png" alt="智阳第一人力"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shie.png" alt="上海保险交易所"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wsecar.png" alt="万顺叫车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shouqinba.jpg" alt="收钱吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baozun.png" alt="宝尊电商"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xbnwl.png" alt="喜百年供应链"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gwwisdom.png" alt="南京观为智慧软件科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ztrip.png" alt="在途商旅"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hualala.png" alt="哗啦啦"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xin.png" alt="优信二手车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maycur.png" alt="每刻科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bullyun.png" alt="杭州蛮牛"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bestpay.png" alt="翼支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mockuai.png" alt="魔筷科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ct108.png" alt="畅唐网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jusdaglobal.jpg" alt="准时达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/izaodao.png" alt="早道网校"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ovopark.jpg" alt="万店掌"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/funstory.jpg" alt="推文科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lemonbox.png" alt="Lemonbox"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/polyt.png" alt="保利票务"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chipwing.png" alt="芯翼科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbank.png" alt="浙商银行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbyqy.png" alt="易企银科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yundun.jpg" alt="上海云盾"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaiaworks.jpg" alt="苏州盖雅信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mengxiang.png" alt="爱库存"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jidouauto.png" alt="极豆车联网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ipalfish.png" alt="伴鱼少儿英语"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/iqboard.png" alt="锐达科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/koolearn.png" alt="新东方在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kingcome.png" alt="金康高科"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/soulapp.png" alt="soul"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezrpro.png" alt="驿氪"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hc360.png" alt="慧聪"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/21cp.png" alt="中塑在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/goinglink.jpg" alt="甄云科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aitrace.jpg" alt="追溯科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/moqipobing.png" alt="玩吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cassan.png" alt="广州卡桑信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shuidichou.png" alt="水滴"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kuwo.png" alt="酷我音乐"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mi.png" alt="小米"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mvmyun.png" alt="今典"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/visabao.jpg" alt="签宝科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inrice.png" alt="广州趣米网络科技有限公司"></td> <td><a target="_blank" href="https://github.com/ctripcorp/apollo/issues/451">More...</a></td> </tr> </table> # Awards <img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/awards/oschina-2018-award.jpg" width="240px" alt="The most popular Chinese open source software in 2018"> # Stargazers over time [![Stargazers over time](https://starcharts.herokuapp.com/ctripcorp/apollo.svg)](https://starcharts.herokuapp.com/ctripcorp/apollo)
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/test/resources/spring/yaml/case9.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # someKey: someValue
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # someKey: someValue
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./.github/workflows/build.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven name: build on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest strategy: matrix: jdk: [7, 8, 11] steps: - uses: actions/checkout@v2 - name: Set up JDK uses: actions/setup-java@v1 with: java-version: ${{ matrix.jdk }} - name: Cache Maven packages uses: actions/cache@v1 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build SDK with JDK 7 if: matrix.jdk == '7' run: mvn clean compile -pl apollo-client,apollo-mockserver,apollo-openapi -am -Dmaven.gitcommitid.skip=true - name: JDK 8 if: matrix.jdk == '8' run: mvn -B clean package -P travis jacoco:report -Dmaven.gitcommitid.skip=true - name: JDK 11 if: matrix.jdk == '11' run: mvn clean compile -Dmaven.gitcommitid.skip=true - name: Upload coverage to Codecov if: matrix.jdk == '8' uses: codecov/codecov-action@v1 with: file: ${{ github.workspace }}/apollo-*/target/site/jacoco/jacoco.xml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven name: build on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest strategy: matrix: jdk: [7, 8, 11] steps: - uses: actions/checkout@v2 - name: Set up JDK uses: actions/setup-java@v1 with: java-version: ${{ matrix.jdk }} - name: Cache Maven packages uses: actions/cache@v1 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build SDK with JDK 7 if: matrix.jdk == '7' run: mvn clean compile -pl apollo-client,apollo-mockserver,apollo-openapi -am -Dmaven.gitcommitid.skip=true - name: JDK 8 if: matrix.jdk == '8' run: mvn -B clean package -P travis jacoco:report -Dmaven.gitcommitid.skip=true - name: JDK 11 if: matrix.jdk == '11' run: mvn clean compile -Dmaven.gitcommitid.skip=true - name: Upload coverage to Codecov if: matrix.jdk == '8' uses: codecov/codecov-action@v1 with: file: ${{ github.workspace }}/apollo-*/target/site/jacoco/jacoco.xml
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/test/resources/sql/appnamespaceservice/init-appnamespace.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO `appnamespace` (`Id`, `Name`, `AppId`, `Format`, `IsPublic`, `Comment`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_CreatedTime`, `DataChange_LastModifiedBy`, `DataChange_LastTime`) VALUES (139, 'FX.old', '100003173', 'properties', 1, '', 0, 'zhanglea', '2016-07-11 10:00:58', 'zhanglea', '2016-07-11 10:00:58'), (140, 'SCC.song0711-03', 'song0711-01', 'properties', 1, '', 0, 'song_s', '2016-07-11 10:04:09', 'song_s', '2016-07-11 10:04:09'), (141, 'SCC.song0711-04', 'song0711-01', 'properties', 1, '', 0, 'song_s', '2016-07-11 10:06:29', 'song_s', '2016-07-11 10:06:29'), (142, 'application', 'song0711-02', 'properties', 1, 'default app namespace', 0, 'song_s', '2016-07-11 11:18:24', 'song_s', '2016-07-11 11:18:24'), (143, 'TFF.song0711-02', 'song0711-02', 'properties', 0, '', 0, 'song_s', '2016-07-11 11:15:11', 'song_s', '2016-07-11 11:15:11'), (144, 'datasourcexml', '100003173', 'properties', 1, '', 0, 'apollo', '2016-07-11 12:08:29', 'apollo', '2016-07-11 12:08:29'), (145, 'datasource.xml', '100003173', 'xml', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'), (146, 'FX.private-01', '100003173', 'properties', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'), (147, 'datasource', '100003173', 'properties', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'); INSERT INTO `app` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES ('1000', 'apollo-test', 'FX', '框架', 'song_s', 'song_s@ctrip.com', 0, 'song_s', 'song_s'), ('song0711-01', 'song0711-01', 'SCC', '框架', 'song_s', 'song_s@ctrip.com', 0, 'song_s', 'song_s'), ('song0711-02', 'song0711-02', 'SCC', '框架', 'song_s', 'song_s@ctrip.com', 0, 'song_s', 'song_s'), ('100003173', 'apollo-portal', 'FX', '框架', 'song_s', 'song_s@ctrip.com', 0, 'song_s', 'song_s');
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO `appnamespace` (`Id`, `Name`, `AppId`, `Format`, `IsPublic`, `Comment`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_CreatedTime`, `DataChange_LastModifiedBy`, `DataChange_LastTime`) VALUES (139, 'FX.old', '100003173', 'properties', 1, '', 0, 'zhanglea', '2016-07-11 10:00:58', 'zhanglea', '2016-07-11 10:00:58'), (140, 'SCC.song0711-03', 'song0711-01', 'properties', 1, '', 0, 'song_s', '2016-07-11 10:04:09', 'song_s', '2016-07-11 10:04:09'), (141, 'SCC.song0711-04', 'song0711-01', 'properties', 1, '', 0, 'song_s', '2016-07-11 10:06:29', 'song_s', '2016-07-11 10:06:29'), (142, 'application', 'song0711-02', 'properties', 1, 'default app namespace', 0, 'song_s', '2016-07-11 11:18:24', 'song_s', '2016-07-11 11:18:24'), (143, 'TFF.song0711-02', 'song0711-02', 'properties', 0, '', 0, 'song_s', '2016-07-11 11:15:11', 'song_s', '2016-07-11 11:15:11'), (144, 'datasourcexml', '100003173', 'properties', 1, '', 0, 'apollo', '2016-07-11 12:08:29', 'apollo', '2016-07-11 12:08:29'), (145, 'datasource.xml', '100003173', 'xml', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'), (146, 'FX.private-01', '100003173', 'properties', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'), (147, 'datasource', '100003173', 'properties', 0, '', 0, 'apollo', '2016-07-11 12:09:30', 'apollo', '2016-07-11 12:09:30'); INSERT INTO `app` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES ('1000', 'apollo-test', 'FX', '框架', 'song_s', 'song_s@ctrip.com', 0, 'song_s', 'song_s'), ('song0711-01', 'song0711-01', 'SCC', '框架', 'song_s', 'song_s@ctrip.com', 0, 'song_s', 'song_s'), ('song0711-02', 'song0711-02', 'SCC', '框架', 'song_s', 'song_s@ctrip.com', 0, 'song_s', 'song_s'), ('100003173', 'apollo-portal', 'FX', '框架', 'song_s', 'song_s@ctrip.com', 0, 'song_s', 'song_s');
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/development/portal-how-to-enable-email-service.md
在配置发布时候,我们希望发布信息邮件通知到相关的负责人。现支持发送邮件的动作有:普通发布、灰度发布、全量发布、回滚,通知对象包括:具有namespace编辑和发布权限的人员以及App负责人。 由于各公司的邮件服务往往有不同的实现,所以Apollo定义了一些SPI用来解耦,Apollo接入邮件服务的关键就是实现这些SPI。 ## 一、实现方式一:使用Apollo提供的smtp邮件服务 ### 1.1 接入步骤 在ApolloPortalDB.ServerConfig表配置以下参数,也可以通过管理员工具 - 系统参数页面进行配置,修改完一分钟实时生效。如下: * **email.enabled** 设置为true即可启用默认的smtp邮件服务 * **email.config.host** smtp的服务地址,如`smtp.163.com` * **email.config.user** smtp帐号用户名 * **email.config.password** smtp帐号密码 * **email.supported.envs** 支持发送邮件的环境列表,英文逗号隔开。我们不希望发布邮件变成用户的垃圾邮件,只有某些环境下的发布动作才会发送邮件。 * **email.sender** 邮件的发送人,可以不配置,默认为`email.config.user`。 * **apollo.portal.address** Apollo Portal的地址。方便用户从邮件点击跳转到Apollo Portal查看详细的发布信息。 * **email.template.framework** 邮件内容模板框架。将邮件内容模板化、可配置化,方便管理和变更邮件内容。 * **email.template.release.module.diff** 发布邮件的diff模块。 * **email.template.rollback.module.diff** 回滚邮件的diff模块。 * **email.template.release.module.rules** 灰度发布的灰度规则模块。 我们提供了[邮件模板样例](#三、邮件模板样例),方便大家使用。 ## 二、实现方式二:接入公司的统一邮件服务 和SSO类似,每个公司也有自己的邮件服务实现,所以我们相应的定义了[EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java)接口,现有两个实现类: 1. CtripEmailService:携程实现的EmailService 2. DefaultEmailService:smtp实现 ### 2.1 接入步骤 1. 提供自己公司的[EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java)实现,并在[EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java)中注册。 2. 在ApolloPortalDB.ServerConfig表配置以下参数,也可以通过管理员工具 - 系统参数页面进行配置,修改完一分钟实时生效。如下: * **email.supported.envs** 支持发送邮件的环境列表,英文逗号隔开。我们不希望发布邮件变成用户的垃圾邮件,只有某些环境下的发布动作才会发送邮件。 * **email.sender** 邮件的发送人。 * **apollo.portal.address** Apollo Portal的地址。方便用户从邮件点击跳转到Apollo Portal查看详细的发布信息。 * **email.template.framework** 邮件内容模板框架。将邮件内容模板化、可配置化,方便管理和变更邮件内容。 * **email.template.release.module.diff** 发布邮件的diff模块。 * **email.template.rollback.module.diff** 回滚邮件的diff模块。 * **email.template.release.module.rules** 灰度发布的灰度规则模块。 我们提供了[邮件模板样例](#三、邮件模板样例),方便大家使用。 >注:运行时使用不同的实现是通过[Profiles](http://docs.spring.io/autorepo/docs/spring-boot/current/reference/html/boot-features-profiles.html)实现的,比如你自己的Email实现是在`custom` profile中的话,在打包脚本中可以指定-Dapollo_profile=github,custom。其中`github`是Apollo必须的一个profile,用于数据库的配置,`custom`是你自己实现的profile。同时需要注意在[EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java)中修改默认实现的条件`@Profile({"!custom"})`。 ### 2.2 相关代码 1. [ConfigPublishListener](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/listener/ConfigPublishListener.java)监听发布事件,调用emailbuilder构建邮件内容,然后调用EmailService发送邮件 2. [emailbuilder](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/emailbuilder)包是构建邮件内容的实现 3. [EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java) 邮件发送服务 4. [EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java) 邮件服务注册类 ## 三、邮件模板样例 以下为发布邮件和回滚邮件的模板内容样式,邮件模板为html格式,发送html格式的邮件时,可能需要做一些额外的处理,取决于每个公司的邮件服务实现。为了减少字符数,模板经过了压缩处理,可自行格式化提高可读性。 ### 3.1 email.template.framework ```html <html><head><style type="text/css">.table{width:100%;max-width:100%;margin-bottom:20px;border-collapse:collapse;background-color:transparent}td{padding:8px;line-height:1.42857143;vertical-align:top;border:1px solid #ddd;border-top:1px solid #ddd}.table-bordered{border:1px solid #ddd}</style></head><body><h3>发布基本信息</h3><table class="table table-bordered"><tr><td width="10%"><b>AppId</b></td><td width="15%">#{appId}</td><td width="10%"><b>环境</b></td><td width="15%">#{env}</td><td width="10%"><b>集群</b></td><td width="15%">#{clusterName}</td><td width="10%"><b>Namespace</b></td><td width="15%">#{namespaceName}</td></tr><tr><td><b>发布者</b></td><td>#{operator}</td><td><b>发布时间</b></td><td>#{releaseTime}</td><td><b>发布标题</b></td><td>#{releaseTitle}</td><td><b>备注</b></td><td>#{releaseComment}</td></tr></table>#{diffModule}#{rulesModule}<br><a href="#{apollo.portal.address}/config/history.html?#/appid=#{appId}&env=#{env}&clusterName=#{clusterName}&namespaceName=#{namespaceName}&releaseHistoryId=#{releaseHistoryId}">点击查看详细的发布信息</a><br><br>如有Apollo使用问题请先查阅<a href="http://conf.ctripcorp.com/display/FRAM/Apollo">文档</a>,或直接回复本邮件咨询。</body></html> ``` > 注:使用此模板需要在 portal 的系统参数中配置 apollo.portal.address,指向 apollo portal 的地址 ### 3.2 email.template.release.module.diff ```html <h3>变更的配置</h3> <table class="table table-bordered"> <tr> <td width="10%"><b>Type</b></td> <td width="20%"><b>Key</b></td> <td width="35%"><b>Old Value</b></td> <td width="35%"><b>New Value</b></td> </tr> #{diffContent} </table> ``` ### 3.3 email.template.rollback.module.diff ```html <div> <br><br> <h3>变更的配置</h3> <table class="table table-bordered"> <tr> <td width="10%"><b>Type</b></td> <td width="20%"><b>Key</b></td> <td width="35%"><b>回滚前</b></td> <td width="35%"><b>回滚后</b></td> </tr> #{diffContent} </table> <br> </div> ``` ### 3.4 email.template.release.module.rules ```html <div> <br> <h3>灰度规则</h3> #{rulesContent} <br> </div> ``` ### 3.5 发布邮件样例 ![发布邮件模板](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/email-template-release.png) ### 3.6 回滚邮件样例 ![回滚邮件模板](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/email-template-rollback.png)
在配置发布时候,我们希望发布信息邮件通知到相关的负责人。现支持发送邮件的动作有:普通发布、灰度发布、全量发布、回滚,通知对象包括:具有namespace编辑和发布权限的人员以及App负责人。 由于各公司的邮件服务往往有不同的实现,所以Apollo定义了一些SPI用来解耦,Apollo接入邮件服务的关键就是实现这些SPI。 ## 一、实现方式一:使用Apollo提供的smtp邮件服务 ### 1.1 接入步骤 在ApolloPortalDB.ServerConfig表配置以下参数,也可以通过管理员工具 - 系统参数页面进行配置,修改完一分钟实时生效。如下: * **email.enabled** 设置为true即可启用默认的smtp邮件服务 * **email.config.host** smtp的服务地址,如`smtp.163.com` * **email.config.user** smtp帐号用户名 * **email.config.password** smtp帐号密码 * **email.supported.envs** 支持发送邮件的环境列表,英文逗号隔开。我们不希望发布邮件变成用户的垃圾邮件,只有某些环境下的发布动作才会发送邮件。 * **email.sender** 邮件的发送人,可以不配置,默认为`email.config.user`。 * **apollo.portal.address** Apollo Portal的地址。方便用户从邮件点击跳转到Apollo Portal查看详细的发布信息。 * **email.template.framework** 邮件内容模板框架。将邮件内容模板化、可配置化,方便管理和变更邮件内容。 * **email.template.release.module.diff** 发布邮件的diff模块。 * **email.template.rollback.module.diff** 回滚邮件的diff模块。 * **email.template.release.module.rules** 灰度发布的灰度规则模块。 我们提供了[邮件模板样例](#三、邮件模板样例),方便大家使用。 ## 二、实现方式二:接入公司的统一邮件服务 和SSO类似,每个公司也有自己的邮件服务实现,所以我们相应的定义了[EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java)接口,现有两个实现类: 1. CtripEmailService:携程实现的EmailService 2. DefaultEmailService:smtp实现 ### 2.1 接入步骤 1. 提供自己公司的[EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java)实现,并在[EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java)中注册。 2. 在ApolloPortalDB.ServerConfig表配置以下参数,也可以通过管理员工具 - 系统参数页面进行配置,修改完一分钟实时生效。如下: * **email.supported.envs** 支持发送邮件的环境列表,英文逗号隔开。我们不希望发布邮件变成用户的垃圾邮件,只有某些环境下的发布动作才会发送邮件。 * **email.sender** 邮件的发送人。 * **apollo.portal.address** Apollo Portal的地址。方便用户从邮件点击跳转到Apollo Portal查看详细的发布信息。 * **email.template.framework** 邮件内容模板框架。将邮件内容模板化、可配置化,方便管理和变更邮件内容。 * **email.template.release.module.diff** 发布邮件的diff模块。 * **email.template.rollback.module.diff** 回滚邮件的diff模块。 * **email.template.release.module.rules** 灰度发布的灰度规则模块。 我们提供了[邮件模板样例](#三、邮件模板样例),方便大家使用。 >注:运行时使用不同的实现是通过[Profiles](http://docs.spring.io/autorepo/docs/spring-boot/current/reference/html/boot-features-profiles.html)实现的,比如你自己的Email实现是在`custom` profile中的话,在打包脚本中可以指定-Dapollo_profile=github,custom。其中`github`是Apollo必须的一个profile,用于数据库的配置,`custom`是你自己实现的profile。同时需要注意在[EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java)中修改默认实现的条件`@Profile({"!custom"})`。 ### 2.2 相关代码 1. [ConfigPublishListener](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/listener/ConfigPublishListener.java)监听发布事件,调用emailbuilder构建邮件内容,然后调用EmailService发送邮件 2. [emailbuilder](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/emailbuilder)包是构建邮件内容的实现 3. [EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java) 邮件发送服务 4. [EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java) 邮件服务注册类 ## 三、邮件模板样例 以下为发布邮件和回滚邮件的模板内容样式,邮件模板为html格式,发送html格式的邮件时,可能需要做一些额外的处理,取决于每个公司的邮件服务实现。为了减少字符数,模板经过了压缩处理,可自行格式化提高可读性。 ### 3.1 email.template.framework ```html <html><head><style type="text/css">.table{width:100%;max-width:100%;margin-bottom:20px;border-collapse:collapse;background-color:transparent}td{padding:8px;line-height:1.42857143;vertical-align:top;border:1px solid #ddd;border-top:1px solid #ddd}.table-bordered{border:1px solid #ddd}</style></head><body><h3>发布基本信息</h3><table class="table table-bordered"><tr><td width="10%"><b>AppId</b></td><td width="15%">#{appId}</td><td width="10%"><b>环境</b></td><td width="15%">#{env}</td><td width="10%"><b>集群</b></td><td width="15%">#{clusterName}</td><td width="10%"><b>Namespace</b></td><td width="15%">#{namespaceName}</td></tr><tr><td><b>发布者</b></td><td>#{operator}</td><td><b>发布时间</b></td><td>#{releaseTime}</td><td><b>发布标题</b></td><td>#{releaseTitle}</td><td><b>备注</b></td><td>#{releaseComment}</td></tr></table>#{diffModule}#{rulesModule}<br><a href="#{apollo.portal.address}/config/history.html?#/appid=#{appId}&env=#{env}&clusterName=#{clusterName}&namespaceName=#{namespaceName}&releaseHistoryId=#{releaseHistoryId}">点击查看详细的发布信息</a><br><br>如有Apollo使用问题请先查阅<a href="http://conf.ctripcorp.com/display/FRAM/Apollo">文档</a>,或直接回复本邮件咨询。</body></html> ``` > 注:使用此模板需要在 portal 的系统参数中配置 apollo.portal.address,指向 apollo portal 的地址 ### 3.2 email.template.release.module.diff ```html <h3>变更的配置</h3> <table class="table table-bordered"> <tr> <td width="10%"><b>Type</b></td> <td width="20%"><b>Key</b></td> <td width="35%"><b>Old Value</b></td> <td width="35%"><b>New Value</b></td> </tr> #{diffContent} </table> ``` ### 3.3 email.template.rollback.module.diff ```html <div> <br><br> <h3>变更的配置</h3> <table class="table table-bordered"> <tr> <td width="10%"><b>Type</b></td> <td width="20%"><b>Key</b></td> <td width="35%"><b>回滚前</b></td> <td width="35%"><b>回滚后</b></td> </tr> #{diffContent} </table> <br> </div> ``` ### 3.4 email.template.release.module.rules ```html <div> <br> <h3>灰度规则</h3> #{rulesContent} <br> </div> ``` ### 3.5 发布邮件样例 ![发布邮件模板](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/email-template-release.png) ### 3.6 回滚邮件样例 ![回滚邮件模板](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/email-template-rollback.png)
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/_coverpage.md
<img src="https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/logo/logo-simple.png" alt="apollo-logo" width="30%"> > A reliable configuration management system - Multiple environments and clusters support - Configuration changes take effect in real time - Versioned and grayscale releases management - Great authentication, authorization and audit control [GitHub](https://github.com/ctripcorp/apollo/) [Get Started](zh/README)
<img src="https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/logo/logo-simple.png" alt="apollo-logo" width="30%"> > A reliable configuration management system - Multiple environments and clusters support - Configuration changes take effect in real time - Versioned and grayscale releases management - Great authentication, authorization and audit control [GitHub](https://github.com/ctripcorp/apollo/) [Get Started](zh/README)
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/test/resources/sql/openapi/ConsumerServiceIntegrationTest.testFindAppIdsAuthorizedByConsumerId.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /* This sql is dumped from a apollo portal database. The logic is as follows create app: consumer-test-app-id-0 consumer-test-app-id-1 consumer-test-app-id-2 create consumer: consumer-test-app-role Authorization, let consumer-test-app-role manage: consumer-test-app-id-0: Authorization type: App consumer-test-app-id-1: Authorization type: Namespace Managed Namespace: application */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!50503 SET NAMES utf8mb4 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40000 ALTER TABLE `App` DISABLE KEYS */; INSERT INTO `App` (`Id`, `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'consumer-test-app-id-0', 'consumer-test-app-id-0', 'TEST1', '样例部门1', 'apollo', 'apollo@acme.com', 'apollo', 'apollo'); INSERT INTO `App` (`Id`, `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'consumer-test-app-id-1', 'consumer-test-app-id-1', 'TEST2', '样例部门2', 'apollo', 'apollo@acme.com', 'apollo', 'apollo'); INSERT INTO `App` (`Id`, `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'consumer-test-app-id-2', 'consumer-test-app-id-2', 'TEST2', '样例部门2', 'apollo', 'apollo@acme.com', 'apollo', 'apollo'); /*!40000 ALTER TABLE `App` ENABLE KEYS */; /*!40000 ALTER TABLE `AppNamespace` DISABLE KEYS */; INSERT INTO `AppNamespace` (`Id`, `Name`, `AppId`, `Format`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'application', 'consumer-test-app-id-0', 'properties', 'default app namespace', 'apollo', 'apollo'); INSERT INTO `AppNamespace` (`Id`, `Name`, `AppId`, `Format`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'application', 'consumer-test-app-id-1', 'properties', 'default app namespace', 'apollo', 'apollo'); INSERT INTO `AppNamespace` (`Id`, `Name`, `AppId`, `Format`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'application', 'consumer-test-app-id-2', 'properties', 'default app namespace', 'apollo', 'apollo'); /*!40000 ALTER TABLE `AppNamespace` ENABLE KEYS */; /*!40000 ALTER TABLE `Consumer` DISABLE KEYS */; INSERT INTO `Consumer` (`Id`, `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'consumer-test-app-role', 'consumer-test-app-role', 'TEST2', '样例部门2', 'apollo', 'apollo@acme.com', 'apollo', 'apollo'); /*!40000 ALTER TABLE `Consumer` ENABLE KEYS */; /*!40000 ALTER TABLE `ConsumerAudit` DISABLE KEYS */; /*!40000 ALTER TABLE `ConsumerAudit` ENABLE KEYS */; /*!40000 ALTER TABLE `ConsumerRole` DISABLE KEYS */; INSERT INTO `ConsumerRole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 1000, 1000, 'apollo', 'apollo'); INSERT INTO `ConsumerRole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 1000, 11000, 'apollo', 'apollo'); INSERT INTO `ConsumerRole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 1000, 12000, 'apollo', 'apollo'); /*!40000 ALTER TABLE `ConsumerRole` ENABLE KEYS */; /*!40000 ALTER TABLE `ConsumerToken` DISABLE KEYS */; INSERT INTO `ConsumerToken` (`Id`, `ConsumerId`, `Token`, `Expires`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 1000, '3c16bf5b1f44b465179253442460e8c0ad845289', '2098-12-31 10:00:00', 'apollo', 'apollo'); /*!40000 ALTER TABLE `ConsumerToken` ENABLE KEYS */; /*!40000 ALTER TABLE `Favorite` DISABLE KEYS */; /*!40000 ALTER TABLE `Favorite` ENABLE KEYS */; /*!40000 ALTER TABLE `Permission` DISABLE KEYS */; INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'AssignRole', 'consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'CreateNamespace', 'consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'CreateCluster', 'consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (4000, 'ManageAppMaster', 'consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (5000, 'ModifyNamespace', 'consumer-test-app-id-0+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (6000, 'ReleaseNamespace', 'consumer-test-app-id-0+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (7000, 'ModifyNamespace', 'consumer-test-app-id-0+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (8000, 'ReleaseNamespace', 'consumer-test-app-id-0+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (9000, 'CreateNamespace', 'consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (10000, 'AssignRole', 'consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (11000, 'CreateCluster', 'consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (12000, 'ManageAppMaster', 'consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (13000, 'ModifyNamespace', 'consumer-test-app-id-1+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (14000, 'ReleaseNamespace', 'consumer-test-app-id-1+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (15000, 'ModifyNamespace', 'consumer-test-app-id-1+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (16000, 'ReleaseNamespace', 'consumer-test-app-id-1+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (17000, 'CreateCluster', 'consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (18000, 'AssignRole', 'consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (19000, 'CreateNamespace', 'consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (20000, 'ManageAppMaster', 'consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (21000, 'ModifyNamespace', 'consumer-test-app-id-2+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (22000, 'ReleaseNamespace', 'consumer-test-app-id-2+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (23000, 'ModifyNamespace', 'consumer-test-app-id-2+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (24000, 'ReleaseNamespace', 'consumer-test-app-id-2+application+DEV', 'apollo', 'apollo'); /*!40000 ALTER TABLE `Permission` ENABLE KEYS */; /*!40000 ALTER TABLE `Role` DISABLE KEYS */; INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'Master+consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'ManageAppMaster+consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'ModifyNamespace+consumer-test-app-id-0+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (4000, 'ReleaseNamespace+consumer-test-app-id-0+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (5000, 'ModifyNamespace+consumer-test-app-id-0+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (6000, 'ReleaseNamespace+consumer-test-app-id-0+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (7000, 'Master+consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (8000, 'ManageAppMaster+consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (9000, 'ModifyNamespace+consumer-test-app-id-1+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (10000, 'ReleaseNamespace+consumer-test-app-id-1+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (11000, 'ModifyNamespace+consumer-test-app-id-1+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (12000, 'ReleaseNamespace+consumer-test-app-id-1+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (13000, 'Master+consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (14000, 'ManageAppMaster+consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (15000, 'ModifyNamespace+consumer-test-app-id-2+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (16000, 'ReleaseNamespace+consumer-test-app-id-2+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (17000, 'ModifyNamespace+consumer-test-app-id-2+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (18000, 'ReleaseNamespace+consumer-test-app-id-2+application+DEV', 'apollo', 'apollo'); /*!40000 ALTER TABLE `Role` ENABLE KEYS */; /*!40000 ALTER TABLE `RolePermission` DISABLE KEYS */; INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 1000, 1000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 1000, 2000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 1000, 3000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (4000, 2000, 4000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (5000, 3000, 5000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (6000, 4000, 6000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (7000, 5000, 7000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (8000, 6000, 8000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (9000, 7000, 9000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (10000, 7000, 10000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (11000, 7000, 11000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (12000, 8000, 12000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (13000, 9000, 13000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (14000, 10000, 14000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (15000, 11000, 15000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (16000, 12000, 16000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (17000, 13000, 17000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (18000, 13000, 18000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (19000, 13000, 19000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (20000, 14000, 20000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (21000, 15000, 21000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (22000, 16000, 22000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (23000, 17000, 23000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (24000, 18000, 24000, 'apollo', 'apollo'); /*!40000 ALTER TABLE `RolePermission` ENABLE KEYS */; /*!40000 ALTER TABLE `UserRole` DISABLE KEYS */; INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'apollo', 1000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'apollo', 3000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'apollo', 4000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (4000, 'apollo', 7000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (5000, 'apollo', 9000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (6000, 'apollo', 10000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (7000, 'apollo', 13000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (8000, 'apollo', 15000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (9000, 'apollo', 16000, 'apollo', 'apollo'); /*!40000 ALTER TABLE `UserRole` ENABLE KEYS */; /*!40000 ALTER TABLE `Users` DISABLE KEYS */; INSERT INTO `Users` (`Id`, `Username`, `Password`, `UserDisplayName`, `Email`, `Enabled`) VALUES (1000, 'apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo', 'apollo@acme.com', 1); /*!40000 ALTER TABLE `Users` ENABLE KEYS */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /* This sql is dumped from a apollo portal database. The logic is as follows create app: consumer-test-app-id-0 consumer-test-app-id-1 consumer-test-app-id-2 create consumer: consumer-test-app-role Authorization, let consumer-test-app-role manage: consumer-test-app-id-0: Authorization type: App consumer-test-app-id-1: Authorization type: Namespace Managed Namespace: application */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!50503 SET NAMES utf8mb4 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; /*!40000 ALTER TABLE `App` DISABLE KEYS */; INSERT INTO `App` (`Id`, `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'consumer-test-app-id-0', 'consumer-test-app-id-0', 'TEST1', '样例部门1', 'apollo', 'apollo@acme.com', 'apollo', 'apollo'); INSERT INTO `App` (`Id`, `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'consumer-test-app-id-1', 'consumer-test-app-id-1', 'TEST2', '样例部门2', 'apollo', 'apollo@acme.com', 'apollo', 'apollo'); INSERT INTO `App` (`Id`, `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'consumer-test-app-id-2', 'consumer-test-app-id-2', 'TEST2', '样例部门2', 'apollo', 'apollo@acme.com', 'apollo', 'apollo'); /*!40000 ALTER TABLE `App` ENABLE KEYS */; /*!40000 ALTER TABLE `AppNamespace` DISABLE KEYS */; INSERT INTO `AppNamespace` (`Id`, `Name`, `AppId`, `Format`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'application', 'consumer-test-app-id-0', 'properties', 'default app namespace', 'apollo', 'apollo'); INSERT INTO `AppNamespace` (`Id`, `Name`, `AppId`, `Format`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'application', 'consumer-test-app-id-1', 'properties', 'default app namespace', 'apollo', 'apollo'); INSERT INTO `AppNamespace` (`Id`, `Name`, `AppId`, `Format`, `Comment`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'application', 'consumer-test-app-id-2', 'properties', 'default app namespace', 'apollo', 'apollo'); /*!40000 ALTER TABLE `AppNamespace` ENABLE KEYS */; /*!40000 ALTER TABLE `Consumer` DISABLE KEYS */; INSERT INTO `Consumer` (`Id`, `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'consumer-test-app-role', 'consumer-test-app-role', 'TEST2', '样例部门2', 'apollo', 'apollo@acme.com', 'apollo', 'apollo'); /*!40000 ALTER TABLE `Consumer` ENABLE KEYS */; /*!40000 ALTER TABLE `ConsumerAudit` DISABLE KEYS */; /*!40000 ALTER TABLE `ConsumerAudit` ENABLE KEYS */; /*!40000 ALTER TABLE `ConsumerRole` DISABLE KEYS */; INSERT INTO `ConsumerRole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 1000, 1000, 'apollo', 'apollo'); INSERT INTO `ConsumerRole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 1000, 11000, 'apollo', 'apollo'); INSERT INTO `ConsumerRole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 1000, 12000, 'apollo', 'apollo'); /*!40000 ALTER TABLE `ConsumerRole` ENABLE KEYS */; /*!40000 ALTER TABLE `ConsumerToken` DISABLE KEYS */; INSERT INTO `ConsumerToken` (`Id`, `ConsumerId`, `Token`, `Expires`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 1000, '3c16bf5b1f44b465179253442460e8c0ad845289', '2098-12-31 10:00:00', 'apollo', 'apollo'); /*!40000 ALTER TABLE `ConsumerToken` ENABLE KEYS */; /*!40000 ALTER TABLE `Favorite` DISABLE KEYS */; /*!40000 ALTER TABLE `Favorite` ENABLE KEYS */; /*!40000 ALTER TABLE `Permission` DISABLE KEYS */; INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'AssignRole', 'consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'CreateNamespace', 'consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'CreateCluster', 'consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (4000, 'ManageAppMaster', 'consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (5000, 'ModifyNamespace', 'consumer-test-app-id-0+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (6000, 'ReleaseNamespace', 'consumer-test-app-id-0+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (7000, 'ModifyNamespace', 'consumer-test-app-id-0+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (8000, 'ReleaseNamespace', 'consumer-test-app-id-0+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (9000, 'CreateNamespace', 'consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (10000, 'AssignRole', 'consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (11000, 'CreateCluster', 'consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (12000, 'ManageAppMaster', 'consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (13000, 'ModifyNamespace', 'consumer-test-app-id-1+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (14000, 'ReleaseNamespace', 'consumer-test-app-id-1+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (15000, 'ModifyNamespace', 'consumer-test-app-id-1+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (16000, 'ReleaseNamespace', 'consumer-test-app-id-1+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (17000, 'CreateCluster', 'consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (18000, 'AssignRole', 'consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (19000, 'CreateNamespace', 'consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (20000, 'ManageAppMaster', 'consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (21000, 'ModifyNamespace', 'consumer-test-app-id-2+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (22000, 'ReleaseNamespace', 'consumer-test-app-id-2+application', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (23000, 'ModifyNamespace', 'consumer-test-app-id-2+application+DEV', 'apollo', 'apollo'); INSERT INTO `Permission` (`Id`, `PermissionType`, `TargetId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (24000, 'ReleaseNamespace', 'consumer-test-app-id-2+application+DEV', 'apollo', 'apollo'); /*!40000 ALTER TABLE `Permission` ENABLE KEYS */; /*!40000 ALTER TABLE `Role` DISABLE KEYS */; INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'Master+consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'ManageAppMaster+consumer-test-app-id-0', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'ModifyNamespace+consumer-test-app-id-0+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (4000, 'ReleaseNamespace+consumer-test-app-id-0+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (5000, 'ModifyNamespace+consumer-test-app-id-0+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (6000, 'ReleaseNamespace+consumer-test-app-id-0+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (7000, 'Master+consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (8000, 'ManageAppMaster+consumer-test-app-id-1', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (9000, 'ModifyNamespace+consumer-test-app-id-1+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (10000, 'ReleaseNamespace+consumer-test-app-id-1+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (11000, 'ModifyNamespace+consumer-test-app-id-1+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (12000, 'ReleaseNamespace+consumer-test-app-id-1+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (13000, 'Master+consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (14000, 'ManageAppMaster+consumer-test-app-id-2', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (15000, 'ModifyNamespace+consumer-test-app-id-2+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (16000, 'ReleaseNamespace+consumer-test-app-id-2+application', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (17000, 'ModifyNamespace+consumer-test-app-id-2+application+DEV', 'apollo', 'apollo'); INSERT INTO `Role` (`Id`, `RoleName`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (18000, 'ReleaseNamespace+consumer-test-app-id-2+application+DEV', 'apollo', 'apollo'); /*!40000 ALTER TABLE `Role` ENABLE KEYS */; /*!40000 ALTER TABLE `RolePermission` DISABLE KEYS */; INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 1000, 1000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 1000, 2000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 1000, 3000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (4000, 2000, 4000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (5000, 3000, 5000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (6000, 4000, 6000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (7000, 5000, 7000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (8000, 6000, 8000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (9000, 7000, 9000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (10000, 7000, 10000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (11000, 7000, 11000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (12000, 8000, 12000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (13000, 9000, 13000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (14000, 10000, 14000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (15000, 11000, 15000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (16000, 12000, 16000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (17000, 13000, 17000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (18000, 13000, 18000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (19000, 13000, 19000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (20000, 14000, 20000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (21000, 15000, 21000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (22000, 16000, 22000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (23000, 17000, 23000, 'apollo', 'apollo'); INSERT INTO `RolePermission` (`Id`, `RoleId`, `PermissionId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (24000, 18000, 24000, 'apollo', 'apollo'); /*!40000 ALTER TABLE `RolePermission` ENABLE KEYS */; /*!40000 ALTER TABLE `UserRole` DISABLE KEYS */; INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1000, 'apollo', 1000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (2000, 'apollo', 3000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (3000, 'apollo', 4000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (4000, 'apollo', 7000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (5000, 'apollo', 9000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (6000, 'apollo', 10000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (7000, 'apollo', 13000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (8000, 'apollo', 15000, 'apollo', 'apollo'); INSERT INTO `UserRole` (`Id`, `UserId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (9000, 'apollo', 16000, 'apollo', 'apollo'); /*!40000 ALTER TABLE `UserRole` ENABLE KEYS */; /*!40000 ALTER TABLE `Users` DISABLE KEYS */; INSERT INTO `Users` (`Id`, `Username`, `Password`, `UserDisplayName`, `Email`, `Enabled`) VALUES (1000, 'apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo', 'apollo@acme.com', 1); /*!40000 ALTER TABLE `Users` ENABLE KEYS */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./.github/ISSUE_TEMPLATE/bug_report_zh.md
--- name: 报告Bug/使用疑问 about: 提交Apollo Bug/使用疑问,使用这个模板 title: '' labels: '' assignees: '' --- <!-- 这段文字不会显示在你的内容中。为了避免重复的信息,方便后续的检索,在提issue之前,请检查如下事项。如果是比较新手级别的问题,推荐到讨论区https://github.com/ctripcorp/apollo/discussions 提问 --> - [ ] 我已经检查过[discussions](https://github.com/ctripcorp/apollo/discussions) - [ ] 我已经搜索过[issues](https://github.com/ctripcorp/apollo/issues) - [ ] 我已经仔细检查过[FAQ](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase) **描述bug** 简洁明了地描述一下bug **复现** 通过如下步骤可以复现: 1. 2. 3. 4. **期望** 简介明了地描述你希望正常情况下应该发生什么 **截图** 如果可以,附上截图来描述你的问题 ### 额外的细节和日志 - 版本: - 错误日志 - 配置: - 平台和操作系统
--- name: 报告Bug/使用疑问 about: 提交Apollo Bug/使用疑问,使用这个模板 title: '' labels: '' assignees: '' --- <!-- 这段文字不会显示在你的内容中。为了避免重复的信息,方便后续的检索,在提issue之前,请检查如下事项。如果是比较新手级别的问题,推荐到讨论区https://github.com/ctripcorp/apollo/discussions 提问 --> - [ ] 我已经检查过[discussions](https://github.com/ctripcorp/apollo/discussions) - [ ] 我已经搜索过[issues](https://github.com/ctripcorp/apollo/issues) - [ ] 我已经仔细检查过[FAQ](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase) **描述bug** 简洁明了地描述一下bug **复现** 通过如下步骤可以复现: 1. 2. 3. 4. **期望** 简介明了地描述你希望正常情况下应该发生什么 **截图** 如果可以,附上截图来描述你的问题 ### 额外的细节和日志 - 版本: - 错误日志 - 配置: - 平台和操作系统
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/sql/delta/v080-v090/apolloportaldb-v080-v090.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v0.8.0 to v0.9.0 Use ApolloPortalDB; CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户名', `Password` varchar(64) NOT NULL DEFAULT 'default' COMMENT '密码', `Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', `Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; CREATE TABLE `Authorities` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(50) NOT NULL, `Authority` varchar(50) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `Users` (`Username`, `Password`, `Email`, `Enabled`) VALUES ('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo@acme.com', 1); INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user');
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- # delta schema to upgrade apollo portal db from v0.8.0 to v0.9.0 Use ApolloPortalDB; CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(64) NOT NULL DEFAULT 'default' COMMENT '用户名', `Password` varchar(64) NOT NULL DEFAULT 'default' COMMENT '密码', `Email` varchar(64) NOT NULL DEFAULT 'default' COMMENT '邮箱地址', `Enabled` tinyint(4) DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; CREATE TABLE `Authorities` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Username` varchar(50) NOT NULL, `Authority` varchar(50) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `Users` (`Username`, `Password`, `Email`, `Enabled`) VALUES ('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo@acme.com', 1); INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user');
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/test/resources/sql/permission/insert-test-consumerroles.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO `consumerrole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (890, 1, 990, 'someOperator', 'someOperator'); INSERT INTO `consumerrole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (891, 2, 990, 'someOperator', 'someOperator');
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO `consumerrole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (890, 1, 990, 'someOperator', 'someOperator'); INSERT INTO `consumerrole` (`Id`, `ConsumerId`, `RoleId`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (891, 2, 990, 'someOperator', 'someOperator');
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/en/usage/java-sdk-user-guide.md
TODO
TODO
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/docker-quick-start/sql/apolloconfigdb.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloConfigDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloConfigDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table audit # ------------------------------------------------------------ DROP TABLE IF EXISTS `Audit`; CREATE TABLE `Audit` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `EntityName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '表名', `EntityId` int(10) unsigned DEFAULT NULL COMMENT '记录ID', `OpName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '操作类型', `Comment` varchar(500) DEFAULT NULL COMMENT '备注', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日志审计表'; # Dump of table cluster # ------------------------------------------------------------ DROP TABLE IF EXISTS `Cluster`; CREATE TABLE `Cluster` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT '集群名字', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'App id', `ParentClusterId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父cluster', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId_Name` (`AppId`,`Name`), KEY `IX_ParentClusterId` (`ParentClusterId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集群'; # Dump of table commit # ------------------------------------------------------------ DROP TABLE IF EXISTS `Commit`; CREATE TABLE `Commit` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `ChangeSets` longtext NOT NULL COMMENT '修改变更集', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `Comment` varchar(500) DEFAULT NULL COMMENT '备注', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `AppId` (`AppId`(191)), KEY `ClusterName` (`ClusterName`(191)), KEY `NamespaceName` (`NamespaceName`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='commit 历史表'; # Dump of table grayreleaserule # ------------------------------------------------------------ DROP TABLE IF EXISTS `GrayReleaseRule`; CREATE TABLE `GrayReleaseRule` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name', `NamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Namespace Name', `BranchName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'branch name', `Rules` varchar(16000) DEFAULT '[]' COMMENT '灰度规则', `ReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '灰度对应的release', `BranchStatus` tinyint(2) DEFAULT '1' COMMENT '灰度分支状态: 0:删除分支,1:正在使用的规则 2:全量发布', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='灰度规则表'; # Dump of table instance # ------------------------------------------------------------ DROP TABLE IF EXISTS `Instance`; CREATE TABLE `Instance` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `DataCenter` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Data Center Name', `Ip` varchar(32) NOT NULL DEFAULT '' COMMENT 'instance ip', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_UNIQUE_KEY` (`AppId`,`ClusterName`,`Ip`,`DataCenter`), KEY `IX_IP` (`Ip`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='使用配置的应用实例'; # Dump of table instanceconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `InstanceConfig`; CREATE TABLE `InstanceConfig` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `InstanceId` int(11) unsigned DEFAULT NULL COMMENT 'Instance Id', `ConfigAppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id', `ConfigClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config Cluster Name', `ConfigNamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config Namespace Name', `ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key', `ReleaseDeliveryTime` timestamp NULL DEFAULT NULL COMMENT '配置获取时间', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_UNIQUE_KEY` (`InstanceId`,`ConfigAppId`,`ConfigNamespaceName`), KEY `IX_ReleaseKey` (`ReleaseKey`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Valid_Namespace` (`ConfigAppId`,`ConfigClusterName`,`ConfigNamespaceName`,`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用实例的配置信息'; # Dump of table item # ------------------------------------------------------------ DROP TABLE IF EXISTS `Item`; CREATE TABLE `Item` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId', `Key` varchar(128) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` longtext NOT NULL COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `LineNum` int(10) unsigned DEFAULT '0' COMMENT '行号', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_GroupId` (`NamespaceId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置项目'; # Dump of table namespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `Namespace`; CREATE TABLE `Namespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Namespace Name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId_ClusterName_NamespaceName` (`AppId`(191),`ClusterName`(191),`NamespaceName`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_NamespaceName` (`NamespaceName`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='命名空间'; # Dump of table namespacelock # ------------------------------------------------------------ DROP TABLE IF EXISTS `NamespaceLock`; CREATE TABLE `NamespaceLock` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', `IsDeleted` bit(1) DEFAULT b'0' COMMENT '软删除', PRIMARY KEY (`Id`), UNIQUE KEY `IX_NamespaceId` (`NamespaceId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='namespace的编辑锁'; # Dump of table release # ------------------------------------------------------------ DROP TABLE IF EXISTS `Release`; CREATE TABLE `Release` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key', `Name` varchar(64) NOT NULL DEFAULT 'default' COMMENT '发布名字', `Comment` varchar(256) DEFAULT NULL COMMENT '发布说明', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `Configurations` longtext NOT NULL COMMENT '发布配置', `IsAbandoned` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否废弃', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId_ClusterName_GroupName` (`AppId`(191),`ClusterName`(191),`NamespaceName`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ReleaseKey` (`ReleaseKey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布'; # Dump of table releasehistory # ------------------------------------------------------------ DROP TABLE IF EXISTS `ReleaseHistory`; CREATE TABLE `ReleaseHistory` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `BranchName` varchar(32) NOT NULL DEFAULT 'default' COMMENT '发布分支名', `ReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '关联的Release Id', `PreviousReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '前一次发布的ReleaseId', `Operation` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '发布类型,0: 普通发布,1: 回滚,2: 灰度发布,3: 灰度规则更新,4: 灰度合并回主分支发布,5: 主分支发布灰度自动发布,6: 主分支回滚灰度自动发布,7: 放弃灰度', `OperationContext` longtext NOT NULL COMMENT '发布上下文信息', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`,`BranchName`), KEY `IX_ReleaseId` (`ReleaseId`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布历史'; # Dump of table releasemessage # ------------------------------------------------------------ DROP TABLE IF EXISTS `ReleaseMessage`; CREATE TABLE `ReleaseMessage` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Message` varchar(1024) NOT NULL DEFAULT '' COMMENT '发布的消息内容', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Message` (`Message`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布消息'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Cluster` varchar(32) NOT NULL DEFAULT 'default' COMMENT '配置对应的集群,default为不针对特定的集群', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table accesskey # ------------------------------------------------------------ DROP TABLE IF EXISTS `AccessKey`; CREATE TABLE `AccessKey` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret', `IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥'; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`, `Comment`) VALUES ('eureka.service.url', 'default', 'http://localhost:8080/eureka/', 'Eureka服务Url,多个service以英文逗号分隔'), ('namespace.lock.switch', 'default', 'false', '一次发布只能有一个人修改开关'), ('item.value.length.limit', 'default', '20000', 'item value最大长度限制'), ('config-service.cache.enabled', 'default', 'false', 'ConfigService是否开启缓存,开启后能提高性能,但是会增大内存消耗!'), ('item.key.length.limit', 'default', '128', 'item key 最大长度限制'); # Sample Data # ------------------------------------------------------------ INSERT INTO `App` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`) VALUES ('SampleApp', 'Sample App', 'TEST1', '样例部门1', 'apollo', 'apollo@acme.com'); INSERT INTO `AppNamespace` (`Name`, `AppId`, `Format`, `IsPublic`, `Comment`) VALUES ('application', 'SampleApp', 'properties', 0, 'default app namespace'); INSERT INTO `Cluster` (`Name`, `AppId`) VALUES ('default', 'SampleApp'); INSERT INTO `Namespace` (`Id`, `AppId`, `ClusterName`, `NamespaceName`) VALUES (1, 'SampleApp', 'default', 'application'); INSERT INTO `Item` (`NamespaceId`, `Key`, `Value`, `Comment`, `LineNum`) VALUES (1, 'timeout', '100', 'sample timeout配置', 1); INSERT INTO `Release` (`ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`) VALUES ('20161009155425-d3a0749c6e20bc15', '20161009155424-release', 'Sample发布', 'SampleApp', 'default', 'application', '{\"timeout\":\"100\"}'); INSERT INTO `ReleaseHistory` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `ReleaseId`, `PreviousReleaseId`, `Operation`, `OperationContext`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES ('SampleApp', 'default', 'application', 'default', 1, 0, 0, '{}', 'apollo', 'apollo'); INSERT INTO `ReleaseMessage` (`Message`) VALUES ('SampleApp+default+application'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloConfigDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloConfigDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table audit # ------------------------------------------------------------ DROP TABLE IF EXISTS `Audit`; CREATE TABLE `Audit` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `EntityName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '表名', `EntityId` int(10) unsigned DEFAULT NULL COMMENT '记录ID', `OpName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '操作类型', `Comment` varchar(500) DEFAULT NULL COMMENT '备注', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日志审计表'; # Dump of table cluster # ------------------------------------------------------------ DROP TABLE IF EXISTS `Cluster`; CREATE TABLE `Cluster` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT '集群名字', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'App id', `ParentClusterId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父cluster', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId_Name` (`AppId`,`Name`), KEY `IX_ParentClusterId` (`ParentClusterId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集群'; # Dump of table commit # ------------------------------------------------------------ DROP TABLE IF EXISTS `Commit`; CREATE TABLE `Commit` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `ChangeSets` longtext NOT NULL COMMENT '修改变更集', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `Comment` varchar(500) DEFAULT NULL COMMENT '备注', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `AppId` (`AppId`(191)), KEY `ClusterName` (`ClusterName`(191)), KEY `NamespaceName` (`NamespaceName`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='commit 历史表'; # Dump of table grayreleaserule # ------------------------------------------------------------ DROP TABLE IF EXISTS `GrayReleaseRule`; CREATE TABLE `GrayReleaseRule` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name', `NamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Namespace Name', `BranchName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'branch name', `Rules` varchar(16000) DEFAULT '[]' COMMENT '灰度规则', `ReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '灰度对应的release', `BranchStatus` tinyint(2) DEFAULT '1' COMMENT '灰度分支状态: 0:删除分支,1:正在使用的规则 2:全量发布', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='灰度规则表'; # Dump of table instance # ------------------------------------------------------------ DROP TABLE IF EXISTS `Instance`; CREATE TABLE `Instance` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `DataCenter` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Data Center Name', `Ip` varchar(32) NOT NULL DEFAULT '' COMMENT 'instance ip', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_UNIQUE_KEY` (`AppId`,`ClusterName`,`Ip`,`DataCenter`), KEY `IX_IP` (`Ip`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='使用配置的应用实例'; # Dump of table instanceconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `InstanceConfig`; CREATE TABLE `InstanceConfig` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `InstanceId` int(11) unsigned DEFAULT NULL COMMENT 'Instance Id', `ConfigAppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id', `ConfigClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config Cluster Name', `ConfigNamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config Namespace Name', `ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key', `ReleaseDeliveryTime` timestamp NULL DEFAULT NULL COMMENT '配置获取时间', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_UNIQUE_KEY` (`InstanceId`,`ConfigAppId`,`ConfigNamespaceName`), KEY `IX_ReleaseKey` (`ReleaseKey`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Valid_Namespace` (`ConfigAppId`,`ConfigClusterName`,`ConfigNamespaceName`,`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用实例的配置信息'; # Dump of table item # ------------------------------------------------------------ DROP TABLE IF EXISTS `Item`; CREATE TABLE `Item` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId', `Key` varchar(128) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` longtext NOT NULL COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `LineNum` int(10) unsigned DEFAULT '0' COMMENT '行号', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_GroupId` (`NamespaceId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置项目'; # Dump of table namespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `Namespace`; CREATE TABLE `Namespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Namespace Name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId_ClusterName_NamespaceName` (`AppId`(191),`ClusterName`(191),`NamespaceName`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_NamespaceName` (`NamespaceName`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='命名空间'; # Dump of table namespacelock # ------------------------------------------------------------ DROP TABLE IF EXISTS `NamespaceLock`; CREATE TABLE `NamespaceLock` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', `IsDeleted` bit(1) DEFAULT b'0' COMMENT '软删除', PRIMARY KEY (`Id`), UNIQUE KEY `IX_NamespaceId` (`NamespaceId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='namespace的编辑锁'; # Dump of table release # ------------------------------------------------------------ DROP TABLE IF EXISTS `Release`; CREATE TABLE `Release` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key', `Name` varchar(64) NOT NULL DEFAULT 'default' COMMENT '发布名字', `Comment` varchar(256) DEFAULT NULL COMMENT '发布说明', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `Configurations` longtext NOT NULL COMMENT '发布配置', `IsAbandoned` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否废弃', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId_ClusterName_GroupName` (`AppId`(191),`ClusterName`(191),`NamespaceName`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ReleaseKey` (`ReleaseKey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布'; # Dump of table releasehistory # ------------------------------------------------------------ DROP TABLE IF EXISTS `ReleaseHistory`; CREATE TABLE `ReleaseHistory` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `BranchName` varchar(32) NOT NULL DEFAULT 'default' COMMENT '发布分支名', `ReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '关联的Release Id', `PreviousReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '前一次发布的ReleaseId', `Operation` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '发布类型,0: 普通发布,1: 回滚,2: 灰度发布,3: 灰度规则更新,4: 灰度合并回主分支发布,5: 主分支发布灰度自动发布,6: 主分支回滚灰度自动发布,7: 放弃灰度', `OperationContext` longtext NOT NULL COMMENT '发布上下文信息', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`,`BranchName`), KEY `IX_ReleaseId` (`ReleaseId`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布历史'; # Dump of table releasemessage # ------------------------------------------------------------ DROP TABLE IF EXISTS `ReleaseMessage`; CREATE TABLE `ReleaseMessage` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Message` varchar(1024) NOT NULL DEFAULT '' COMMENT '发布的消息内容', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Message` (`Message`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布消息'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Cluster` varchar(32) NOT NULL DEFAULT 'default' COMMENT '配置对应的集群,default为不针对特定的集群', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table accesskey # ------------------------------------------------------------ DROP TABLE IF EXISTS `AccessKey`; CREATE TABLE `AccessKey` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret', `IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥'; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`, `Comment`) VALUES ('eureka.service.url', 'default', 'http://localhost:8080/eureka/', 'Eureka服务Url,多个service以英文逗号分隔'), ('namespace.lock.switch', 'default', 'false', '一次发布只能有一个人修改开关'), ('item.value.length.limit', 'default', '20000', 'item value最大长度限制'), ('config-service.cache.enabled', 'default', 'false', 'ConfigService是否开启缓存,开启后能提高性能,但是会增大内存消耗!'), ('item.key.length.limit', 'default', '128', 'item key 最大长度限制'); # Sample Data # ------------------------------------------------------------ INSERT INTO `App` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`) VALUES ('SampleApp', 'Sample App', 'TEST1', '样例部门1', 'apollo', 'apollo@acme.com'); INSERT INTO `AppNamespace` (`Name`, `AppId`, `Format`, `IsPublic`, `Comment`) VALUES ('application', 'SampleApp', 'properties', 0, 'default app namespace'); INSERT INTO `Cluster` (`Name`, `AppId`) VALUES ('default', 'SampleApp'); INSERT INTO `Namespace` (`Id`, `AppId`, `ClusterName`, `NamespaceName`) VALUES (1, 'SampleApp', 'default', 'application'); INSERT INTO `Item` (`NamespaceId`, `Key`, `Value`, `Comment`, `LineNum`) VALUES (1, 'timeout', '100', 'sample timeout配置', 1); INSERT INTO `Release` (`ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`) VALUES ('20161009155425-d3a0749c6e20bc15', '20161009155424-release', 'Sample发布', 'SampleApp', 'default', 'application', '{\"timeout\":\"100\"}'); INSERT INTO `ReleaseHistory` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `ReleaseId`, `PreviousReleaseId`, `Operation`, `OperationContext`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES ('SampleApp', 'default', 'application', 'default', 1, 0, 0, '{}', 'apollo', 'apollo'); INSERT INTO `ReleaseMessage` (`Message`) VALUES ('SampleApp+default+application'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/test/resources/filter/test-access-control-disabled.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`) VALUES ('admin-service.access.tokens', 'default', 'someToken,anotherToken'), ('admin-service.access.control.enabled', 'default', 'false');
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`) VALUES ('admin-service.access.tokens', 'default', 'someToken,anotherToken'), ('admin-service.access.control.enabled', 'default', 'false');
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/en/development/portal-how-to-enable-email-service.md
TODO
TODO
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/ItemSetControllerTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import com.ctrip.framework.apollo.biz.entity.Item; import com.ctrip.framework.apollo.biz.repository.ItemRepository; import com.ctrip.framework.apollo.common.dto.AppDTO; import com.ctrip.framework.apollo.common.dto.ClusterDTO; import com.ctrip.framework.apollo.common.dto.ItemChangeSets; import com.ctrip.framework.apollo.common.dto.ItemDTO; import com.ctrip.framework.apollo.common.dto.NamespaceDTO; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.jdbc.Sql.ExecutionPhase; import org.springframework.web.client.RestTemplate; import java.util.List; public class ItemSetControllerTest extends AbstractControllerTest { @Autowired ItemRepository itemRepository; @Test @Sql(scripts = "/controller/test-itemset.sql", executionPhase = ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD) public void testItemSetCreated() { String appId = "someAppId"; AppDTO app = restTemplate.getForObject("http://localhost:" + port + "/apps/" + appId, AppDTO.class); ClusterDTO cluster = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/default", ClusterDTO.class); NamespaceDTO namespace = restTemplate.getForObject("http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/application", NamespaceDTO.class); Assert.assertEquals("someAppId", app.getAppId()); Assert.assertEquals("default", cluster.getName()); Assert.assertEquals("application", namespace.getNamespaceName()); ItemChangeSets itemSet = new ItemChangeSets(); itemSet.setDataChangeLastModifiedBy("created"); RestTemplate createdTemplate = (new TestRestTemplate()).getRestTemplate(); createdTemplate.setMessageConverters(restTemplate.getMessageConverters()); int createdSize = 3; for (int i = 0; i < createdSize; i++) { ItemDTO item = new ItemDTO(); item.setNamespaceId(namespace.getId()); item.setKey("key_" + i); item.setValue("created_value_" + i); itemSet.addCreateItem(item); } ResponseEntity<Void> response = createdTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", itemSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); List<Item> items = itemRepository.findByNamespaceIdOrderByLineNumAsc(namespace.getId()); Assert.assertEquals(createdSize, items.size()); Item item0 = items.get(0); Assert.assertEquals("key_0", item0.getKey()); Assert.assertEquals("created_value_0", item0.getValue()); Assert.assertEquals("created", item0.getDataChangeCreatedBy()); Assert.assertNotNull(item0.getDataChangeCreatedTime()); } @Test @Sql(scripts = "/controller/test-itemset.sql", executionPhase = ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD) public void testItemSetUpdated() { String appId = "someAppId"; AppDTO app = restTemplate.getForObject("http://localhost:" + port + "/apps/" + appId, AppDTO.class); ClusterDTO cluster = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/default", ClusterDTO.class); NamespaceDTO namespace = restTemplate.getForObject("http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/application", NamespaceDTO.class); Assert.assertEquals("someAppId", app.getAppId()); Assert.assertEquals("default", cluster.getName()); Assert.assertEquals("application", namespace.getNamespaceName()); ItemChangeSets createChangeSet = new ItemChangeSets(); createChangeSet.setDataChangeLastModifiedBy("created"); RestTemplate createdRestTemplate = (new TestRestTemplate()).getRestTemplate(); createdRestTemplate.setMessageConverters(restTemplate.getMessageConverters()); int createdSize = 3; for (int i = 0; i < createdSize; i++) { ItemDTO item = new ItemDTO(); item.setNamespaceId(namespace.getId()); item.setKey("key_" + i); item.setValue("created_value_" + i); createChangeSet.addCreateItem(item); } ResponseEntity<Void> response = createdRestTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", createChangeSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); ItemDTO[] items = createdRestTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/items", ItemDTO[].class); ItemChangeSets updateChangeSet = new ItemChangeSets(); updateChangeSet.setDataChangeLastModifiedBy("updated"); RestTemplate updatedRestTemplate = (new TestRestTemplate()).getRestTemplate(); updatedRestTemplate.setMessageConverters(restTemplate.getMessageConverters()); int updatedSize = 2; for (int i = 0; i < updatedSize; i++) { items[i].setValue("updated_value_" + i); updateChangeSet.addUpdateItem(items[i]); } response = updatedRestTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", updateChangeSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); List<Item> savedItems = itemRepository.findByNamespaceIdOrderByLineNumAsc(namespace.getId()); Assert.assertEquals(createdSize, savedItems.size()); Item item0 = savedItems.get(0); Assert.assertEquals("key_0", item0.getKey()); Assert.assertEquals("updated_value_0", item0.getValue()); Assert.assertEquals("created", item0.getDataChangeCreatedBy()); Assert.assertEquals("updated", item0.getDataChangeLastModifiedBy()); Assert.assertNotNull(item0.getDataChangeCreatedTime()); Assert.assertNotNull(item0.getDataChangeLastModifiedTime()); } @Test @Sql(scripts = "/controller/test-itemset.sql", executionPhase = ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD) public void testItemSetDeleted() { String appId = "someAppId"; AppDTO app = restTemplate.getForObject("http://localhost:" + port + "/apps/" + appId, AppDTO.class); ClusterDTO cluster = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/default", ClusterDTO.class); NamespaceDTO namespace = restTemplate.getForObject("http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/application", NamespaceDTO.class); Assert.assertEquals("someAppId", app.getAppId()); Assert.assertEquals("default", cluster.getName()); Assert.assertEquals("application", namespace.getNamespaceName()); ItemChangeSets createChangeSet = new ItemChangeSets(); createChangeSet.setDataChangeLastModifiedBy("created"); RestTemplate createdTemplate = (new TestRestTemplate()).getRestTemplate(); createdTemplate.setMessageConverters(restTemplate.getMessageConverters()); int createdSize = 3; for (int i = 0; i < createdSize; i++) { ItemDTO item = new ItemDTO(); item.setNamespaceId(namespace.getId()); item.setKey("key_" + i); item.setValue("created_value_" + i); createChangeSet.addCreateItem(item); } ResponseEntity<Void> response = createdTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", createChangeSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); ItemDTO[] items = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/items", ItemDTO[].class); ItemChangeSets deleteChangeSet = new ItemChangeSets(); deleteChangeSet.setDataChangeLastModifiedBy("deleted"); RestTemplate deletedTemplate = (new TestRestTemplate()).getRestTemplate(); deletedTemplate.setMessageConverters(restTemplate.getMessageConverters()); int deletedSize = 1; for (int i = 0; i < deletedSize; i++) { items[i].setValue("deleted_value_" + i); deleteChangeSet.addDeleteItem(items[i]); } response = deletedTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", deleteChangeSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); List<Item> savedItems = itemRepository.findByNamespaceIdOrderByLineNumAsc(namespace.getId()); Assert.assertEquals(createdSize - deletedSize, savedItems.size()); Item item0 = savedItems.get(0); Assert.assertEquals("key_1", item0.getKey()); Assert.assertEquals("created_value_1", item0.getValue()); Assert.assertEquals("created", item0.getDataChangeCreatedBy()); Assert.assertNotNull(item0.getDataChangeCreatedTime()); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import com.ctrip.framework.apollo.biz.entity.Item; import com.ctrip.framework.apollo.biz.repository.ItemRepository; import com.ctrip.framework.apollo.common.dto.AppDTO; import com.ctrip.framework.apollo.common.dto.ClusterDTO; import com.ctrip.framework.apollo.common.dto.ItemChangeSets; import com.ctrip.framework.apollo.common.dto.ItemDTO; import com.ctrip.framework.apollo.common.dto.NamespaceDTO; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.jdbc.Sql.ExecutionPhase; import org.springframework.web.client.RestTemplate; import java.util.List; public class ItemSetControllerTest extends AbstractControllerTest { @Autowired ItemRepository itemRepository; @Test @Sql(scripts = "/controller/test-itemset.sql", executionPhase = ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD) public void testItemSetCreated() { String appId = "someAppId"; AppDTO app = restTemplate.getForObject("http://localhost:" + port + "/apps/" + appId, AppDTO.class); ClusterDTO cluster = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/default", ClusterDTO.class); NamespaceDTO namespace = restTemplate.getForObject("http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/application", NamespaceDTO.class); Assert.assertEquals("someAppId", app.getAppId()); Assert.assertEquals("default", cluster.getName()); Assert.assertEquals("application", namespace.getNamespaceName()); ItemChangeSets itemSet = new ItemChangeSets(); itemSet.setDataChangeLastModifiedBy("created"); RestTemplate createdTemplate = (new TestRestTemplate()).getRestTemplate(); createdTemplate.setMessageConverters(restTemplate.getMessageConverters()); int createdSize = 3; for (int i = 0; i < createdSize; i++) { ItemDTO item = new ItemDTO(); item.setNamespaceId(namespace.getId()); item.setKey("key_" + i); item.setValue("created_value_" + i); itemSet.addCreateItem(item); } ResponseEntity<Void> response = createdTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", itemSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); List<Item> items = itemRepository.findByNamespaceIdOrderByLineNumAsc(namespace.getId()); Assert.assertEquals(createdSize, items.size()); Item item0 = items.get(0); Assert.assertEquals("key_0", item0.getKey()); Assert.assertEquals("created_value_0", item0.getValue()); Assert.assertEquals("created", item0.getDataChangeCreatedBy()); Assert.assertNotNull(item0.getDataChangeCreatedTime()); } @Test @Sql(scripts = "/controller/test-itemset.sql", executionPhase = ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD) public void testItemSetUpdated() { String appId = "someAppId"; AppDTO app = restTemplate.getForObject("http://localhost:" + port + "/apps/" + appId, AppDTO.class); ClusterDTO cluster = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/default", ClusterDTO.class); NamespaceDTO namespace = restTemplate.getForObject("http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/application", NamespaceDTO.class); Assert.assertEquals("someAppId", app.getAppId()); Assert.assertEquals("default", cluster.getName()); Assert.assertEquals("application", namespace.getNamespaceName()); ItemChangeSets createChangeSet = new ItemChangeSets(); createChangeSet.setDataChangeLastModifiedBy("created"); RestTemplate createdRestTemplate = (new TestRestTemplate()).getRestTemplate(); createdRestTemplate.setMessageConverters(restTemplate.getMessageConverters()); int createdSize = 3; for (int i = 0; i < createdSize; i++) { ItemDTO item = new ItemDTO(); item.setNamespaceId(namespace.getId()); item.setKey("key_" + i); item.setValue("created_value_" + i); createChangeSet.addCreateItem(item); } ResponseEntity<Void> response = createdRestTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", createChangeSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); ItemDTO[] items = createdRestTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/items", ItemDTO[].class); ItemChangeSets updateChangeSet = new ItemChangeSets(); updateChangeSet.setDataChangeLastModifiedBy("updated"); RestTemplate updatedRestTemplate = (new TestRestTemplate()).getRestTemplate(); updatedRestTemplate.setMessageConverters(restTemplate.getMessageConverters()); int updatedSize = 2; for (int i = 0; i < updatedSize; i++) { items[i].setValue("updated_value_" + i); updateChangeSet.addUpdateItem(items[i]); } response = updatedRestTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", updateChangeSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); List<Item> savedItems = itemRepository.findByNamespaceIdOrderByLineNumAsc(namespace.getId()); Assert.assertEquals(createdSize, savedItems.size()); Item item0 = savedItems.get(0); Assert.assertEquals("key_0", item0.getKey()); Assert.assertEquals("updated_value_0", item0.getValue()); Assert.assertEquals("created", item0.getDataChangeCreatedBy()); Assert.assertEquals("updated", item0.getDataChangeLastModifiedBy()); Assert.assertNotNull(item0.getDataChangeCreatedTime()); Assert.assertNotNull(item0.getDataChangeLastModifiedTime()); } @Test @Sql(scripts = "/controller/test-itemset.sql", executionPhase = ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD) public void testItemSetDeleted() { String appId = "someAppId"; AppDTO app = restTemplate.getForObject("http://localhost:" + port + "/apps/" + appId, AppDTO.class); ClusterDTO cluster = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/default", ClusterDTO.class); NamespaceDTO namespace = restTemplate.getForObject("http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/application", NamespaceDTO.class); Assert.assertEquals("someAppId", app.getAppId()); Assert.assertEquals("default", cluster.getName()); Assert.assertEquals("application", namespace.getNamespaceName()); ItemChangeSets createChangeSet = new ItemChangeSets(); createChangeSet.setDataChangeLastModifiedBy("created"); RestTemplate createdTemplate = (new TestRestTemplate()).getRestTemplate(); createdTemplate.setMessageConverters(restTemplate.getMessageConverters()); int createdSize = 3; for (int i = 0; i < createdSize; i++) { ItemDTO item = new ItemDTO(); item.setNamespaceId(namespace.getId()); item.setKey("key_" + i); item.setValue("created_value_" + i); createChangeSet.addCreateItem(item); } ResponseEntity<Void> response = createdTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", createChangeSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); ItemDTO[] items = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/items", ItemDTO[].class); ItemChangeSets deleteChangeSet = new ItemChangeSets(); deleteChangeSet.setDataChangeLastModifiedBy("deleted"); RestTemplate deletedTemplate = (new TestRestTemplate()).getRestTemplate(); deletedTemplate.setMessageConverters(restTemplate.getMessageConverters()); int deletedSize = 1; for (int i = 0; i < deletedSize; i++) { items[i].setValue("deleted_value_" + i); deleteChangeSet.addDeleteItem(items[i]); } response = deletedTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/itemset", deleteChangeSet, Void.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); List<Item> savedItems = itemRepository.findByNamespaceIdOrderByLineNumAsc(namespace.getId()); Assert.assertEquals(createdSize - deletedSize, savedItems.size()); Item item0 = savedItems.get(0); Assert.assertEquals("key_1", item0.getKey()); Assert.assertEquals("created_value_1", item0.getValue()); Assert.assertEquals("created", item0.getDataChangeCreatedBy()); Assert.assertNotNull(item0.getDataChangeCreatedTime()); } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/main/java/com/ctrip/framework/apollo/model/ConfigFileChangeEvent.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.model; import com.ctrip.framework.apollo.enums.PropertyChangeType; /** * @author Jason Song(song_s@ctrip.com) */ public class ConfigFileChangeEvent { private final String namespace; private final String oldValue; private final String newValue; private final PropertyChangeType changeType; /** * Constructor. * * @param namespace the namespace of the config file change event * @param oldValue the value before change * @param newValue the value after change * @param changeType the change type */ public ConfigFileChangeEvent(String namespace, String oldValue, String newValue, PropertyChangeType changeType) { this.namespace = namespace; this.oldValue = oldValue; this.newValue = newValue; this.changeType = changeType; } public String getNamespace() { return namespace; } public String getOldValue() { return oldValue; } public String getNewValue() { return newValue; } public PropertyChangeType getChangeType() { return changeType; } @Override public String toString() { final StringBuilder sb = new StringBuilder("ConfigFileChangeEvent{"); sb.append("namespace='").append(namespace).append('\''); sb.append(", oldValue='").append(oldValue).append('\''); sb.append(", newValue='").append(newValue).append('\''); sb.append(", changeType=").append(changeType); sb.append('}'); return sb.toString(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.model; import com.ctrip.framework.apollo.enums.PropertyChangeType; /** * @author Jason Song(song_s@ctrip.com) */ public class ConfigFileChangeEvent { private final String namespace; private final String oldValue; private final String newValue; private final PropertyChangeType changeType; /** * Constructor. * * @param namespace the namespace of the config file change event * @param oldValue the value before change * @param newValue the value after change * @param changeType the change type */ public ConfigFileChangeEvent(String namespace, String oldValue, String newValue, PropertyChangeType changeType) { this.namespace = namespace; this.oldValue = oldValue; this.newValue = newValue; this.changeType = changeType; } public String getNamespace() { return namespace; } public String getOldValue() { return oldValue; } public String getNewValue() { return newValue; } public PropertyChangeType getChangeType() { return changeType; } @Override public String toString() { final StringBuilder sb = new StringBuilder("ConfigFileChangeEvent{"); sb.append("namespace='").append(namespace).append('\''); sb.append(", oldValue='").append(oldValue).append('\''); sb.append(", newValue='").append(newValue).append('\''); sb.append(", changeType=").append(changeType); sb.append('}'); return sb.toString(); } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/test/resources/yaml/case7.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # xxx
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # xxx
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/service/AppNamespaceServiceTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.service; import com.ctrip.framework.apollo.common.entity.AppNamespace; import com.ctrip.framework.apollo.common.exception.BadRequestException; import com.ctrip.framework.apollo.core.ConfigConsts; import com.ctrip.framework.apollo.core.enums.ConfigFileFormat; import com.ctrip.framework.apollo.portal.AbstractIntegrationTest; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.jdbc.Sql; import java.util.List; public class AppNamespaceServiceTest extends AbstractIntegrationTest { @Autowired private AppNamespaceService appNamespaceService; private final String APP = "app-test"; @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testFindPublicAppNamespace() { List<AppNamespace> appNamespaceList = appNamespaceService.findPublicAppNamespaces(); Assert.assertNotNull(appNamespaceList); Assert.assertEquals(5, appNamespaceList.size()); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testFindPublicAppNamespaceByName() { Assert.assertNotNull(appNamespaceService.findPublicAppNamespace("datasourcexml")); Assert.assertNull(appNamespaceService.findPublicAppNamespace("TFF.song0711-02")); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testFindPublicAppNamespaceByAppAndName() { Assert.assertNotNull(appNamespaceService.findByAppIdAndName("100003173", "datasourcexml")); Assert.assertNull(appNamespaceService.findByAppIdAndName("100003173", "TFF.song0711-02")); } @Test @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreateDefaultAppNamespace() { appNamespaceService.createDefaultAppNamespace(APP); AppNamespace appNamespace = appNamespaceService.findByAppIdAndName(APP, ConfigConsts.NAMESPACE_APPLICATION); Assert.assertNotNull(appNamespace); Assert.assertEquals(ConfigFileFormat.Properties.getValue(), appNamespace.getFormat()); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setName("old"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceExistedAsPrivateAppNamespace() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setName("private-01"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceNotExistedWithNoAppendnamespacePrefix() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setName("old"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); AppNamespace createdAppNamespace = appNamespaceService.createAppNamespaceInLocal(appNamespace, false); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceExistedWithNoAppendnamespacePrefix() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setName("datasource"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace, false); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceNotExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespaceService.createAppNamespaceInLocal(appNamespace); AppNamespace createdAppNamespace = appNamespaceService.findPublicAppNamespace(appNamespace.getName()); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceWithWrongFormatNotExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setFormat(ConfigFileFormat.YAML.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace); AppNamespace createdAppNamespace = appNamespaceService.findPublicAppNamespace(appNamespace.getName()); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); Assert.assertEquals(ConfigFileFormat.Properties.getValue(), createdAppNamespace.getFormat()); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePrivateAppNamespaceExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(false); appNamespace.setName("datasource"); appNamespace.setAppId("100003173"); appNamespaceService.createAppNamespaceInLocal(appNamespace); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePrivateAppNamespaceExistedInAnotherAppId() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(false); appNamespace.setName("datasource"); appNamespace.setAppId("song0711-01"); appNamespaceService.createAppNamespaceInLocal(appNamespace); AppNamespace createdAppNamespace = appNamespaceService.findByAppIdAndName(appNamespace.getAppId(), appNamespace.getName()); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePrivateAppNamespaceExistedInAnotherAppIdAsPublic() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(false); appNamespace.setName("SCC.song0711-03"); appNamespace.setAppId("100003173"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePrivateAppNamespaceNotExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(false); appNamespaceService.createAppNamespaceInLocal(appNamespace); AppNamespace createdAppNamespace = appNamespaceService.findByAppIdAndName(appNamespace.getAppId(), appNamespace.getName()); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); } private AppNamespace assembleBaseAppNamespace() { AppNamespace appNamespace = new AppNamespace(); appNamespace.setName("appNamespace"); appNamespace.setAppId("1000"); appNamespace.setFormat(ConfigFileFormat.XML.getValue()); return appNamespace; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.service; import com.ctrip.framework.apollo.common.entity.AppNamespace; import com.ctrip.framework.apollo.common.exception.BadRequestException; import com.ctrip.framework.apollo.core.ConfigConsts; import com.ctrip.framework.apollo.core.enums.ConfigFileFormat; import com.ctrip.framework.apollo.portal.AbstractIntegrationTest; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.jdbc.Sql; import java.util.List; public class AppNamespaceServiceTest extends AbstractIntegrationTest { @Autowired private AppNamespaceService appNamespaceService; private final String APP = "app-test"; @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testFindPublicAppNamespace() { List<AppNamespace> appNamespaceList = appNamespaceService.findPublicAppNamespaces(); Assert.assertNotNull(appNamespaceList); Assert.assertEquals(5, appNamespaceList.size()); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testFindPublicAppNamespaceByName() { Assert.assertNotNull(appNamespaceService.findPublicAppNamespace("datasourcexml")); Assert.assertNull(appNamespaceService.findPublicAppNamespace("TFF.song0711-02")); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testFindPublicAppNamespaceByAppAndName() { Assert.assertNotNull(appNamespaceService.findByAppIdAndName("100003173", "datasourcexml")); Assert.assertNull(appNamespaceService.findByAppIdAndName("100003173", "TFF.song0711-02")); } @Test @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreateDefaultAppNamespace() { appNamespaceService.createDefaultAppNamespace(APP); AppNamespace appNamespace = appNamespaceService.findByAppIdAndName(APP, ConfigConsts.NAMESPACE_APPLICATION); Assert.assertNotNull(appNamespace); Assert.assertEquals(ConfigFileFormat.Properties.getValue(), appNamespace.getFormat()); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setName("old"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceExistedAsPrivateAppNamespace() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setName("private-01"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceNotExistedWithNoAppendnamespacePrefix() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setName("old"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); AppNamespace createdAppNamespace = appNamespaceService.createAppNamespaceInLocal(appNamespace, false); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceExistedWithNoAppendnamespacePrefix() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setName("datasource"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace, false); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceNotExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespaceService.createAppNamespaceInLocal(appNamespace); AppNamespace createdAppNamespace = appNamespaceService.findPublicAppNamespace(appNamespace.getName()); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePublicAppNamespaceWithWrongFormatNotExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(true); appNamespace.setFormat(ConfigFileFormat.YAML.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace); AppNamespace createdAppNamespace = appNamespaceService.findPublicAppNamespace(appNamespace.getName()); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); Assert.assertEquals(ConfigFileFormat.Properties.getValue(), createdAppNamespace.getFormat()); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePrivateAppNamespaceExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(false); appNamespace.setName("datasource"); appNamespace.setAppId("100003173"); appNamespaceService.createAppNamespaceInLocal(appNamespace); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePrivateAppNamespaceExistedInAnotherAppId() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(false); appNamespace.setName("datasource"); appNamespace.setAppId("song0711-01"); appNamespaceService.createAppNamespaceInLocal(appNamespace); AppNamespace createdAppNamespace = appNamespaceService.findByAppIdAndName(appNamespace.getAppId(), appNamespace.getName()); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); } @Test(expected = BadRequestException.class) @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePrivateAppNamespaceExistedInAnotherAppIdAsPublic() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(false); appNamespace.setName("SCC.song0711-03"); appNamespace.setAppId("100003173"); appNamespace.setFormat(ConfigFileFormat.Properties.getValue()); appNamespaceService.createAppNamespaceInLocal(appNamespace); } @Test @Sql(scripts = "/sql/appnamespaceservice/init-appnamespace.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/cleanup.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testCreatePrivateAppNamespaceNotExisted() { AppNamespace appNamespace = assembleBaseAppNamespace(); appNamespace.setPublic(false); appNamespaceService.createAppNamespaceInLocal(appNamespace); AppNamespace createdAppNamespace = appNamespaceService.findByAppIdAndName(appNamespace.getAppId(), appNamespace.getName()); Assert.assertNotNull(createdAppNamespace); Assert.assertEquals(appNamespace.getName(), createdAppNamespace.getName()); } private AppNamespace assembleBaseAppNamespace() { AppNamespace appNamespace = new AppNamespace(); appNamespace.setName("appNamespace"); appNamespace.setAppId("1000"); appNamespace.setFormat(ConfigFileFormat.XML.getValue()); return appNamespace; } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/main/resources/application-consul-discovery.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # eureka.client.enabled=false #consul enabled spring.cloud.consul.enabled=true spring.cloud.consul.discovery.enabled=true spring.cloud.consul.service-registry.enabled=true spring.cloud.consul.discovery.heartbeat.enabled=true spring.cloud.consul.discovery.instance-id=apollo-adminservice
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # eureka.client.enabled=false #consul enabled spring.cloud.consul.enabled=true spring.cloud.consul.discovery.enabled=true spring.cloud.consul.service-registry.enabled=true spring.cloud.consul.discovery.heartbeat.enabled=true spring.cloud.consul.discovery.instance-id=apollo-adminservice
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/integration/AbstractBaseIntegrationTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.configservice.integration; import com.ctrip.framework.apollo.biz.service.BizDBPropertySource; import com.google.gson.Gson; import com.ctrip.framework.apollo.ConfigServiceTestConfiguration; import com.ctrip.framework.apollo.biz.config.BizConfig; import com.ctrip.framework.apollo.biz.entity.Namespace; import com.ctrip.framework.apollo.biz.entity.Release; import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; import com.ctrip.framework.apollo.biz.repository.ReleaseMessageRepository; import com.ctrip.framework.apollo.biz.repository.ReleaseRepository; import com.ctrip.framework.apollo.biz.utils.ReleaseKeyGenerator; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.web.client.DefaultResponseErrorHandler; import org.springframework.web.client.RestTemplate; import java.time.Duration; import java.util.Date; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.annotation.PostConstruct; /** * @author Jason Song(song_s@ctrip.com) */ @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = AbstractBaseIntegrationTest.TestConfiguration.class, webEnvironment = WebEnvironment.RANDOM_PORT) public abstract class AbstractBaseIntegrationTest { @Autowired private ReleaseMessageRepository releaseMessageRepository; @Autowired private ReleaseRepository releaseRepository; private static final Gson GSON = new Gson(); protected RestTemplate restTemplate = (new TestRestTemplate(new RestTemplateBuilder() .setConnectTimeout(Duration.ofSeconds(5)))).getRestTemplate(); @PostConstruct private void postConstruct() { restTemplate.setErrorHandler(new DefaultResponseErrorHandler()); } @Value("${local.server.port}") int port; protected String getHostUrl() { return "localhost:" + port; } @Configuration @Import(ConfigServiceTestConfiguration.class) protected static class TestConfiguration { @Bean public BizConfig bizConfig(final BizDBPropertySource bizDBPropertySource) { return new TestBizConfig(bizDBPropertySource); } } protected void sendReleaseMessage(String message) { ReleaseMessage releaseMessage = new ReleaseMessage(message); releaseMessageRepository.save(releaseMessage); } public Release buildRelease(String name, String comment, Namespace namespace, Map<String, String> configurations, String owner) { Release release = new Release(); release.setReleaseKey(ReleaseKeyGenerator.generateReleaseKey(namespace)); release.setDataChangeCreatedTime(new Date()); release.setDataChangeCreatedBy(owner); release.setDataChangeLastModifiedBy(owner); release.setName(name); release.setComment(comment); release.setAppId(namespace.getAppId()); release.setClusterName(namespace.getClusterName()); release.setNamespaceName(namespace.getNamespaceName()); release.setConfigurations(GSON.toJson(configurations)); release = releaseRepository.save(release); return release; } protected void periodicSendMessage(ExecutorService executorService, String message, AtomicBoolean stop) { executorService.submit(() -> { //wait for the request connected to server while (!stop.get() && !Thread.currentThread().isInterrupted()) { try { TimeUnit.MILLISECONDS.sleep(100); } catch (InterruptedException e) { } //double check if (stop.get()) { break; } sendReleaseMessage(message); } }); } private static class TestBizConfig extends BizConfig { public TestBizConfig(final BizDBPropertySource propertySource) { super(propertySource); } @Override public int appNamespaceCacheScanInterval() { //should be short enough to update the AppNamespace cache in time return 1; } @Override public TimeUnit appNamespaceCacheScanIntervalTimeUnit() { return TimeUnit.MILLISECONDS; } } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.configservice.integration; import com.ctrip.framework.apollo.biz.service.BizDBPropertySource; import com.google.gson.Gson; import com.ctrip.framework.apollo.ConfigServiceTestConfiguration; import com.ctrip.framework.apollo.biz.config.BizConfig; import com.ctrip.framework.apollo.biz.entity.Namespace; import com.ctrip.framework.apollo.biz.entity.Release; import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; import com.ctrip.framework.apollo.biz.repository.ReleaseMessageRepository; import com.ctrip.framework.apollo.biz.repository.ReleaseRepository; import com.ctrip.framework.apollo.biz.utils.ReleaseKeyGenerator; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.web.client.DefaultResponseErrorHandler; import org.springframework.web.client.RestTemplate; import java.time.Duration; import java.util.Date; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import javax.annotation.PostConstruct; /** * @author Jason Song(song_s@ctrip.com) */ @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = AbstractBaseIntegrationTest.TestConfiguration.class, webEnvironment = WebEnvironment.RANDOM_PORT) public abstract class AbstractBaseIntegrationTest { @Autowired private ReleaseMessageRepository releaseMessageRepository; @Autowired private ReleaseRepository releaseRepository; private static final Gson GSON = new Gson(); protected RestTemplate restTemplate = (new TestRestTemplate(new RestTemplateBuilder() .setConnectTimeout(Duration.ofSeconds(5)))).getRestTemplate(); @PostConstruct private void postConstruct() { restTemplate.setErrorHandler(new DefaultResponseErrorHandler()); } @Value("${local.server.port}") int port; protected String getHostUrl() { return "localhost:" + port; } @Configuration @Import(ConfigServiceTestConfiguration.class) protected static class TestConfiguration { @Bean public BizConfig bizConfig(final BizDBPropertySource bizDBPropertySource) { return new TestBizConfig(bizDBPropertySource); } } protected void sendReleaseMessage(String message) { ReleaseMessage releaseMessage = new ReleaseMessage(message); releaseMessageRepository.save(releaseMessage); } public Release buildRelease(String name, String comment, Namespace namespace, Map<String, String> configurations, String owner) { Release release = new Release(); release.setReleaseKey(ReleaseKeyGenerator.generateReleaseKey(namespace)); release.setDataChangeCreatedTime(new Date()); release.setDataChangeCreatedBy(owner); release.setDataChangeLastModifiedBy(owner); release.setName(name); release.setComment(comment); release.setAppId(namespace.getAppId()); release.setClusterName(namespace.getClusterName()); release.setNamespaceName(namespace.getNamespaceName()); release.setConfigurations(GSON.toJson(configurations)); release = releaseRepository.save(release); return release; } protected void periodicSendMessage(ExecutorService executorService, String message, AtomicBoolean stop) { executorService.submit(() -> { //wait for the request connected to server while (!stop.get() && !Thread.currentThread().isInterrupted()) { try { TimeUnit.MILLISECONDS.sleep(100); } catch (InterruptedException e) { } //double check if (stop.get()) { break; } sendReleaseMessage(message); } }); } private static class TestBizConfig extends BizConfig { public TestBizConfig(final BizDBPropertySource propertySource) { super(propertySource); } @Override public int appNamespaceCacheScanInterval() { //should be short enough to update the AppNamespace cache in time return 1; } @Override public TimeUnit appNamespaceCacheScanIntervalTimeUnit() { return TimeUnit.MILLISECONDS; } } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/helm/apollo-portal/.helmignore
# Patterns to ignore when building packages. # This supports shell glob matching, relative path matching, and # negation (prefixed with !). Only one pattern per line. .DS_Store # Common VCS dirs .git/ .gitignore .bzr/ .bzrignore .hg/ .hgignore .svn/ # Common backup files *.swp *.bak *.tmp *.orig *~ # Various IDEs .project .idea/ *.tmproj .vscode/
# Patterns to ignore when building packages. # This supports shell glob matching, relative path matching, and # negation (prefixed with !). Only one pattern per line. .DS_Store # Common VCS dirs .git/ .gitignore .bzr/ .bzrignore .hg/ .hgignore .svn/ # Common backup files *.swp *.bak *.tmp *.orig *~ # Various IDEs .project .idea/ *.tmproj .vscode/
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./doc/images/apollo-net-server-url-config.png
PNG  IHDRF)!} iCCPICC ProfileHT[Lz$! ҫ@z *6D',"CbCA/CA]DEeX¾ݳgs͝o3?~P &3cb8  @es2nW}xdֿ_&drfr>EP "K8eEHn?='<ad6[#gfs:d:f._'p>ҧT'/55$)ϼ˴La*{[igh!A|CYmJANϟf7b9e{ϲ8%m٢{YYJ RXRN D7ksxQ͏ ̔09ҼH*9Q-}Ǵ̹8ge}zM,wiMaj\>|fv,d_\`O H ]e%Gpb!&pL3-mڃ3Cނ\a"IsvR$ w ?8bQL=u"tԁ60&H6" b2<D`X6PݠTC'A38.6 @k0 > pAJ C yAP(AICkPTCUP+t ݄4( a5X^n?/ 8·ep5| n/÷~ b4Q&(;*JDPPRT5Պ@CIPoP_X4 DѾ4^.FkM{(Q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GנZ`"Q:aRr_;R\U3@u$6_.UJW,fDș䯺Z>d6tZn9#L#7#}S֦h*r{qX@߫&  To v U5p#S+BW1gR osrflg:?[lxƍ/ֱ<u8M'-=%>bkv񊡬b(4\*%32|իNX؈O(ED_a9h69y P-aMτ]mhKP)tIG:(t:K-Q ;mQf,g5Ƙ%1Qf9KVچu`ƈ93̛㿳=~fi- l1Z! cWۂ301u3s_ЍW!G rC] /x;̗>t x%ùk>] 3`̀&zCv6f 3`6À7j̀0f 1ƨ!̀0f 0p1 fN5f 3`e`U_Xǚ~j{ΣxK}R޼6f 3pi ѹolP mbCAf\=df 3`@U4FYS:ݲTrznڹ0f lQ_S61qxSY:૱Q=tQ`vXm8ݳ0f 2pƨ]cmX d'Vf5hںZ5ne3`̀0[b?|͏vlZ@Ly`5ȕխ3?!ub]pSym̀0f6F(ݼimM5gcY>}f 3`*~Q+~k|oHs5ķH.m㦈Lx6f 3Pf?cK⍛sMf@jjsj?1#VĢ.C Qf<N 3`VXUcC8&@bbluC\k3f 3vV% MGl2c.e\ 3`U5F82 3`̀U\30f 3`0h[5f 3`7FW}ޜ0f 30э~s 3`̀0@՚S~~(y ,YѶ&y:kg3`̀0@1Zv5=K}ϔu8p3`̀0@1ʚ6'!S6sֹ%Xv3`̀"ǨSmdF=uuC¸hW=c|)r2y18juh|,k3`̀0f`dF3{(Le]Ie@jS=%t9Ʊ<_;g 3`̀g  S~` m;էTu|sjx|(c63`̀08j^k.& LKsJ0G9.<ػ1̀0f @MzƁ {8bk7Ed߹̀0f׺Yހ9-MIɖvRhS{iQx ku77kLAn9 0f 3@nh,P(sÒ0f 3hjbS̀0f 3piuf 3`%2OMdIENDB`
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/test/java/com/ctrip/framework/apollo/openapi/v1/controller/AppControllerTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.v1.controller; import static org.junit.Assert.assertEquals; import com.ctrip.framework.apollo.openapi.entity.ConsumerRole; import com.ctrip.framework.apollo.openapi.repository.ConsumerAuditRepository; import com.ctrip.framework.apollo.openapi.repository.ConsumerRepository; import com.ctrip.framework.apollo.openapi.repository.ConsumerRoleRepository; import com.ctrip.framework.apollo.openapi.repository.ConsumerTokenRepository; import com.ctrip.framework.apollo.openapi.service.ConsumerService; import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil; import com.ctrip.framework.apollo.portal.component.PortalSettings; import com.ctrip.framework.apollo.portal.component.config.PortalConfig; import com.ctrip.framework.apollo.portal.entity.po.Role; import com.ctrip.framework.apollo.portal.repository.PermissionRepository; import com.ctrip.framework.apollo.portal.repository.RolePermissionRepository; import com.ctrip.framework.apollo.portal.repository.RoleRepository; import com.ctrip.framework.apollo.portal.service.AppService; import com.ctrip.framework.apollo.portal.service.ClusterService; import com.ctrip.framework.apollo.portal.service.RolePermissionService; import com.ctrip.framework.apollo.portal.spi.UserInfoHolder; import com.ctrip.framework.apollo.portal.spi.UserService; import com.google.common.collect.Sets; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultHandlers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; /** * @author wxq */ @RunWith(SpringRunner.class) @WebMvcTest(controllers = AppController.class) @Import(ConsumerService.class) public class AppControllerTest { @Autowired private MockMvc mockMvc; @MockBean private PortalSettings portalSettings; @MockBean private AppService appService; @MockBean private ClusterService clusterService; @MockBean private ConsumerAuthUtil consumerAuthUtil; @MockBean private PermissionRepository permissionRepository; @MockBean private RolePermissionRepository rolePermissionRepository; @MockBean private UserInfoHolder userInfoHolder; @MockBean private ConsumerTokenRepository consumerTokenRepository; @MockBean private ConsumerRepository consumerRepository; @MockBean private ConsumerAuditRepository consumerAuditRepository; @MockBean private ConsumerRoleRepository consumerRoleRepository; @MockBean private PortalConfig portalConfig; @MockBean private RolePermissionService rolePermissionService; @MockBean private UserService userService; @MockBean private RoleRepository roleRepository; @Test public void testFindAppsAuthorized() throws Exception { final long consumerId = 123456; Mockito.when(this.consumerAuthUtil.retrieveConsumerId(Mockito.any())).thenReturn(consumerId); final List<ConsumerRole> consumerRoles = Arrays.asList( generateConsumerRoleByRoleId(6), generateConsumerRoleByRoleId(7), generateConsumerRoleByRoleId(8) ); Mockito.when(this.consumerRoleRepository.findByConsumerId(consumerId)) .thenReturn(consumerRoles); Mockito.when(this.roleRepository.findAllById(Mockito.any())).thenAnswer(invocation -> { Set<Role> roles = new HashSet<>(); Iterable<Long> roleIds = invocation.getArgument(0); for (Long roleId : roleIds) { if (roleId == 6) { roles.add(generateRoleByIdAndRoleName(6, "ModifyNamespace+app1+application+DEV")); } if (roleId == 7) { roles.add(generateRoleByIdAndRoleName(7, "ReleaseNamespace+app1+application+DEV")); } if (roleId == 8) { roles.add(generateRoleByIdAndRoleName(8, "Master+app2")); } } assertEquals(3, roles.size()); return roles; }); this.mockMvc.perform(MockMvcRequestBuilders.get("/openapi/v1/apps/authorized")) .andDo(MockMvcResultHandlers.print()) .andExpect(MockMvcResultMatchers.status().is2xxSuccessful()); Mockito.verify(this.consumerRoleRepository, Mockito.times(1)).findByConsumerId(consumerId); Mockito.verify(this.roleRepository, Mockito.times(1)).findAllById(Mockito.any()); ArgumentCaptor<Set<String>> appIdsCaptor = ArgumentCaptor.forClass(Set.class); Mockito.verify(this.appService).findByAppIds(appIdsCaptor.capture()); Set<String> appIds = appIdsCaptor.getValue(); assertEquals(Sets.newHashSet("app1", "app2"), appIds); } private static ConsumerRole generateConsumerRoleByRoleId(long roleId) { ConsumerRole consumerRole = new ConsumerRole(); consumerRole.setRoleId(roleId); return consumerRole; } private static Role generateRoleByIdAndRoleName(long id, String roleName) { Role role = new Role(); role.setId(id); role.setRoleName(roleName); return role; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.v1.controller; import static org.junit.Assert.assertEquals; import com.ctrip.framework.apollo.openapi.entity.ConsumerRole; import com.ctrip.framework.apollo.openapi.repository.ConsumerAuditRepository; import com.ctrip.framework.apollo.openapi.repository.ConsumerRepository; import com.ctrip.framework.apollo.openapi.repository.ConsumerRoleRepository; import com.ctrip.framework.apollo.openapi.repository.ConsumerTokenRepository; import com.ctrip.framework.apollo.openapi.service.ConsumerService; import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil; import com.ctrip.framework.apollo.portal.component.PortalSettings; import com.ctrip.framework.apollo.portal.component.config.PortalConfig; import com.ctrip.framework.apollo.portal.entity.po.Role; import com.ctrip.framework.apollo.portal.repository.PermissionRepository; import com.ctrip.framework.apollo.portal.repository.RolePermissionRepository; import com.ctrip.framework.apollo.portal.repository.RoleRepository; import com.ctrip.framework.apollo.portal.service.AppService; import com.ctrip.framework.apollo.portal.service.ClusterService; import com.ctrip.framework.apollo.portal.service.RolePermissionService; import com.ctrip.framework.apollo.portal.spi.UserInfoHolder; import com.ctrip.framework.apollo.portal.spi.UserService; import com.google.common.collect.Sets; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultHandlers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; /** * @author wxq */ @RunWith(SpringRunner.class) @WebMvcTest(controllers = AppController.class) @Import(ConsumerService.class) public class AppControllerTest { @Autowired private MockMvc mockMvc; @MockBean private PortalSettings portalSettings; @MockBean private AppService appService; @MockBean private ClusterService clusterService; @MockBean private ConsumerAuthUtil consumerAuthUtil; @MockBean private PermissionRepository permissionRepository; @MockBean private RolePermissionRepository rolePermissionRepository; @MockBean private UserInfoHolder userInfoHolder; @MockBean private ConsumerTokenRepository consumerTokenRepository; @MockBean private ConsumerRepository consumerRepository; @MockBean private ConsumerAuditRepository consumerAuditRepository; @MockBean private ConsumerRoleRepository consumerRoleRepository; @MockBean private PortalConfig portalConfig; @MockBean private RolePermissionService rolePermissionService; @MockBean private UserService userService; @MockBean private RoleRepository roleRepository; @Test public void testFindAppsAuthorized() throws Exception { final long consumerId = 123456; Mockito.when(this.consumerAuthUtil.retrieveConsumerId(Mockito.any())).thenReturn(consumerId); final List<ConsumerRole> consumerRoles = Arrays.asList( generateConsumerRoleByRoleId(6), generateConsumerRoleByRoleId(7), generateConsumerRoleByRoleId(8) ); Mockito.when(this.consumerRoleRepository.findByConsumerId(consumerId)) .thenReturn(consumerRoles); Mockito.when(this.roleRepository.findAllById(Mockito.any())).thenAnswer(invocation -> { Set<Role> roles = new HashSet<>(); Iterable<Long> roleIds = invocation.getArgument(0); for (Long roleId : roleIds) { if (roleId == 6) { roles.add(generateRoleByIdAndRoleName(6, "ModifyNamespace+app1+application+DEV")); } if (roleId == 7) { roles.add(generateRoleByIdAndRoleName(7, "ReleaseNamespace+app1+application+DEV")); } if (roleId == 8) { roles.add(generateRoleByIdAndRoleName(8, "Master+app2")); } } assertEquals(3, roles.size()); return roles; }); this.mockMvc.perform(MockMvcRequestBuilders.get("/openapi/v1/apps/authorized")) .andDo(MockMvcResultHandlers.print()) .andExpect(MockMvcResultMatchers.status().is2xxSuccessful()); Mockito.verify(this.consumerRoleRepository, Mockito.times(1)).findByConsumerId(consumerId); Mockito.verify(this.roleRepository, Mockito.times(1)).findAllById(Mockito.any()); ArgumentCaptor<Set<String>> appIdsCaptor = ArgumentCaptor.forClass(Set.class); Mockito.verify(this.appService).findByAppIds(appIdsCaptor.capture()); Set<String> appIds = appIdsCaptor.getValue(); assertEquals(Sets.newHashSet("app1", "app2"), appIds); } private static ConsumerRole generateConsumerRoleByRoleId(long roleId) { ConsumerRole consumerRole = new ConsumerRole(); consumerRole.setRoleId(roleId); return consumerRole; } private static Role generateRoleByIdAndRoleName(long id, String roleName) { Role role = new Role(); role.setId(id); role.setRoleName(roleName); return role; } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./doc/images/gray-release/create-gray-release.png
PNG  IHDR  IDATxř&vUY$@K" H`};|绳L#L" "9kW<~w4+XLwuowW?Cx<n " " " " " " " " " @Z. /" " " " " " " " "HӅ " " " " " " " " ].pUЧk@D@D@D@D@D@D@D@D@ }]$ " " " " " " " " "#PSSc;v창{Zuuu%D@D@,ZAA B"""D ISD@D@D@D@DV\iع[lQQСCMb_}G_w=@ظq٠Aȧh#V" ݜ@,={mΝVXX͉"P<KD@D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"Dxw"$@"$@"$@"0@󮷸]dfq'G,N"$@"$@"$@"$D`@}˖-/K-/e+K=XmyUj(HD HD HD  R/YVʴܠr Y|OgD HD HD HD`B!0oEY}egL(0ESLn@"$@"$@"$@"0a=&LUfAD HD HD HD H&3IMϲ'@"$@"$@"$@"L0UID HD HD HD ԛ.dIENDB`
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/AppController.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.v1.controller; import com.ctrip.framework.apollo.common.dto.ClusterDTO; import com.ctrip.framework.apollo.common.entity.App; import com.ctrip.framework.apollo.common.utils.BeanUtils; import com.ctrip.framework.apollo.openapi.entity.ConsumerRole; import com.ctrip.framework.apollo.openapi.service.ConsumerService; import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil; import com.ctrip.framework.apollo.portal.environment.Env; import com.ctrip.framework.apollo.openapi.dto.OpenAppDTO; import com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO; import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils; import com.ctrip.framework.apollo.portal.component.PortalSettings; import com.ctrip.framework.apollo.portal.service.AppService; import com.ctrip.framework.apollo.portal.service.ClusterService; import com.google.common.collect.Sets; import java.util.Set; import javax.servlet.http.HttpServletRequest; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @RestController("openapiAppController") @RequestMapping("/openapi/v1") public class AppController { private final PortalSettings portalSettings; private final ClusterService clusterService; private final AppService appService; private final ConsumerAuthUtil consumerAuthUtil; private final ConsumerService consumerService; public AppController(final PortalSettings portalSettings, final ClusterService clusterService, final AppService appService, final ConsumerAuthUtil consumerAuthUtil, final ConsumerService consumerService) { this.portalSettings = portalSettings; this.clusterService = clusterService; this.appService = appService; this.consumerAuthUtil = consumerAuthUtil; this.consumerService = consumerService; } @GetMapping(value = "/apps/{appId}/envclusters") public List<OpenEnvClusterDTO> loadEnvClusterInfo(@PathVariable String appId){ List<OpenEnvClusterDTO> envClusters = new LinkedList<>(); List<Env> envs = portalSettings.getActiveEnvs(); for (Env env : envs) { OpenEnvClusterDTO envCluster = new OpenEnvClusterDTO(); envCluster.setEnv(env.name()); List<ClusterDTO> clusterDTOs = clusterService.findClusters(env, appId); envCluster.setClusters(BeanUtils.toPropertySet("name", clusterDTOs)); envClusters.add(envCluster); } return envClusters; } @GetMapping("/apps") public List<OpenAppDTO> findApps(@RequestParam(value = "appIds", required = false) String appIds) { final List<App> apps = new ArrayList<>(); if (StringUtils.isEmpty(appIds)) { apps.addAll(appService.findAll()); } else { apps.addAll(appService.findByAppIds(Sets.newHashSet(appIds.split(",")))); } return OpenApiBeanUtils.transformFromApps(apps); } /** * @return which apps can be operated by open api */ @GetMapping("/apps/authorized") public List<OpenAppDTO> findAppsAuthorized(HttpServletRequest request) { long consumerId = this.consumerAuthUtil.retrieveConsumerId(request); Set<String> appIds = this.consumerService.findAppIdsAuthorizedByConsumerId(consumerId); List<App> apps = this.appService.findByAppIds(appIds); List<OpenAppDTO> openAppDTOS = OpenApiBeanUtils.transformFromApps(apps); return openAppDTOS; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.v1.controller; import com.ctrip.framework.apollo.common.dto.ClusterDTO; import com.ctrip.framework.apollo.common.entity.App; import com.ctrip.framework.apollo.common.utils.BeanUtils; import com.ctrip.framework.apollo.openapi.entity.ConsumerRole; import com.ctrip.framework.apollo.openapi.service.ConsumerService; import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil; import com.ctrip.framework.apollo.portal.environment.Env; import com.ctrip.framework.apollo.openapi.dto.OpenAppDTO; import com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO; import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils; import com.ctrip.framework.apollo.portal.component.PortalSettings; import com.ctrip.framework.apollo.portal.service.AppService; import com.ctrip.framework.apollo.portal.service.ClusterService; import com.google.common.collect.Sets; import java.util.Set; import javax.servlet.http.HttpServletRequest; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @RestController("openapiAppController") @RequestMapping("/openapi/v1") public class AppController { private final PortalSettings portalSettings; private final ClusterService clusterService; private final AppService appService; private final ConsumerAuthUtil consumerAuthUtil; private final ConsumerService consumerService; public AppController(final PortalSettings portalSettings, final ClusterService clusterService, final AppService appService, final ConsumerAuthUtil consumerAuthUtil, final ConsumerService consumerService) { this.portalSettings = portalSettings; this.clusterService = clusterService; this.appService = appService; this.consumerAuthUtil = consumerAuthUtil; this.consumerService = consumerService; } @GetMapping(value = "/apps/{appId}/envclusters") public List<OpenEnvClusterDTO> loadEnvClusterInfo(@PathVariable String appId){ List<OpenEnvClusterDTO> envClusters = new LinkedList<>(); List<Env> envs = portalSettings.getActiveEnvs(); for (Env env : envs) { OpenEnvClusterDTO envCluster = new OpenEnvClusterDTO(); envCluster.setEnv(env.name()); List<ClusterDTO> clusterDTOs = clusterService.findClusters(env, appId); envCluster.setClusters(BeanUtils.toPropertySet("name", clusterDTOs)); envClusters.add(envCluster); } return envClusters; } @GetMapping("/apps") public List<OpenAppDTO> findApps(@RequestParam(value = "appIds", required = false) String appIds) { final List<App> apps = new ArrayList<>(); if (StringUtils.isEmpty(appIds)) { apps.addAll(appService.findAll()); } else { apps.addAll(appService.findByAppIds(Sets.newHashSet(appIds.split(",")))); } return OpenApiBeanUtils.transformFromApps(apps); } /** * @return which apps can be operated by open api */ @GetMapping("/apps/authorized") public List<OpenAppDTO> findAppsAuthorized(HttpServletRequest request) { long consumerId = this.consumerAuthUtil.retrieveConsumerId(request); Set<String> appIds = this.consumerService.findAppIdsAuthorizedByConsumerId(consumerId); List<App> apps = this.appService.findByAppIds(appIds); List<OpenAppDTO> openAppDTOS = OpenApiBeanUtils.transformFromApps(apps); return openAppDTOS; } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-common/src/main/resources/application-ctrip.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Titan Datasource (Ctrip only) fat.titan.url=${fat_titan_url} fat.titan.dbname=${fat_titan_dbname} uat.titan.url=${uat_titan_url} uat.titan.dbname=${uat_titan_dbname} pro.titan.url=${pro_titan_url} pro.titan.dbname=${pro_titan_dbname}
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Titan Datasource (Ctrip only) fat.titan.url=${fat_titan_url} fat.titan.dbname=${fat_titan_dbname} uat.titan.url=${uat_titan_url} uat.titan.dbname=${uat_titan_dbname} pro.titan.url=${pro_titan_url} pro.titan.dbname=${pro_titan_dbname}
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./doc/images/tech-support-qq-2.png
PNG  IHDR.."h-IDATx pTqNcZk:Ai}EԨq+(X+FJM""y5!4@=ytQX {lΞ={><nfBh@EB! (* QT(DQPB! B QT(PBEB (*P(DQEB! (* QT(DQPB! B QT(Pn4h9 ͽ1&((((((((x*c cB:{@EQEQEQEQEQEQEQEQEQ<]v(G`v};KcLEQEQEQǘ(((1QEQxH `QEQEQEQEQEQEQEQEQEQl)10֖rEQEQEQEQEQEQEQEQEQ`_ YcLEQEQEQEQEQEQEQEQE1 Z' E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0TAk DEQEQEQEQEQEQEQEQE1"؃ωX ~n9EQEQEQEQEQEQEQEQEQ<ñɃx|kP1QEQEQEQEQEQEQEQEQ05 Co{EQEQEQEQEQEQEQEQEQLhh:v$VPo((((((((v(&ơ/vϏEiWEQEQEQEQEQEQEQEQPRs"v̂5Uv2#YEQEQEQEQEQEQEQEQE1cwb<u6%((((((((<=D<|QEQEQEQEQEQEQEQEQEQ #saOG(((((((((O16i?'3&((((((((('7vh!l~b-((((((((6)* QT(DQPB! B QT(PBEB (*P(DQEB! (* QT(DQPB! B (*P(DQEB! (*c7IENDB`
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./doc/images/logo/logo.png
PNG  IHDRm&pgAMA a cHRMz&u0`:pQ< pHYs  YiTXtXML:com.adobe.xmp<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0"> <rdf:RDF xmlns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B&rQ`7;qt)׎Swqyg~3dȐ cBk\4&=m\@0b <ĵ՛;wWA莲.)* ofH UJt9E@~q[jv 0t?WYVD^ov24ïA-OpUDb!_PY|L{X||EjE)DG̭ n] չ#0 []u0;|o6i~QֻW3Sv WyD堻0#2b4A }z5XP*1HG 4`0F`m(!i71nƋj9K\SqYv 2>[b\`}v=D1"8bh%:߰`E=ߥ&Z%EU0P8^Ђ+ZE(apG(.g:E[p MhI%s;%|%d dEYRCj/ƅ+Rɻ#R[$mb }u."eQE"*,JU ]a֤(u|:fPԭMa$/,OڵdQ?BU]TXV: ܬ=s9~2t5`Z.aEKG(#@Qު=)b2öנkܜVDq ujGk7qXX,\Kh8ø#$-]:.D(C=! u(>Tڿ)^-,cʕ!2ѥ o < Xd&d!Q)dc[HT=*>vmŶA.[k\`٫E~vgR󸆣tYRQE(=.[!Gv 2GWw[wI%Դa -48(ΛoOkPN#j=Ae[Vv\mиR/U~p`>ee|كDaI,u˜1CX:s<J^e.@!-}uUDUr yN [& Xo\3dk^aWlatOL߻D[Qʖy<z`l:;g"~ن$?Ϳ'4gQVIY$Ks<j\.RO=zrƆ>JMuߦ c>>&Ĺ_7lVnm_lUU}ta͵;2E!(л<*ok{ l5HNr f{>}<G QqyP.'ٝ{]A!2>z_@z;x-kofwM@D56m\?ף7VLIENDB`
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/CNAME
www.apolloconfig.com
www.apolloconfig.com
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/RolePermission.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.entity.po; import com.ctrip.framework.apollo.common.entity.BaseEntity; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; /** * @author Jason Song(song_s@ctrip.com) */ @Entity @Table(name = "RolePermission") @SQLDelete(sql = "Update RolePermission set isDeleted = 1 where id = ?") @Where(clause = "isDeleted = 0") public class RolePermission extends BaseEntity { @Column(name = "RoleId", nullable = false) private long roleId; @Column(name = "PermissionId", nullable = false) private long permissionId; public long getRoleId() { return roleId; } public void setRoleId(long roleId) { this.roleId = roleId; } public long getPermissionId() { return permissionId; } public void setPermissionId(long permissionId) { this.permissionId = permissionId; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.entity.po; import com.ctrip.framework.apollo.common.entity.BaseEntity; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; /** * @author Jason Song(song_s@ctrip.com) */ @Entity @Table(name = "RolePermission") @SQLDelete(sql = "Update RolePermission set isDeleted = 1 where id = ?") @Where(clause = "isDeleted = 0") public class RolePermission extends BaseEntity { @Column(name = "RoleId", nullable = false) private long roleId; @Column(name = "PermissionId", nullable = false) private long permissionId; public long getRoleId() { return roleId; } public void setRoleId(long roleId) { this.roleId = roleId; } public long getPermissionId() { return permissionId; } public void setPermissionId(long permissionId) { this.permissionId = permissionId; } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/main/java/com/ctrip/framework/foundation/internals/io/ProxyInputStream.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package com.ctrip.framework.foundation.internals.io; import static com.ctrip.framework.foundation.internals.io.IOUtils.EOF; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; /** * A Proxy stream which acts as expected, that is it passes the method calls on to the proxied stream and doesn't change * which methods are being called. * <p> * It is an alternative base class to FilterInputStream to increase reusability, because FilterInputStream changes the * methods being called, such as read(byte[]) to read(byte[], int, int). * <p> * See the protected methods for ways in which a subclass can easily decorate a stream with custom pre-, post- or error * processing functionality. * * @version $Id: ProxyInputStream.java 1603493 2014-06-18 15:46:07Z ggregory $ */ public abstract class ProxyInputStream extends FilterInputStream { /** * Constructs a new ProxyInputStream. * * @param proxy the InputStream to delegate to */ public ProxyInputStream(final InputStream proxy) { super(proxy); // the proxy is stored in a protected superclass variable named 'in' } /** * Invokes the delegate's <code>read()</code> method. * * @return the byte read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read() throws IOException { try { beforeRead(1); final int b = in.read(); afterRead(b != EOF ? 1 : EOF); return b; } catch (final IOException e) { handleIOException(e); return EOF; } } /** * Invokes the delegate's <code>read(byte[])</code> method. * * @param bts the buffer to read the bytes into * @return the number of bytes read or EOF if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final byte[] bts) throws IOException { try { beforeRead(bts != null ? bts.length : 0); final int n = in.read(bts); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } } /** * Invokes the delegate's <code>read(byte[], int, int)</code> method. * * @param bts the buffer to read the bytes into * @param off The start offset * @param len The number of bytes to read * @return the number of bytes read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final byte[] bts, final int off, final int len) throws IOException { try { beforeRead(len); final int n = in.read(bts, off, len); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } } /** * Invokes the delegate's <code>skip(long)</code> method. * * @param ln the number of bytes to skip * @return the actual number of bytes skipped * @throws IOException if an I/O error occurs */ @Override public long skip(final long ln) throws IOException { try { return in.skip(ln); } catch (final IOException e) { handleIOException(e); return 0; } } /** * Invokes the delegate's <code>available()</code> method. * * @return the number of available bytes * @throws IOException if an I/O error occurs */ @Override public int available() throws IOException { try { return super.available(); } catch (final IOException e) { handleIOException(e); return 0; } } /** * Invokes the delegate's <code>close()</code> method. * * @throws IOException if an I/O error occurs */ @Override public void close() throws IOException { try { in.close(); } catch (final IOException e) { handleIOException(e); } } /** * Invokes the delegate's <code>mark(int)</code> method. * * @param readlimit read ahead limit */ @Override public synchronized void mark(final int readlimit) { in.mark(readlimit); } /** * Invokes the delegate's <code>reset()</code> method. * * @throws IOException if an I/O error occurs */ @Override public synchronized void reset() throws IOException { try { in.reset(); } catch (final IOException e) { handleIOException(e); } } /** * Invokes the delegate's <code>markSupported()</code> method. * * @return true if mark is supported, otherwise false */ @Override public boolean markSupported() { return in.markSupported(); } /** * Invoked by the read methods before the call is proxied. The number of bytes that the caller wanted to read (1 for * the {@link #read()} method, buffer length for {@link #read(byte[])}, etc.) is given as an argument. * <p> * Subclasses can override this method to add common pre-processing functionality without having to override all the * read methods. The default implementation does nothing. * <p> * Note this method is <em>not</em> called from {@link #skip(long)} or {@link #reset()}. You need to explicitly * override those methods if you want to add pre-processing steps also to them. * * @since 2.0 * @param n number of bytes that the caller asked to be read * @throws IOException if the pre-processing fails */ protected void beforeRead(final int n) throws IOException { // no-op } /** * Invoked by the read methods after the proxied call has returned successfully. The number of bytes returned to the * caller (or -1 if the end of stream was reached) is given as an argument. * <p> * Subclasses can override this method to add common post-processing functionality without having to override all the * read methods. The default implementation does nothing. * <p> * Note this method is <em>not</em> called from {@link #skip(long)} or {@link #reset()}. You need to explicitly * override those methods if you want to add post-processing steps also to them. * * @since 2.0 * @param n number of bytes read, or -1 if the end of stream was reached * @throws IOException if the post-processing fails */ protected void afterRead(final int n) throws IOException { // no-op } /** * Handle any IOExceptions thrown. * <p> * This method provides a point to implement custom exception handling. The default behaviour is to re-throw the * exception. * * @param e The IOException thrown * @throws IOException if an I/O error occurs * @since 2.0 */ protected void handleIOException(final IOException e) throws IOException { throw e; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package com.ctrip.framework.foundation.internals.io; import static com.ctrip.framework.foundation.internals.io.IOUtils.EOF; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; /** * A Proxy stream which acts as expected, that is it passes the method calls on to the proxied stream and doesn't change * which methods are being called. * <p> * It is an alternative base class to FilterInputStream to increase reusability, because FilterInputStream changes the * methods being called, such as read(byte[]) to read(byte[], int, int). * <p> * See the protected methods for ways in which a subclass can easily decorate a stream with custom pre-, post- or error * processing functionality. * * @version $Id: ProxyInputStream.java 1603493 2014-06-18 15:46:07Z ggregory $ */ public abstract class ProxyInputStream extends FilterInputStream { /** * Constructs a new ProxyInputStream. * * @param proxy the InputStream to delegate to */ public ProxyInputStream(final InputStream proxy) { super(proxy); // the proxy is stored in a protected superclass variable named 'in' } /** * Invokes the delegate's <code>read()</code> method. * * @return the byte read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read() throws IOException { try { beforeRead(1); final int b = in.read(); afterRead(b != EOF ? 1 : EOF); return b; } catch (final IOException e) { handleIOException(e); return EOF; } } /** * Invokes the delegate's <code>read(byte[])</code> method. * * @param bts the buffer to read the bytes into * @return the number of bytes read or EOF if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final byte[] bts) throws IOException { try { beforeRead(bts != null ? bts.length : 0); final int n = in.read(bts); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } } /** * Invokes the delegate's <code>read(byte[], int, int)</code> method. * * @param bts the buffer to read the bytes into * @param off The start offset * @param len The number of bytes to read * @return the number of bytes read or -1 if the end of stream * @throws IOException if an I/O error occurs */ @Override public int read(final byte[] bts, final int off, final int len) throws IOException { try { beforeRead(len); final int n = in.read(bts, off, len); afterRead(n); return n; } catch (final IOException e) { handleIOException(e); return EOF; } } /** * Invokes the delegate's <code>skip(long)</code> method. * * @param ln the number of bytes to skip * @return the actual number of bytes skipped * @throws IOException if an I/O error occurs */ @Override public long skip(final long ln) throws IOException { try { return in.skip(ln); } catch (final IOException e) { handleIOException(e); return 0; } } /** * Invokes the delegate's <code>available()</code> method. * * @return the number of available bytes * @throws IOException if an I/O error occurs */ @Override public int available() throws IOException { try { return super.available(); } catch (final IOException e) { handleIOException(e); return 0; } } /** * Invokes the delegate's <code>close()</code> method. * * @throws IOException if an I/O error occurs */ @Override public void close() throws IOException { try { in.close(); } catch (final IOException e) { handleIOException(e); } } /** * Invokes the delegate's <code>mark(int)</code> method. * * @param readlimit read ahead limit */ @Override public synchronized void mark(final int readlimit) { in.mark(readlimit); } /** * Invokes the delegate's <code>reset()</code> method. * * @throws IOException if an I/O error occurs */ @Override public synchronized void reset() throws IOException { try { in.reset(); } catch (final IOException e) { handleIOException(e); } } /** * Invokes the delegate's <code>markSupported()</code> method. * * @return true if mark is supported, otherwise false */ @Override public boolean markSupported() { return in.markSupported(); } /** * Invoked by the read methods before the call is proxied. The number of bytes that the caller wanted to read (1 for * the {@link #read()} method, buffer length for {@link #read(byte[])}, etc.) is given as an argument. * <p> * Subclasses can override this method to add common pre-processing functionality without having to override all the * read methods. The default implementation does nothing. * <p> * Note this method is <em>not</em> called from {@link #skip(long)} or {@link #reset()}. You need to explicitly * override those methods if you want to add pre-processing steps also to them. * * @since 2.0 * @param n number of bytes that the caller asked to be read * @throws IOException if the pre-processing fails */ protected void beforeRead(final int n) throws IOException { // no-op } /** * Invoked by the read methods after the proxied call has returned successfully. The number of bytes returned to the * caller (or -1 if the end of stream was reached) is given as an argument. * <p> * Subclasses can override this method to add common post-processing functionality without having to override all the * read methods. The default implementation does nothing. * <p> * Note this method is <em>not</em> called from {@link #skip(long)} or {@link #reset()}. You need to explicitly * override those methods if you want to add post-processing steps also to them. * * @since 2.0 * @param n number of bytes read, or -1 if the end of stream was reached * @throws IOException if the post-processing fails */ protected void afterRead(final int n) throws IOException { // no-op } /** * Handle any IOExceptions thrown. * <p> * This method provides a point to implement custom exception handling. The default behaviour is to re-throw the * exception. * * @param e The IOException thrown * @throws IOException if an I/O error occurs * @since 2.0 */ protected void handleIOException(final IOException e) throws IOException { throw e; } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/test/resources/application.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.session.store-type=none spring.datasource.url = jdbc:h2:mem:~/apolloportaldb;mode=mysql;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.properties.hibernate.show_sql=false spring.h2.console.enabled = true spring.h2.console.settings.web-allow-others=true spring.main.allow-bean-definition-overriding=true
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.session.store-type=none spring.datasource.url = jdbc:h2:mem:~/apolloportaldb;mode=mysql;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.properties.hibernate.show_sql=false spring.h2.console.enabled = true spring.h2.console.settings.web-allow-others=true spring.main.allow-bean-definition-overriding=true
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/ctrip/CtripLogoutHandler.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.spi.ctrip; import com.ctrip.framework.apollo.portal.component.config.PortalConfig; import com.ctrip.framework.apollo.portal.spi.LogoutHandler; import org.springframework.beans.factory.annotation.Autowired; import java.io.IOException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class CtripLogoutHandler implements LogoutHandler { @Autowired private PortalConfig portalConfig; @Override public void logout(HttpServletRequest request, HttpServletResponse response) { //将session销毁 HttpSession session = request.getSession(false); if (session != null) { session.invalidate(); } Cookie cookie = new Cookie("memCacheAssertionID", null); //将cookie的有效期设置为0,命令浏览器删除该cookie cookie.setMaxAge(0); cookie.setPath(request.getContextPath() + "/"); response.addCookie(cookie); //重定向到SSO的logout地址 String casServerUrl = portalConfig.casServerUrlPrefix(); String serverName = portalConfig.portalServerName(); try { response.sendRedirect(casServerUrl + "/logout?service=" + serverName); } catch (IOException e) { throw new RuntimeException(e); } } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.spi.ctrip; import com.ctrip.framework.apollo.portal.component.config.PortalConfig; import com.ctrip.framework.apollo.portal.spi.LogoutHandler; import org.springframework.beans.factory.annotation.Autowired; import java.io.IOException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class CtripLogoutHandler implements LogoutHandler { @Autowired private PortalConfig portalConfig; @Override public void logout(HttpServletRequest request, HttpServletResponse response) { //将session销毁 HttpSession session = request.getSession(false); if (session != null) { session.invalidate(); } Cookie cookie = new Cookie("memCacheAssertionID", null); //将cookie的有效期设置为0,命令浏览器删除该cookie cookie.setMaxAge(0); cookie.setPath(request.getContextPath() + "/"); response.addCookie(cookie); //重定向到SSO的logout地址 String casServerUrl = portalConfig.casServerUrlPrefix(); String serverName = portalConfig.portalServerName(); try { response.sendRedirect(casServerUrl + "/logout?service=" + serverName); } catch (IOException e) { throw new RuntimeException(e); } } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/AdditionalUserInfoEnrichServiceImpl.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.service; import com.ctrip.framework.apollo.portal.enricher.AdditionalUserInfoEnricher; import com.ctrip.framework.apollo.portal.enricher.adapter.UserInfoEnrichedAdapter; import com.ctrip.framework.apollo.portal.entity.bo.UserInfo; import com.ctrip.framework.apollo.portal.spi.UserService; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; /** * @author vdisk <vdisk@foxmail.com> */ @Service public class AdditionalUserInfoEnrichServiceImpl implements AdditionalUserInfoEnrichService { private final UserService userService; private final List<AdditionalUserInfoEnricher> enricherList; public AdditionalUserInfoEnrichServiceImpl( UserService userService, List<AdditionalUserInfoEnricher> enricherList) { this.userService = userService; this.enricherList = enricherList; } @Override public <T> void enrichAdditionalUserInfo(List<? extends T> list, Function<? super T, ? extends UserInfoEnrichedAdapter> mapper) { if (CollectionUtils.isEmpty(list)) { return; } if (CollectionUtils.isEmpty(this.enricherList)) { return; } List<UserInfoEnrichedAdapter> adapterList = this.adapt(list, mapper); if (CollectionUtils.isEmpty(adapterList)) { return; } Set<String> userIdSet = this.extractOperatorId(adapterList); if (CollectionUtils.isEmpty(userIdSet)) { return; } List<UserInfo> userInfoList = this.userService.findByUserIds(new ArrayList<>(userIdSet)); if (CollectionUtils.isEmpty(userInfoList)) { return; } Map<String, UserInfo> userInfoMap = userInfoList.stream() .collect(Collectors.toMap(UserInfo::getUserId, Function.identity())); for (UserInfoEnrichedAdapter adapter : adapterList) { for (AdditionalUserInfoEnricher enricher : this.enricherList) { enricher.enrichAdditionalUserInfo(adapter, userInfoMap); } } } private <T> List<UserInfoEnrichedAdapter> adapt(List<? extends T> dtoList, Function<? super T, ? extends UserInfoEnrichedAdapter> mapper) { List<UserInfoEnrichedAdapter> adapterList = new ArrayList<>(dtoList.size()); for (T dto : dtoList) { if (dto == null) { continue; } UserInfoEnrichedAdapter enrichedAdapter = mapper.apply(dto); adapterList.add(enrichedAdapter); } return adapterList; } private <T> Set<String> extractOperatorId(List<UserInfoEnrichedAdapter> adapterList) { Set<String> operatorIdSet = new HashSet<>(); for (UserInfoEnrichedAdapter adapter : adapterList) { if (StringUtils.hasText(adapter.getFirstUserId())) { operatorIdSet.add(adapter.getFirstUserId()); } if (StringUtils.hasText(adapter.getSecondUserId())) { operatorIdSet.add(adapter.getSecondUserId()); } if (StringUtils.hasText(adapter.getThirdUserId())) { operatorIdSet.add(adapter.getThirdUserId()); } } return operatorIdSet; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.service; import com.ctrip.framework.apollo.portal.enricher.AdditionalUserInfoEnricher; import com.ctrip.framework.apollo.portal.enricher.adapter.UserInfoEnrichedAdapter; import com.ctrip.framework.apollo.portal.entity.bo.UserInfo; import com.ctrip.framework.apollo.portal.spi.UserService; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; /** * @author vdisk <vdisk@foxmail.com> */ @Service public class AdditionalUserInfoEnrichServiceImpl implements AdditionalUserInfoEnrichService { private final UserService userService; private final List<AdditionalUserInfoEnricher> enricherList; public AdditionalUserInfoEnrichServiceImpl( UserService userService, List<AdditionalUserInfoEnricher> enricherList) { this.userService = userService; this.enricherList = enricherList; } @Override public <T> void enrichAdditionalUserInfo(List<? extends T> list, Function<? super T, ? extends UserInfoEnrichedAdapter> mapper) { if (CollectionUtils.isEmpty(list)) { return; } if (CollectionUtils.isEmpty(this.enricherList)) { return; } List<UserInfoEnrichedAdapter> adapterList = this.adapt(list, mapper); if (CollectionUtils.isEmpty(adapterList)) { return; } Set<String> userIdSet = this.extractOperatorId(adapterList); if (CollectionUtils.isEmpty(userIdSet)) { return; } List<UserInfo> userInfoList = this.userService.findByUserIds(new ArrayList<>(userIdSet)); if (CollectionUtils.isEmpty(userInfoList)) { return; } Map<String, UserInfo> userInfoMap = userInfoList.stream() .collect(Collectors.toMap(UserInfo::getUserId, Function.identity())); for (UserInfoEnrichedAdapter adapter : adapterList) { for (AdditionalUserInfoEnricher enricher : this.enricherList) { enricher.enrichAdditionalUserInfo(adapter, userInfoMap); } } } private <T> List<UserInfoEnrichedAdapter> adapt(List<? extends T> dtoList, Function<? super T, ? extends UserInfoEnrichedAdapter> mapper) { List<UserInfoEnrichedAdapter> adapterList = new ArrayList<>(dtoList.size()); for (T dto : dtoList) { if (dto == null) { continue; } UserInfoEnrichedAdapter enrichedAdapter = mapper.apply(dto); adapterList.add(enrichedAdapter); } return adapterList; } private <T> Set<String> extractOperatorId(List<UserInfoEnrichedAdapter> adapterList) { Set<String> operatorIdSet = new HashSet<>(); for (UserInfoEnrichedAdapter adapter : adapterList) { if (StringUtils.hasText(adapter.getFirstUserId())) { operatorIdSet.add(adapter.getFirstUserId()); } if (StringUtils.hasText(adapter.getSecondUserId())) { operatorIdSet.add(adapter.getSecondUserId()); } if (StringUtils.hasText(adapter.getThirdUserId())) { operatorIdSet.add(adapter.getThirdUserId()); } } return operatorIdSet; } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client-config-data/src/main/java/com/ctrip/framework/apollo/config/data/importer/ApolloConfigDataLoaderInitializer.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.config.data.importer; import com.ctrip.framework.apollo.config.data.extension.initialize.ApolloClientExtensionInitializeFactory; import com.ctrip.framework.apollo.config.data.system.ApolloClientSystemPropertyInitializer; import com.ctrip.framework.apollo.config.data.util.Slf4jLogMessageFormatter; import com.ctrip.framework.apollo.core.utils.DeferredLogger; import com.ctrip.framework.apollo.spring.config.PropertySourcesConstants; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; import org.springframework.boot.ConfigurableBootstrapContext; import org.springframework.boot.context.properties.bind.BindHandler; import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.source.ConfigurationPropertyName; import org.springframework.core.env.MapPropertySource; import org.springframework.core.env.PropertySource; /** * @author vdisk <vdisk@foxmail.com> */ class ApolloConfigDataLoaderInitializer { private static volatile boolean INITIALIZED = false; private final Log log; private final Binder binder; private final BindHandler bindHandler; private final ConfigurableBootstrapContext bootstrapContext; public ApolloConfigDataLoaderInitializer(Log log, Binder binder, BindHandler bindHandler, ConfigurableBootstrapContext bootstrapContext) { this.log = log; this.binder = binder; this.bindHandler = bindHandler; this.bootstrapContext = bootstrapContext; } /** * init apollo client (only once) * * @return initial sources as placeholders or empty list if already initialized */ public List<PropertySource<?>> initApolloClient() { if (INITIALIZED) { return Collections.emptyList(); } synchronized (ApolloConfigDataLoaderInitializer.class) { if (INITIALIZED) { return Collections.emptyList(); } this.initApolloClientInternal(); INITIALIZED = true; if (this.forceDisableApolloBootstrap()) { // force disable apollo bootstrap to avoid conflict Map<String, Object> map = new HashMap<>(); map.put(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED, "false"); map.put(PropertySourcesConstants.APOLLO_BOOTSTRAP_EAGER_LOAD_ENABLED, "false"); // provide initial sources as placeholders to avoid duplicate loading return Arrays.asList( new ApolloConfigEmptyPropertySource( PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME), new MapPropertySource(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME, Collections.unmodifiableMap(map))); } // provide initial sources as placeholders to avoid duplicate loading return Arrays.asList( new ApolloConfigEmptyPropertySource(PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME), new ApolloConfigEmptyPropertySource( PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME)); } } private void initApolloClientInternal() { new ApolloClientSystemPropertyInitializer(this.log) .initializeSystemProperty(this.binder, this.bindHandler); new ApolloClientExtensionInitializeFactory(this.log, this.bootstrapContext).initializeExtension(this.binder, this.bindHandler); DeferredLogger.enable(); } private boolean forceDisableApolloBootstrap() { boolean bootstrapEnabled = this.binder .bind(this.camelCasedToKebabCase(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED), Bindable.of(Boolean.class), this.bindHandler) .orElse(false); if (bootstrapEnabled) { this.log.warn(Slf4jLogMessageFormatter.format( "apollo bootstrap is force disabled. please don't configure the property [{}=true] and [spring.config.import=apollo://...] at the same time", PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED)); return true; } boolean bootstrapEagerLoadEnabled = this.binder .bind(this.camelCasedToKebabCase( PropertySourcesConstants.APOLLO_BOOTSTRAP_EAGER_LOAD_ENABLED), Bindable.of(Boolean.class), this.bindHandler) .orElse(false); if (bootstrapEagerLoadEnabled) { this.log.warn(Slf4jLogMessageFormatter.format( "apollo bootstrap eager load is force disabled. please don't configure the property [{}=true] and [spring.config.import=apollo://...] at the same time", PropertySourcesConstants.APOLLO_BOOTSTRAP_EAGER_LOAD_ENABLED)); return true; } return false; } /** * {@link ConfigurationPropertyName#isValid(java.lang.CharSequence)} * * @param source origin propertyName * @return valid propertyName */ private String camelCasedToKebabCase(String source) { if (ConfigurationPropertyName.isValid(source)) { return source; } StringBuilder stringBuilder = new StringBuilder(source.length() * 2); for (char ch : source.toCharArray()) { if (Character.isUpperCase(ch)) { stringBuilder.append("-").append(Character.toLowerCase(ch)); continue; } stringBuilder.append(ch); } return stringBuilder.toString(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.config.data.importer; import com.ctrip.framework.apollo.config.data.extension.initialize.ApolloClientExtensionInitializeFactory; import com.ctrip.framework.apollo.config.data.system.ApolloClientSystemPropertyInitializer; import com.ctrip.framework.apollo.config.data.util.Slf4jLogMessageFormatter; import com.ctrip.framework.apollo.core.utils.DeferredLogger; import com.ctrip.framework.apollo.spring.config.PropertySourcesConstants; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; import org.springframework.boot.ConfigurableBootstrapContext; import org.springframework.boot.context.properties.bind.BindHandler; import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.source.ConfigurationPropertyName; import org.springframework.core.env.MapPropertySource; import org.springframework.core.env.PropertySource; /** * @author vdisk <vdisk@foxmail.com> */ class ApolloConfigDataLoaderInitializer { private static volatile boolean INITIALIZED = false; private final Log log; private final Binder binder; private final BindHandler bindHandler; private final ConfigurableBootstrapContext bootstrapContext; public ApolloConfigDataLoaderInitializer(Log log, Binder binder, BindHandler bindHandler, ConfigurableBootstrapContext bootstrapContext) { this.log = log; this.binder = binder; this.bindHandler = bindHandler; this.bootstrapContext = bootstrapContext; } /** * init apollo client (only once) * * @return initial sources as placeholders or empty list if already initialized */ public List<PropertySource<?>> initApolloClient() { if (INITIALIZED) { return Collections.emptyList(); } synchronized (ApolloConfigDataLoaderInitializer.class) { if (INITIALIZED) { return Collections.emptyList(); } this.initApolloClientInternal(); INITIALIZED = true; if (this.forceDisableApolloBootstrap()) { // force disable apollo bootstrap to avoid conflict Map<String, Object> map = new HashMap<>(); map.put(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED, "false"); map.put(PropertySourcesConstants.APOLLO_BOOTSTRAP_EAGER_LOAD_ENABLED, "false"); // provide initial sources as placeholders to avoid duplicate loading return Arrays.asList( new ApolloConfigEmptyPropertySource( PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME), new MapPropertySource(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME, Collections.unmodifiableMap(map))); } // provide initial sources as placeholders to avoid duplicate loading return Arrays.asList( new ApolloConfigEmptyPropertySource(PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME), new ApolloConfigEmptyPropertySource( PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME)); } } private void initApolloClientInternal() { new ApolloClientSystemPropertyInitializer(this.log) .initializeSystemProperty(this.binder, this.bindHandler); new ApolloClientExtensionInitializeFactory(this.log, this.bootstrapContext).initializeExtension(this.binder, this.bindHandler); DeferredLogger.enable(); } private boolean forceDisableApolloBootstrap() { boolean bootstrapEnabled = this.binder .bind(this.camelCasedToKebabCase(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED), Bindable.of(Boolean.class), this.bindHandler) .orElse(false); if (bootstrapEnabled) { this.log.warn(Slf4jLogMessageFormatter.format( "apollo bootstrap is force disabled. please don't configure the property [{}=true] and [spring.config.import=apollo://...] at the same time", PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED)); return true; } boolean bootstrapEagerLoadEnabled = this.binder .bind(this.camelCasedToKebabCase( PropertySourcesConstants.APOLLO_BOOTSTRAP_EAGER_LOAD_ENABLED), Bindable.of(Boolean.class), this.bindHandler) .orElse(false); if (bootstrapEagerLoadEnabled) { this.log.warn(Slf4jLogMessageFormatter.format( "apollo bootstrap eager load is force disabled. please don't configure the property [{}=true] and [spring.config.import=apollo://...] at the same time", PropertySourcesConstants.APOLLO_BOOTSTRAP_EAGER_LOAD_ENABLED)); return true; } return false; } /** * {@link ConfigurationPropertyName#isValid(java.lang.CharSequence)} * * @param source origin propertyName * @return valid propertyName */ private String camelCasedToKebabCase(String source) { if (ConfigurationPropertyName.isValid(source)) { return source; } StringBuilder stringBuilder = new StringBuilder(source.length() * 2); for (char ch : source.toCharArray()) { if (Character.isUpperCase(ch)) { stringBuilder.append("-").append(Character.toLowerCase(ch)); continue; } stringBuilder.append(ch); } return stringBuilder.toString(); } }
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/scripts/startup.sh
#!/bin/bash # # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # SERVICE_NAME=apollo-portal ## Adjust log dir if necessary LOG_DIR=/opt/logs/100003173 ## Adjust server port if necessary SERVER_PORT=${SERVER_PORT:=8070} ## Create log directory if not existed because JDK 8+ won't do that mkdir -p $LOG_DIR ## Adjust memory settings if necessary #export JAVA_OPTS="-Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=8" ## Only uncomment the following when you are using server jvm #export JAVA_OPTS="$JAVA_OPTS -server -XX:-ReduceInitialCardMarks" ########### The following is the same for configservice, adminservice, portal ########### export JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+DisableExplicitGC -XX:+ScavengeBeforeFullGC -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom" # DS_URL, DS_USERNAME, DS_PASSWORD are deprecated, please use SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD instead # DataSource URL USERNAME PASSWORD if [ "$DS_URL"x != x ] then export SPRING_DATASOURCE_URL=$DS_URL export SPRING_DATASOURCE_USERNAME=$DS_USERNAME export SPRING_DATASOURCE_PASSWORD=$DS_PASSWORD fi export JAVA_OPTS="$JAVA_OPTS -Dserver.port=$SERVER_PORT -Dlogging.file.name=$LOG_DIR/$SERVICE_NAME.log -XX:HeapDumpPath=$LOG_DIR/HeapDumpOnOutOfMemoryError/" export APP_NAME=$SERVICE_NAME PATH_TO_JAR=$SERVICE_NAME".jar" SERVER_URL="http://localhost:$SERVER_PORT" function checkPidAlive { for i in `ls -t $APP_NAME/$APP_NAME.pid 2>/dev/null` do read pid < $i result=$(ps -p "$pid") if [ "$?" -eq 0 ]; then return 0 else printf "\npid - $pid just quit unexpectedly, please check logs under $LOG_DIR and /tmp for more information!\n" exit 1; fi done printf "\nNo pid file found, startup may failed. Please check logs under $LOG_DIR and /tmp for more information!\n" exit 1; } if [ "$(uname)" == "Darwin" ]; then windows="0" elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then windows="0" elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then windows="1" else windows="0" fi # for Windows if [ "$windows" == "1" ] && [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then tmp_java_home=`cygpath -sw "$JAVA_HOME"` export JAVA_HOME=`cygpath -u $tmp_java_home` echo "Windows new JAVA_HOME is: $JAVA_HOME" fi # Find Java if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then javaexe="$JAVA_HOME/bin/java" elif type -p java > /dev/null 2>&1; then javaexe=$(type -p java) elif [[ -x "/usr/bin/java" ]]; then javaexe="/usr/bin/java" else echo "Unable to find Java" exit 1 fi if [[ "$javaexe" ]]; then version=$("$javaexe" -version 2>&1 | awk -F '"' '/version/ {print $2}') version=$(echo "$version" | awk -F. '{printf("%03d%03d",$1,$2);}') # now version is of format 009003 (9.3.x) if [ $version -ge 011000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" elif [ $version -ge 010000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" elif [ $version -ge 009000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" else JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC" JAVA_OPTS="$JAVA_OPTS -Xloggc:$LOG_DIR/gc.log -XX:+PrintGCDetails" JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=5M" fi fi cd `dirname $0`/.. for i in `ls $SERVICE_NAME-*.jar 2>/dev/null` do if [[ ! $i == *"-sources.jar" ]] then PATH_TO_JAR=$i break fi done if [[ ! -f PATH_TO_JAR && -d current ]]; then cd current for i in `ls $SERVICE_NAME-*.jar 2>/dev/null` do if [[ ! $i == *"-sources.jar" ]] then PATH_TO_JAR=$i break fi done fi # For Docker environment, start in foreground mode if [[ -n "$APOLLO_RUN_MODE" ]] && [[ "$APOLLO_RUN_MODE" == "Docker" ]]; then exec $javaexe -Dsun.misc.URLClassPath.disableJarChecking=true $JAVA_OPTS -jar $PATH_TO_JAR else if [[ -f $SERVICE_NAME".jar" ]]; then rm -rf $SERVICE_NAME".jar" fi printf "$(date) ==== Starting ==== \n" ln $PATH_TO_JAR $SERVICE_NAME".jar" chmod a+x $SERVICE_NAME".jar" ./$SERVICE_NAME".jar" start rc=$?; if [[ $rc != 0 ]]; then echo "$(date) Failed to start $SERVICE_NAME.jar, return code: $rc" exit $rc; fi declare -i counter=0 declare -i max_counter=48 # 48*5=240s declare -i total_time=0 printf "Waiting for server startup" until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "HTTP")" != "" ]]; do printf "." counter+=1 sleep 5 checkPidAlive done total_time=counter*5 if [[ (( counter -ge max_counter )) ]]; then printf "\n$(date) Server failed to start in $total_time seconds!\n" exit 1; fi printf "\n$(date) Server started in $total_time seconds!\n" exit 0; fi
#!/bin/bash # # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # SERVICE_NAME=apollo-portal ## Adjust log dir if necessary LOG_DIR=/opt/logs/100003173 ## Adjust server port if necessary SERVER_PORT=${SERVER_PORT:=8070} ## Create log directory if not existed because JDK 8+ won't do that mkdir -p $LOG_DIR ## Adjust memory settings if necessary #export JAVA_OPTS="-Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=8" ## Only uncomment the following when you are using server jvm #export JAVA_OPTS="$JAVA_OPTS -server -XX:-ReduceInitialCardMarks" ########### The following is the same for configservice, adminservice, portal ########### export JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+DisableExplicitGC -XX:+ScavengeBeforeFullGC -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom" # DS_URL, DS_USERNAME, DS_PASSWORD are deprecated, please use SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD instead # DataSource URL USERNAME PASSWORD if [ "$DS_URL"x != x ] then export SPRING_DATASOURCE_URL=$DS_URL export SPRING_DATASOURCE_USERNAME=$DS_USERNAME export SPRING_DATASOURCE_PASSWORD=$DS_PASSWORD fi export JAVA_OPTS="$JAVA_OPTS -Dserver.port=$SERVER_PORT -Dlogging.file.name=$LOG_DIR/$SERVICE_NAME.log -XX:HeapDumpPath=$LOG_DIR/HeapDumpOnOutOfMemoryError/" export APP_NAME=$SERVICE_NAME PATH_TO_JAR=$SERVICE_NAME".jar" SERVER_URL="http://localhost:$SERVER_PORT" function checkPidAlive { for i in `ls -t $APP_NAME/$APP_NAME.pid 2>/dev/null` do read pid < $i result=$(ps -p "$pid") if [ "$?" -eq 0 ]; then return 0 else printf "\npid - $pid just quit unexpectedly, please check logs under $LOG_DIR and /tmp for more information!\n" exit 1; fi done printf "\nNo pid file found, startup may failed. Please check logs under $LOG_DIR and /tmp for more information!\n" exit 1; } if [ "$(uname)" == "Darwin" ]; then windows="0" elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then windows="0" elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then windows="1" else windows="0" fi # for Windows if [ "$windows" == "1" ] && [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then tmp_java_home=`cygpath -sw "$JAVA_HOME"` export JAVA_HOME=`cygpath -u $tmp_java_home` echo "Windows new JAVA_HOME is: $JAVA_HOME" fi # Find Java if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then javaexe="$JAVA_HOME/bin/java" elif type -p java > /dev/null 2>&1; then javaexe=$(type -p java) elif [[ -x "/usr/bin/java" ]]; then javaexe="/usr/bin/java" else echo "Unable to find Java" exit 1 fi if [[ "$javaexe" ]]; then version=$("$javaexe" -version 2>&1 | awk -F '"' '/version/ {print $2}') version=$(echo "$version" | awk -F. '{printf("%03d%03d",$1,$2);}') # now version is of format 009003 (9.3.x) if [ $version -ge 011000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" elif [ $version -ge 010000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" elif [ $version -ge 009000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" else JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC" JAVA_OPTS="$JAVA_OPTS -Xloggc:$LOG_DIR/gc.log -XX:+PrintGCDetails" JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=5M" fi fi cd `dirname $0`/.. for i in `ls $SERVICE_NAME-*.jar 2>/dev/null` do if [[ ! $i == *"-sources.jar" ]] then PATH_TO_JAR=$i break fi done if [[ ! -f PATH_TO_JAR && -d current ]]; then cd current for i in `ls $SERVICE_NAME-*.jar 2>/dev/null` do if [[ ! $i == *"-sources.jar" ]] then PATH_TO_JAR=$i break fi done fi # For Docker environment, start in foreground mode if [[ -n "$APOLLO_RUN_MODE" ]] && [[ "$APOLLO_RUN_MODE" == "Docker" ]]; then exec $javaexe -Dsun.misc.URLClassPath.disableJarChecking=true $JAVA_OPTS -jar $PATH_TO_JAR else if [[ -f $SERVICE_NAME".jar" ]]; then rm -rf $SERVICE_NAME".jar" fi printf "$(date) ==== Starting ==== \n" ln $PATH_TO_JAR $SERVICE_NAME".jar" chmod a+x $SERVICE_NAME".jar" ./$SERVICE_NAME".jar" start rc=$?; if [[ $rc != 0 ]]; then echo "$(date) Failed to start $SERVICE_NAME.jar, return code: $rc" exit $rc; fi declare -i counter=0 declare -i max_counter=48 # 48*5=240s declare -i total_time=0 printf "Waiting for server startup" until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "HTTP")" != "" ]]; do printf "." counter+=1 sleep 5 checkPidAlive done total_time=counter*5 if [[ (( counter -ge max_counter )) ]]; then printf "\n$(date) Server failed to start in $total_time seconds!\n" exit 1; fi printf "\n$(date) Server started in $total_time seconds!\n" exit 0; fi
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/static/scripts/services/SystemInfoService.js
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ appService.service('SystemInfoService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) { var system_info_resource = $resource('', {}, { load_system_info: { method: 'GET', url: AppUtil.prefixPath() + '/system-info' }, check_health: { method: 'GET', url: AppUtil.prefixPath() + '/system-info/health' } }); return { load_system_info: function () { var d = $q.defer(); system_info_resource.load_system_info({}, function (result) { d.resolve(result); }, function (result) { d.reject(result); }); return d.promise; }, check_health: function (instanceId, host) { var d = $q.defer(); system_info_resource.check_health({ instanceId: instanceId }, function (result) { d.resolve(result); }, function (result) { d.reject(result); }); return d.promise; } } }]);
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ appService.service('SystemInfoService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) { var system_info_resource = $resource('', {}, { load_system_info: { method: 'GET', url: AppUtil.prefixPath() + '/system-info' }, check_health: { method: 'GET', url: AppUtil.prefixPath() + '/system-info/health' } }); return { load_system_info: function () { var d = $q.defer(); system_info_resource.load_system_info({}, function (result) { d.resolve(result); }, function (result) { d.reject(result); }); return d.promise; }, check_health: function (instanceId, host) { var d = $q.defer(); system_info_resource.check_health({ instanceId: instanceId }, function (result) { d.resolve(result); }, function (result) { d.reject(result); }); return d.promise; } } }]);
-1
apolloconfig/apollo
3,869
make jdbc session enable default
## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-08-04T12:59:14Z
2021-08-05T07:36:48Z
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
7afe23bf9aa2630f902c4cd377d327f6beb95679
make jdbc session enable default. ## What's the purpose of this PR make jdbc session enable default Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/static/img/change.png
PNG  IHDRXIDATx^]Vǫs+2,DWYA`VV` /-<u#MtuO_OG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hfʋ?}TUdSROw="'}l‘_!@ //>(2mVL~=| E|0HѶB<SP*8DSLyZQ5{_y ?ťN_|z2 ۻ}!yJ+)kmV$n DS5F=cM񇱑*2HS']Kr6j+)qIw‡]3Jeʧ\MN*hј_ߢne걼N^.@48o\זtF#oIvW.Q{*U (yAlbL2҂$ݵEծIh W*=s¢PMdkyPS(WIr֪ݡB^>1n,_!ಽfvjY o?yMM WMyJP{jY/rn*:>@3jXDcJ} Ҥ'g Qb̹mD8ebBuba`ނh3_J q8&1k۝uXaӒr=[EoA Di,3Ca*2 =Hl @*b!O@AJ b" ,N@RN?jEE F!4 B(Rg3-+Ub^0wZ5sU B ƣmaƾ e2?vzU8yr^M VEƿ'J@HNE1-!U`=$^-U7N*#@+[w{ҏ|GrbbJK}@Z3Us]s9=[OZ$ lA]NC>z v%"[锏u#s>>hYLv܋F f&Ie $It]L&z3 $TwydQ1$tL|5UQ7dba-:\H,\6!xPǤR|oM6GӳwxA hcrYQ>`Q\V$g }d $+B)SU"E?@ yܬmU|>)DOsxeJcb6 Ђ F @=͞aćfO0ЇCi'dbC񡇴@w1 !C @ ٻ@|!m ] }@ >6{H.> zH=${@=͞aćfO0ЇCi'dbC񡇴@w1 !&"# IENDB`
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./CHANGES.md
Changes by Version ================== Release Notes. Apollo 1.9.0 ------------------ * [extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.](https://github.com/ctripcorp/apollo/pull/3552) * [add spring configuration metadata](https://github.com/ctripcorp/apollo/pull/3553) * [fix #3551 and optimize ldap samples ](https://github.com/ctripcorp/apollo/pull/3561) * [update wiki url and refine documentation](https://github.com/ctripcorp/apollo/pull/3563) * [slim docker images](https://github.com/ctripcorp/apollo/pull/3572) * [add network strategy guideline to docker quick start](https://github.com/ctripcorp/apollo/pull/3574) * [Added support for consul service discovery](https://github.com/ctripcorp/apollo/pull/3575) * [disable consul in apollo-assembly by default ](https://github.com/ctripcorp/apollo/pull/3585) * [ServiceBootstrap unit test fix](https://github.com/ctripcorp/apollo/pull/3593) * [replace http client implementation with interface ](https://github.com/ctripcorp/apollo/pull/3594) * [Allow users to inject customized instance via ApolloInjectorCustomizer](https://github.com/ctripcorp/apollo/pull/3602) * [Fixes #3606](https://github.com/ctripcorp/apollo/pull/3609) * [Bump xstream from 1.4.15 to 1.4.16](https://github.com/ctripcorp/apollo/pull/3611) * [docs: user practices. Alibaba Sentinel Dashboard Push Rules to apollo](https://github.com/ctripcorp/apollo/pull/3617) * [update known users](https://github.com/ctripcorp/apollo/pull/3619) * [add maven deploy action](https://github.com/ctripcorp/apollo/pull/3620) * [fix the issue that access key doesn't work if appid passed is in different case](https://github.com/ctripcorp/apollo/pull/3627) * [fix oidc logout](https://github.com/ctripcorp/apollo/pull/3628) * [docs: third party sdk nodejs client](https://github.com/ctripcorp/apollo/pull/3632) * [update known users](https://github.com/ctripcorp/apollo/pull/3633) * [docs: use docsify pagination plugin](https://github.com/ctripcorp/apollo/pull/3634) * [apollo client to support jdk16](https://github.com/ctripcorp/apollo/pull/3646) * [add English version of readme](https://github.com/ctripcorp/apollo/pull/3656) * [update known users](https://github.com/ctripcorp/apollo/pull/3657) * [update apolloconfig.com domain](https://github.com/ctripcorp/apollo/pull/3658) * [localize css to speed up the loading of google fonts](https://github.com/ctripcorp/apollo/pull/3660) * [test(apollo-client): use assertEquals instead of assertThat](https://github.com/ctripcorp/apollo/pull/3667) * [test(apollo-client): make timeout more longer when long poll](https://github.com/ctripcorp/apollo/pull/3668) * [fix unit test](https://github.com/ctripcorp/apollo/pull/3669) * [解决日志系统未初始化完成时,apollo 的加载日志没法输出问题](https://github.com/ctripcorp/apollo/pull/3677) * [fix[apollo-configService]: Solve configService startup exception](https://github.com/ctripcorp/apollo/pull/3679) * [Community Governance Proposal](https://github.com/ctripcorp/apollo/pull/3670) * [增加阿波罗client的php库](https://github.com/ctripcorp/apollo/pull/3682) * [Bump xstream from 1.4.16 to 1.4.17](https://github.com/ctripcorp/apollo/pull/3692) * [Improve the nacos registry configuration document](https://github.com/ctripcorp/apollo/pull/3695) * [Remove redundant invoke of trySyncFromUpstream](https://github.com/ctripcorp/apollo/pull/3699) * [add apollo team introduction and community releated contents](https://github.com/ctripcorp/apollo/pull/3713) * [fix oidc sql](https://github.com/ctripcorp/apollo/pull/3720) * [feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent](https://github.com/ctripcorp/apollo/pull/3666) * [add More... link for known users](https://github.com/ctripcorp/apollo/pull/3757) * [update OIDC documentation](https://github.com/ctripcorp/apollo/pull/3766) * [Improve the item-value length limit configuration document](https://github.com/ctripcorp/apollo/pull/3789) * [Use queue#take instead of poll](https://github.com/ctripcorp/apollo/pull/3765) * [feature: add Spring Boot 2.4 config data loader support](https://github.com/ctripcorp/apollo/pull/3754) * [feat(open-api): get authorized apps](https://github.com/ctripcorp/apollo/pull/3647) * [feature: shared session for multi apollo portal](https://github.com/ctripcorp/apollo/pull/3786) * [feature: add email for select user on apollo portal](https://github.com/ctripcorp/apollo/pull/3797) * [feature: modify item comment valid size](https://github.com/ctripcorp/apollo/pull/3803) * [set default session store-type](https://github.com/ctripcorp/apollo/pull/3812) * [speed up the stale issue mark and close phase](https://github.com/ctripcorp/apollo/pull/3808) * [feature: add the delegating password encoder for apollo-portal simple auth](https://github.com/ctripcorp/apollo/pull/3804) * [support release apollo-client-config-data](https://github.com/ctripcorp/apollo/pull/3822) * [Fix possiable NPE](https://github.com/ctripcorp/apollo/pull/3832) * [Reduce bootstrap time in the situation with large properties](https://github.com/ctripcorp/apollo/pull/3816) * [docs: English catalog in sidebar](https://github.com/ctripcorp/apollo/pull/3831) * [fix the issue that release messages might be missed in certain scenarios](https://github.com/ctripcorp/apollo/pull/3819) * [use official docker images for manual kubernetes deployment](https://github.com/ctripcorp/apollo/pull/3840) * [fix size of create project button](https://github.com/ctripcorp/apollo/pull/3849) * [translation of "portal-how-to-enable-webhook-notification.md"](https://github.com/ctripcorp/apollo/pull/3847) * [feature: add history detail for not key-value type of namespace](https://github.com/ctripcorp/apollo/pull/3856) * [fix show-text-modal number display](https://github.com/ctripcorp/apollo/pull/3851) ------------------ All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)
Changes by Version ================== Release Notes. Apollo 1.9.0 ------------------ * [extend DataChange_CreatedBy, DataChange_LastModifiedBy from 32 to 64.](https://github.com/ctripcorp/apollo/pull/3552) * [add spring configuration metadata](https://github.com/ctripcorp/apollo/pull/3553) * [fix #3551 and optimize ldap samples ](https://github.com/ctripcorp/apollo/pull/3561) * [update wiki url and refine documentation](https://github.com/ctripcorp/apollo/pull/3563) * [slim docker images](https://github.com/ctripcorp/apollo/pull/3572) * [add network strategy guideline to docker quick start](https://github.com/ctripcorp/apollo/pull/3574) * [Added support for consul service discovery](https://github.com/ctripcorp/apollo/pull/3575) * [disable consul in apollo-assembly by default ](https://github.com/ctripcorp/apollo/pull/3585) * [ServiceBootstrap unit test fix](https://github.com/ctripcorp/apollo/pull/3593) * [replace http client implementation with interface ](https://github.com/ctripcorp/apollo/pull/3594) * [Allow users to inject customized instance via ApolloInjectorCustomizer](https://github.com/ctripcorp/apollo/pull/3602) * [Fixes #3606](https://github.com/ctripcorp/apollo/pull/3609) * [Bump xstream from 1.4.15 to 1.4.16](https://github.com/ctripcorp/apollo/pull/3611) * [docs: user practices. Alibaba Sentinel Dashboard Push Rules to apollo](https://github.com/ctripcorp/apollo/pull/3617) * [update known users](https://github.com/ctripcorp/apollo/pull/3619) * [add maven deploy action](https://github.com/ctripcorp/apollo/pull/3620) * [fix the issue that access key doesn't work if appid passed is in different case](https://github.com/ctripcorp/apollo/pull/3627) * [fix oidc logout](https://github.com/ctripcorp/apollo/pull/3628) * [docs: third party sdk nodejs client](https://github.com/ctripcorp/apollo/pull/3632) * [update known users](https://github.com/ctripcorp/apollo/pull/3633) * [docs: use docsify pagination plugin](https://github.com/ctripcorp/apollo/pull/3634) * [apollo client to support jdk16](https://github.com/ctripcorp/apollo/pull/3646) * [add English version of readme](https://github.com/ctripcorp/apollo/pull/3656) * [update known users](https://github.com/ctripcorp/apollo/pull/3657) * [update apolloconfig.com domain](https://github.com/ctripcorp/apollo/pull/3658) * [localize css to speed up the loading of google fonts](https://github.com/ctripcorp/apollo/pull/3660) * [test(apollo-client): use assertEquals instead of assertThat](https://github.com/ctripcorp/apollo/pull/3667) * [test(apollo-client): make timeout more longer when long poll](https://github.com/ctripcorp/apollo/pull/3668) * [fix unit test](https://github.com/ctripcorp/apollo/pull/3669) * [解决日志系统未初始化完成时,apollo 的加载日志没法输出问题](https://github.com/ctripcorp/apollo/pull/3677) * [fix[apollo-configService]: Solve configService startup exception](https://github.com/ctripcorp/apollo/pull/3679) * [Community Governance Proposal](https://github.com/ctripcorp/apollo/pull/3670) * [增加阿波罗client的php库](https://github.com/ctripcorp/apollo/pull/3682) * [Bump xstream from 1.4.16 to 1.4.17](https://github.com/ctripcorp/apollo/pull/3692) * [Improve the nacos registry configuration document](https://github.com/ctripcorp/apollo/pull/3695) * [Remove redundant invoke of trySyncFromUpstream](https://github.com/ctripcorp/apollo/pull/3699) * [add apollo team introduction and community releated contents](https://github.com/ctripcorp/apollo/pull/3713) * [fix oidc sql](https://github.com/ctripcorp/apollo/pull/3720) * [feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent](https://github.com/ctripcorp/apollo/pull/3666) * [add More... link for known users](https://github.com/ctripcorp/apollo/pull/3757) * [update OIDC documentation](https://github.com/ctripcorp/apollo/pull/3766) * [Improve the item-value length limit configuration document](https://github.com/ctripcorp/apollo/pull/3789) * [Use queue#take instead of poll](https://github.com/ctripcorp/apollo/pull/3765) * [feature: add Spring Boot 2.4 config data loader support](https://github.com/ctripcorp/apollo/pull/3754) * [feat(open-api): get authorized apps](https://github.com/ctripcorp/apollo/pull/3647) * [feature: shared session for multi apollo portal](https://github.com/ctripcorp/apollo/pull/3786) * [feature: add email for select user on apollo portal](https://github.com/ctripcorp/apollo/pull/3797) * [feature: modify item comment valid size](https://github.com/ctripcorp/apollo/pull/3803) * [set default session store-type](https://github.com/ctripcorp/apollo/pull/3812) * [speed up the stale issue mark and close phase](https://github.com/ctripcorp/apollo/pull/3808) * [feature: add the delegating password encoder for apollo-portal simple auth](https://github.com/ctripcorp/apollo/pull/3804) * [support release apollo-client-config-data](https://github.com/ctripcorp/apollo/pull/3822) * [Fix possiable NPE](https://github.com/ctripcorp/apollo/pull/3832) * [Reduce bootstrap time in the situation with large properties](https://github.com/ctripcorp/apollo/pull/3816) * [docs: English catalog in sidebar](https://github.com/ctripcorp/apollo/pull/3831) * [fix the issue that release messages might be missed in certain scenarios](https://github.com/ctripcorp/apollo/pull/3819) * [use official docker images for manual kubernetes deployment](https://github.com/ctripcorp/apollo/pull/3840) * [fix size of create project button](https://github.com/ctripcorp/apollo/pull/3849) * [translation of "portal-how-to-enable-webhook-notification.md"](https://github.com/ctripcorp/apollo/pull/3847) * [feature: add history detail for not key-value type of namespace](https://github.com/ctripcorp/apollo/pull/3856) * [fix show-text-modal number display](https://github.com/ctripcorp/apollo/pull/3851) * [Lazy load ConfigUtil](https://github.com/ctripcorp/apollo/pull/3864) ------------------ All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)
1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.spring.boot; import com.ctrip.framework.apollo.Config; import com.ctrip.framework.apollo.ConfigService; import com.ctrip.framework.apollo.build.ApolloInjector; import com.ctrip.framework.apollo.core.ApolloClientSystemConsts; import com.ctrip.framework.apollo.core.ConfigConsts; import com.ctrip.framework.apollo.core.utils.DeferredLogger; import com.ctrip.framework.apollo.spring.config.CachedCompositePropertySource; import com.ctrip.framework.apollo.spring.config.ConfigPropertySourceFactory; import com.ctrip.framework.apollo.spring.config.PropertySourcesConstants; import com.ctrip.framework.apollo.spring.util.SpringInjector; import com.ctrip.framework.apollo.util.ConfigUtil; import com.google.common.base.Splitter; import com.google.common.base.Strings; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.env.EnvironmentPostProcessor; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.Ordered; import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.ConfigurableEnvironment; /** * Initialize apollo system properties and inject the Apollo config in Spring Boot bootstrap phase * * <p>Configuration example:</p> * <pre class="code"> * # set app.id * app.id = 100004458 * # enable apollo bootstrap config and inject 'application' namespace in bootstrap phase * apollo.bootstrap.enabled = true * </pre> * * or * * <pre class="code"> * # set app.id * app.id = 100004458 * # enable apollo bootstrap config * apollo.bootstrap.enabled = true * # will inject 'application' and 'FX.apollo' namespaces in bootstrap phase * apollo.bootstrap.namespaces = application,FX.apollo * </pre> * * * If you want to load Apollo configurations even before Logging System Initialization Phase, * add * <pre class="code"> * # set apollo.bootstrap.eagerLoad.enabled * apollo.bootstrap.eagerLoad.enabled = true * </pre> * * This would be very helpful when your logging configurations is set by Apollo. * * for example, you have defined logback-spring.xml in your project, and you want to inject some attributes into logback-spring.xml. * */ public class ApolloApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> , EnvironmentPostProcessor, Ordered { public static final int DEFAULT_ORDER = 0; private static final Logger logger = LoggerFactory.getLogger(ApolloApplicationContextInitializer.class); private static final Splitter NAMESPACE_SPLITTER = Splitter.on(",").omitEmptyStrings() .trimResults(); public static final String[] APOLLO_SYSTEM_PROPERTIES = {ApolloClientSystemConsts.APP_ID, ApolloClientSystemConsts.APOLLO_CLUSTER, ApolloClientSystemConsts.APOLLO_CACHE_DIR, ApolloClientSystemConsts.APOLLO_ACCESS_KEY_SECRET, ApolloClientSystemConsts.APOLLO_META, ApolloClientSystemConsts.APOLLO_CONFIG_SERVICE, ApolloClientSystemConsts.APOLLO_PROPERTY_ORDER_ENABLE, ApolloClientSystemConsts.APOLLO_PROPERTY_NAMES_CACHE_ENABLE}; private final ConfigPropertySourceFactory configPropertySourceFactory = SpringInjector .getInstance(ConfigPropertySourceFactory.class); private final ConfigUtil configUtil = ApolloInjector.getInstance(ConfigUtil.class); private int order = DEFAULT_ORDER; @Override public void initialize(ConfigurableApplicationContext context) { ConfigurableEnvironment environment = context.getEnvironment(); if (!environment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED, Boolean.class, false)) { logger.debug("Apollo bootstrap config is not enabled for context {}, see property: ${{}}", context, PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED); return; } logger.debug("Apollo bootstrap config is enabled for context {}", context); initialize(environment); } /** * Initialize Apollo Configurations Just after environment is ready. * * @param environment */ protected void initialize(ConfigurableEnvironment environment) { if (environment.getPropertySources().contains(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME)) { //already initialized, replay the logs that were printed before the logging system was initialized DeferredLogger.replayTo(); return; } String namespaces = environment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_NAMESPACES, ConfigConsts.NAMESPACE_APPLICATION); logger.debug("Apollo bootstrap namespaces: {}", namespaces); List<String> namespaceList = NAMESPACE_SPLITTER.splitToList(namespaces); CompositePropertySource composite; if (configUtil.isPropertyNamesCacheEnabled()) { composite = new CachedCompositePropertySource(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME); } else { composite = new CompositePropertySource(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME); } for (String namespace : namespaceList) { Config config = ConfigService.getConfig(namespace); composite.addPropertySource(configPropertySourceFactory.getConfigPropertySource(namespace, config)); } environment.getPropertySources().addFirst(composite); } /** * To fill system properties from environment config */ void initializeSystemProperty(ConfigurableEnvironment environment) { for (String propertyName : APOLLO_SYSTEM_PROPERTIES) { fillSystemPropertyFromEnvironment(environment, propertyName); } } private void fillSystemPropertyFromEnvironment(ConfigurableEnvironment environment, String propertyName) { if (System.getProperty(propertyName) != null) { return; } String propertyValue = environment.getProperty(propertyName); if (Strings.isNullOrEmpty(propertyValue)) { return; } System.setProperty(propertyName, propertyValue); } /** * * In order to load Apollo configurations as early as even before Spring loading logging system phase, * this EnvironmentPostProcessor can be called Just After ConfigFileApplicationListener has succeeded. * * <br /> * The processing sequence would be like this: <br /> * Load Bootstrap properties and application properties -----> load Apollo configuration properties ----> Initialize Logging systems * * @param configurableEnvironment * @param springApplication */ @Override public void postProcessEnvironment(ConfigurableEnvironment configurableEnvironment, SpringApplication springApplication) { // should always initialize system properties like app.id in the first place initializeSystemProperty(configurableEnvironment); Boolean eagerLoadEnabled = configurableEnvironment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_EAGER_LOAD_ENABLED, Boolean.class, false); //EnvironmentPostProcessor should not be triggered if you don't want Apollo Loading before Logging System Initialization if (!eagerLoadEnabled) { return; } Boolean bootstrapEnabled = configurableEnvironment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED, Boolean.class, false); if (bootstrapEnabled) { DeferredLogger.enable(); initialize(configurableEnvironment); } } /** * @since 1.3.0 */ @Override public int getOrder() { return order; } /** * @since 1.3.0 */ public void setOrder(int order) { this.order = order; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.spring.boot; import com.ctrip.framework.apollo.Config; import com.ctrip.framework.apollo.ConfigService; import com.ctrip.framework.apollo.build.ApolloInjector; import com.ctrip.framework.apollo.core.ApolloClientSystemConsts; import com.ctrip.framework.apollo.core.ConfigConsts; import com.ctrip.framework.apollo.core.utils.DeferredLogger; import com.ctrip.framework.apollo.spring.config.CachedCompositePropertySource; import com.ctrip.framework.apollo.spring.config.ConfigPropertySourceFactory; import com.ctrip.framework.apollo.spring.config.PropertySourcesConstants; import com.ctrip.framework.apollo.spring.util.SpringInjector; import com.ctrip.framework.apollo.util.ConfigUtil; import com.google.common.base.Splitter; import com.google.common.base.Strings; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.env.EnvironmentPostProcessor; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.Ordered; import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.ConfigurableEnvironment; /** * Initialize apollo system properties and inject the Apollo config in Spring Boot bootstrap phase * * <p>Configuration example:</p> * <pre class="code"> * # set app.id * app.id = 100004458 * # enable apollo bootstrap config and inject 'application' namespace in bootstrap phase * apollo.bootstrap.enabled = true * </pre> * * or * * <pre class="code"> * # set app.id * app.id = 100004458 * # enable apollo bootstrap config * apollo.bootstrap.enabled = true * # will inject 'application' and 'FX.apollo' namespaces in bootstrap phase * apollo.bootstrap.namespaces = application,FX.apollo * </pre> * * * If you want to load Apollo configurations even before Logging System Initialization Phase, * add * <pre class="code"> * # set apollo.bootstrap.eagerLoad.enabled * apollo.bootstrap.eagerLoad.enabled = true * </pre> * * This would be very helpful when your logging configurations is set by Apollo. * * for example, you have defined logback-spring.xml in your project, and you want to inject some attributes into logback-spring.xml. * */ public class ApolloApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> , EnvironmentPostProcessor, Ordered { public static final int DEFAULT_ORDER = 0; private static final Logger logger = LoggerFactory.getLogger(ApolloApplicationContextInitializer.class); private static final Splitter NAMESPACE_SPLITTER = Splitter.on(",").omitEmptyStrings() .trimResults(); public static final String[] APOLLO_SYSTEM_PROPERTIES = {ApolloClientSystemConsts.APP_ID, ApolloClientSystemConsts.APOLLO_CLUSTER, ApolloClientSystemConsts.APOLLO_CACHE_DIR, ApolloClientSystemConsts.APOLLO_ACCESS_KEY_SECRET, ApolloClientSystemConsts.APOLLO_META, ApolloClientSystemConsts.APOLLO_CONFIG_SERVICE, ApolloClientSystemConsts.APOLLO_PROPERTY_ORDER_ENABLE, ApolloClientSystemConsts.APOLLO_PROPERTY_NAMES_CACHE_ENABLE}; private final ConfigPropertySourceFactory configPropertySourceFactory = SpringInjector .getInstance(ConfigPropertySourceFactory.class); private int order = DEFAULT_ORDER; @Override public void initialize(ConfigurableApplicationContext context) { ConfigurableEnvironment environment = context.getEnvironment(); if (!environment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED, Boolean.class, false)) { logger.debug("Apollo bootstrap config is not enabled for context {}, see property: ${{}}", context, PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED); return; } logger.debug("Apollo bootstrap config is enabled for context {}", context); initialize(environment); } /** * Initialize Apollo Configurations Just after environment is ready. * * @param environment */ protected void initialize(ConfigurableEnvironment environment) { if (environment.getPropertySources().contains(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME)) { //already initialized, replay the logs that were printed before the logging system was initialized DeferredLogger.replayTo(); return; } String namespaces = environment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_NAMESPACES, ConfigConsts.NAMESPACE_APPLICATION); logger.debug("Apollo bootstrap namespaces: {}", namespaces); List<String> namespaceList = NAMESPACE_SPLITTER.splitToList(namespaces); CompositePropertySource composite; final ConfigUtil configUtil = ApolloInjector.getInstance(ConfigUtil.class); if (configUtil.isPropertyNamesCacheEnabled()) { composite = new CachedCompositePropertySource(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME); } else { composite = new CompositePropertySource(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME); } for (String namespace : namespaceList) { Config config = ConfigService.getConfig(namespace); composite.addPropertySource(configPropertySourceFactory.getConfigPropertySource(namespace, config)); } environment.getPropertySources().addFirst(composite); } /** * To fill system properties from environment config */ void initializeSystemProperty(ConfigurableEnvironment environment) { for (String propertyName : APOLLO_SYSTEM_PROPERTIES) { fillSystemPropertyFromEnvironment(environment, propertyName); } } private void fillSystemPropertyFromEnvironment(ConfigurableEnvironment environment, String propertyName) { if (System.getProperty(propertyName) != null) { return; } String propertyValue = environment.getProperty(propertyName); if (Strings.isNullOrEmpty(propertyValue)) { return; } System.setProperty(propertyName, propertyValue); } /** * * In order to load Apollo configurations as early as even before Spring loading logging system phase, * this EnvironmentPostProcessor can be called Just After ConfigFileApplicationListener has succeeded. * * <br /> * The processing sequence would be like this: <br /> * Load Bootstrap properties and application properties -----> load Apollo configuration properties ----> Initialize Logging systems * * @param configurableEnvironment * @param springApplication */ @Override public void postProcessEnvironment(ConfigurableEnvironment configurableEnvironment, SpringApplication springApplication) { // should always initialize system properties like app.id in the first place initializeSystemProperty(configurableEnvironment); Boolean eagerLoadEnabled = configurableEnvironment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_EAGER_LOAD_ENABLED, Boolean.class, false); //EnvironmentPostProcessor should not be triggered if you don't want Apollo Loading before Logging System Initialization if (!eagerLoadEnabled) { return; } Boolean bootstrapEnabled = configurableEnvironment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED, Boolean.class, false); if (bootstrapEnabled) { DeferredLogger.enable(); initialize(configurableEnvironment); } } /** * @since 1.3.0 */ @Override public int getOrder() { return order; } /** * @since 1.3.0 */ public void setOrder(int order) { this.order = order; } }
1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.spring.config; import com.ctrip.framework.apollo.build.ApolloInjector; import com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener; import com.ctrip.framework.apollo.spring.util.SpringInjector; import com.ctrip.framework.apollo.util.ConfigUtil; import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.LinkedHashMultimap; import com.google.common.collect.Multimap; import com.ctrip.framework.apollo.Config; import com.ctrip.framework.apollo.ConfigService; import com.google.common.collect.Sets; import java.util.List; import java.util.Set; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.EnvironmentAware; import org.springframework.core.Ordered; import org.springframework.core.PriorityOrdered; import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; import java.util.Collection; import java.util.Iterator; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; /** * Apollo Property Sources processor for Spring Annotation Based Application. <br /> <br /> * * The reason why PropertySourcesProcessor implements {@link BeanFactoryPostProcessor} instead of * {@link org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor} is that lower versions of * Spring (e.g. 3.1.1) doesn't support registering BeanDefinitionRegistryPostProcessor in ImportBeanDefinitionRegistrar * - {@link com.ctrip.framework.apollo.spring.annotation.ApolloConfigRegistrar} * * @author Jason Song(song_s@ctrip.com) */ public class PropertySourcesProcessor implements BeanFactoryPostProcessor, EnvironmentAware, PriorityOrdered { private static final Multimap<Integer, String> NAMESPACE_NAMES = LinkedHashMultimap.create(); private static final Set<BeanFactory> AUTO_UPDATE_INITIALIZED_BEAN_FACTORIES = Sets.newConcurrentHashSet(); private final ConfigPropertySourceFactory configPropertySourceFactory = SpringInjector .getInstance(ConfigPropertySourceFactory.class); private final ConfigUtil configUtil = ApolloInjector.getInstance(ConfigUtil.class); private ConfigurableEnvironment environment; public static boolean addNamespaces(Collection<String> namespaces, int order) { return NAMESPACE_NAMES.putAll(order, namespaces); } @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { initializePropertySources(); initializeAutoUpdatePropertiesFeature(beanFactory); } private void initializePropertySources() { if (environment.getPropertySources().contains(PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME)) { //already initialized return; } CompositePropertySource composite; if (configUtil.isPropertyNamesCacheEnabled()) { composite = new CachedCompositePropertySource(PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME); } else { composite = new CompositePropertySource(PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME); } //sort by order asc ImmutableSortedSet<Integer> orders = ImmutableSortedSet.copyOf(NAMESPACE_NAMES.keySet()); Iterator<Integer> iterator = orders.iterator(); while (iterator.hasNext()) { int order = iterator.next(); for (String namespace : NAMESPACE_NAMES.get(order)) { Config config = ConfigService.getConfig(namespace); composite.addPropertySource(configPropertySourceFactory.getConfigPropertySource(namespace, config)); } } // clean up NAMESPACE_NAMES.clear(); // add after the bootstrap property source or to the first if (environment.getPropertySources() .contains(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME)) { // ensure ApolloBootstrapPropertySources is still the first ensureBootstrapPropertyPrecedence(environment); environment.getPropertySources() .addAfter(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME, composite); } else { environment.getPropertySources().addFirst(composite); } } private void ensureBootstrapPropertyPrecedence(ConfigurableEnvironment environment) { MutablePropertySources propertySources = environment.getPropertySources(); PropertySource<?> bootstrapPropertySource = propertySources .get(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME); // not exists or already in the first place if (bootstrapPropertySource == null || propertySources.precedenceOf(bootstrapPropertySource) == 0) { return; } propertySources.remove(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME); propertySources.addFirst(bootstrapPropertySource); } private void initializeAutoUpdatePropertiesFeature(ConfigurableListableBeanFactory beanFactory) { if (!configUtil.isAutoUpdateInjectedSpringPropertiesEnabled() || !AUTO_UPDATE_INITIALIZED_BEAN_FACTORIES.add(beanFactory)) { return; } AutoUpdateConfigChangeListener autoUpdateConfigChangeListener = new AutoUpdateConfigChangeListener( environment, beanFactory); List<ConfigPropertySource> configPropertySources = configPropertySourceFactory.getAllConfigPropertySources(); for (ConfigPropertySource configPropertySource : configPropertySources) { configPropertySource.addChangeListener(autoUpdateConfigChangeListener); } } @Override public void setEnvironment(Environment environment) { //it is safe enough to cast as all known environment is derived from ConfigurableEnvironment this.environment = (ConfigurableEnvironment) environment; } @Override public int getOrder() { //make it as early as possible return Ordered.HIGHEST_PRECEDENCE; } // for test only static void reset() { NAMESPACE_NAMES.clear(); AUTO_UPDATE_INITIALIZED_BEAN_FACTORIES.clear(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.spring.config; import com.ctrip.framework.apollo.build.ApolloInjector; import com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener; import com.ctrip.framework.apollo.spring.util.SpringInjector; import com.ctrip.framework.apollo.util.ConfigUtil; import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.LinkedHashMultimap; import com.google.common.collect.Multimap; import com.ctrip.framework.apollo.Config; import com.ctrip.framework.apollo.ConfigService; import com.google.common.collect.Sets; import java.util.List; import java.util.Set; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.EnvironmentAware; import org.springframework.core.Ordered; import org.springframework.core.PriorityOrdered; import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; import java.util.Collection; import java.util.Iterator; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; /** * Apollo Property Sources processor for Spring Annotation Based Application. <br /> <br /> * * The reason why PropertySourcesProcessor implements {@link BeanFactoryPostProcessor} instead of * {@link org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor} is that lower versions of * Spring (e.g. 3.1.1) doesn't support registering BeanDefinitionRegistryPostProcessor in ImportBeanDefinitionRegistrar * - {@link com.ctrip.framework.apollo.spring.annotation.ApolloConfigRegistrar} * * @author Jason Song(song_s@ctrip.com) */ public class PropertySourcesProcessor implements BeanFactoryPostProcessor, EnvironmentAware, PriorityOrdered { private static final Multimap<Integer, String> NAMESPACE_NAMES = LinkedHashMultimap.create(); private static final Set<BeanFactory> AUTO_UPDATE_INITIALIZED_BEAN_FACTORIES = Sets.newConcurrentHashSet(); private final ConfigPropertySourceFactory configPropertySourceFactory = SpringInjector .getInstance(ConfigPropertySourceFactory.class); private ConfigUtil configUtil; private ConfigurableEnvironment environment; public static boolean addNamespaces(Collection<String> namespaces, int order) { return NAMESPACE_NAMES.putAll(order, namespaces); } @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { this.configUtil = ApolloInjector.getInstance(ConfigUtil.class); initializePropertySources(); initializeAutoUpdatePropertiesFeature(beanFactory); } private void initializePropertySources() { if (environment.getPropertySources().contains(PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME)) { //already initialized return; } CompositePropertySource composite; if (configUtil.isPropertyNamesCacheEnabled()) { composite = new CachedCompositePropertySource(PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME); } else { composite = new CompositePropertySource(PropertySourcesConstants.APOLLO_PROPERTY_SOURCE_NAME); } //sort by order asc ImmutableSortedSet<Integer> orders = ImmutableSortedSet.copyOf(NAMESPACE_NAMES.keySet()); Iterator<Integer> iterator = orders.iterator(); while (iterator.hasNext()) { int order = iterator.next(); for (String namespace : NAMESPACE_NAMES.get(order)) { Config config = ConfigService.getConfig(namespace); composite.addPropertySource(configPropertySourceFactory.getConfigPropertySource(namespace, config)); } } // clean up NAMESPACE_NAMES.clear(); // add after the bootstrap property source or to the first if (environment.getPropertySources() .contains(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME)) { // ensure ApolloBootstrapPropertySources is still the first ensureBootstrapPropertyPrecedence(environment); environment.getPropertySources() .addAfter(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME, composite); } else { environment.getPropertySources().addFirst(composite); } } private void ensureBootstrapPropertyPrecedence(ConfigurableEnvironment environment) { MutablePropertySources propertySources = environment.getPropertySources(); PropertySource<?> bootstrapPropertySource = propertySources .get(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME); // not exists or already in the first place if (bootstrapPropertySource == null || propertySources.precedenceOf(bootstrapPropertySource) == 0) { return; } propertySources.remove(PropertySourcesConstants.APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME); propertySources.addFirst(bootstrapPropertySource); } private void initializeAutoUpdatePropertiesFeature(ConfigurableListableBeanFactory beanFactory) { if (!configUtil.isAutoUpdateInjectedSpringPropertiesEnabled() || !AUTO_UPDATE_INITIALIZED_BEAN_FACTORIES.add(beanFactory)) { return; } AutoUpdateConfigChangeListener autoUpdateConfigChangeListener = new AutoUpdateConfigChangeListener( environment, beanFactory); List<ConfigPropertySource> configPropertySources = configPropertySourceFactory.getAllConfigPropertySources(); for (ConfigPropertySource configPropertySource : configPropertySources) { configPropertySource.addChangeListener(autoUpdateConfigChangeListener); } } @Override public void setEnvironment(Environment environment) { //it is safe enough to cast as all known environment is derived from ConfigurableEnvironment this.environment = (ConfigurableEnvironment) environment; } @Override public int getOrder() { //make it as early as possible return Ordered.HIGHEST_PRECEDENCE; } // for test only static void reset() { NAMESPACE_NAMES.clear(); AUTO_UPDATE_INITIALIZED_BEAN_FACTORIES.clear(); } }
1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-openapi/src/main/java/com/ctrip/framework/apollo/openapi/dto/NamespaceReleaseDTO.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.dto; public class NamespaceReleaseDTO { private String releaseTitle; private String releaseComment; private String releasedBy; private boolean isEmergencyPublish; public String getReleaseTitle() { return releaseTitle; } public void setReleaseTitle(String releaseTitle) { this.releaseTitle = releaseTitle; } public String getReleaseComment() { return releaseComment; } public void setReleaseComment(String releaseComment) { this.releaseComment = releaseComment; } public String getReleasedBy() { return releasedBy; } public void setReleasedBy(String releasedBy) { this.releasedBy = releasedBy; } public boolean isEmergencyPublish() { return isEmergencyPublish; } public void setEmergencyPublish(boolean emergencyPublish) { isEmergencyPublish = emergencyPublish; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.dto; public class NamespaceReleaseDTO { private String releaseTitle; private String releaseComment; private String releasedBy; private boolean isEmergencyPublish; public String getReleaseTitle() { return releaseTitle; } public void setReleaseTitle(String releaseTitle) { this.releaseTitle = releaseTitle; } public String getReleaseComment() { return releaseComment; } public void setReleaseComment(String releaseComment) { this.releaseComment = releaseComment; } public String getReleasedBy() { return releasedBy; } public void setReleasedBy(String releasedBy) { this.releasedBy = releasedBy; } public boolean isEmergencyPublish() { return isEmergencyPublish; } public void setEmergencyPublish(boolean emergencyPublish) { isEmergencyPublish = emergencyPublish; } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/test/java/com/ctrip/framework/apollo/tracer/TracerTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.tracer; import com.ctrip.framework.apollo.tracer.internals.MockMessageProducerManager; import com.ctrip.framework.apollo.tracer.internals.NullTransaction; import com.ctrip.framework.apollo.tracer.spi.MessageProducer; import com.ctrip.framework.apollo.tracer.spi.Transaction; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; /** * @author Jason Song(song_s@ctrip.com) */ public class TracerTest { private MessageProducer someProducer; @Before public void setUp() throws Exception { someProducer = mock(MessageProducer.class); MockMessageProducerManager.setProducer(someProducer); } @Test public void testLogError() throws Exception { String someMessage = "someMessage"; Throwable someCause = mock(Throwable.class); Tracer.logError(someMessage, someCause); verify(someProducer, times(1)).logError(someMessage, someCause); } @Test public void testLogErrorWithException() throws Exception { String someMessage = "someMessage"; Throwable someCause = mock(Throwable.class); doThrow(RuntimeException.class).when(someProducer).logError(someMessage, someCause); Tracer.logError(someMessage, someCause); verify(someProducer, times(1)).logError(someMessage, someCause); } @Test public void testLogErrorWithOnlyCause() throws Exception { Throwable someCause = mock(Throwable.class); Tracer.logError(someCause); verify(someProducer, times(1)).logError(someCause); } @Test public void testLogErrorWithOnlyCauseWithException() throws Exception { Throwable someCause = mock(Throwable.class); doThrow(RuntimeException.class).when(someProducer).logError(someCause); Tracer.logError(someCause); verify(someProducer, times(1)).logError(someCause); } @Test public void testLogEvent() throws Exception { String someType = "someType"; String someName = "someName"; Tracer.logEvent(someType, someName); verify(someProducer, times(1)).logEvent(someType, someName); } @Test public void testLogEventWithException() throws Exception { String someType = "someType"; String someName = "someName"; doThrow(RuntimeException.class).when(someProducer).logEvent(someType, someName); Tracer.logEvent(someType, someName); verify(someProducer, times(1)).logEvent(someType, someName); } @Test public void testLogEventWithStatusAndNameValuePairs() throws Exception { String someType = "someType"; String someName = "someName"; String someStatus = "someStatus"; String someNameValuePairs = "someNameValuePairs"; Tracer.logEvent(someType, someName, someStatus, someNameValuePairs); verify(someProducer, times(1)).logEvent(someType, someName, someStatus, someNameValuePairs); } @Test public void testLogEventWithStatusAndNameValuePairsWithException() throws Exception { String someType = "someType"; String someName = "someName"; String someStatus = "someStatus"; String someNameValuePairs = "someNameValuePairs"; doThrow(RuntimeException.class).when(someProducer).logEvent(someType, someName, someStatus, someNameValuePairs); Tracer.logEvent(someType, someName, someStatus, someNameValuePairs); verify(someProducer, times(1)).logEvent(someType, someName, someStatus, someNameValuePairs); } @Test public void testNewTransaction() throws Exception { String someType = "someType"; String someName = "someName"; Transaction someTransaction = mock(Transaction.class); when(someProducer.newTransaction(someType, someName)).thenReturn(someTransaction); Transaction result = Tracer.newTransaction(someType, someName); verify(someProducer, times(1)).newTransaction(someType, someName); assertEquals(someTransaction, result); } @Test public void testNewTransactionWithException() throws Exception { String someType = "someType"; String someName = "someName"; when(someProducer.newTransaction(someType, someName)).thenThrow(RuntimeException.class); Transaction result = Tracer.newTransaction(someType, someName); verify(someProducer, times(1)).newTransaction(someType, someName); assertTrue(result instanceof NullTransaction); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.tracer; import com.ctrip.framework.apollo.tracer.internals.MockMessageProducerManager; import com.ctrip.framework.apollo.tracer.internals.NullTransaction; import com.ctrip.framework.apollo.tracer.spi.MessageProducer; import com.ctrip.framework.apollo.tracer.spi.Transaction; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; /** * @author Jason Song(song_s@ctrip.com) */ public class TracerTest { private MessageProducer someProducer; @Before public void setUp() throws Exception { someProducer = mock(MessageProducer.class); MockMessageProducerManager.setProducer(someProducer); } @Test public void testLogError() throws Exception { String someMessage = "someMessage"; Throwable someCause = mock(Throwable.class); Tracer.logError(someMessage, someCause); verify(someProducer, times(1)).logError(someMessage, someCause); } @Test public void testLogErrorWithException() throws Exception { String someMessage = "someMessage"; Throwable someCause = mock(Throwable.class); doThrow(RuntimeException.class).when(someProducer).logError(someMessage, someCause); Tracer.logError(someMessage, someCause); verify(someProducer, times(1)).logError(someMessage, someCause); } @Test public void testLogErrorWithOnlyCause() throws Exception { Throwable someCause = mock(Throwable.class); Tracer.logError(someCause); verify(someProducer, times(1)).logError(someCause); } @Test public void testLogErrorWithOnlyCauseWithException() throws Exception { Throwable someCause = mock(Throwable.class); doThrow(RuntimeException.class).when(someProducer).logError(someCause); Tracer.logError(someCause); verify(someProducer, times(1)).logError(someCause); } @Test public void testLogEvent() throws Exception { String someType = "someType"; String someName = "someName"; Tracer.logEvent(someType, someName); verify(someProducer, times(1)).logEvent(someType, someName); } @Test public void testLogEventWithException() throws Exception { String someType = "someType"; String someName = "someName"; doThrow(RuntimeException.class).when(someProducer).logEvent(someType, someName); Tracer.logEvent(someType, someName); verify(someProducer, times(1)).logEvent(someType, someName); } @Test public void testLogEventWithStatusAndNameValuePairs() throws Exception { String someType = "someType"; String someName = "someName"; String someStatus = "someStatus"; String someNameValuePairs = "someNameValuePairs"; Tracer.logEvent(someType, someName, someStatus, someNameValuePairs); verify(someProducer, times(1)).logEvent(someType, someName, someStatus, someNameValuePairs); } @Test public void testLogEventWithStatusAndNameValuePairsWithException() throws Exception { String someType = "someType"; String someName = "someName"; String someStatus = "someStatus"; String someNameValuePairs = "someNameValuePairs"; doThrow(RuntimeException.class).when(someProducer).logEvent(someType, someName, someStatus, someNameValuePairs); Tracer.logEvent(someType, someName, someStatus, someNameValuePairs); verify(someProducer, times(1)).logEvent(someType, someName, someStatus, someNameValuePairs); } @Test public void testNewTransaction() throws Exception { String someType = "someType"; String someName = "someName"; Transaction someTransaction = mock(Transaction.class); when(someProducer.newTransaction(someType, someName)).thenReturn(someTransaction); Transaction result = Tracer.newTransaction(someType, someName); verify(someProducer, times(1)).newTransaction(someType, someName); assertEquals(someTransaction, result); } @Test public void testNewTransactionWithException() throws Exception { String someType = "someType"; String someName = "someName"; when(someProducer.newTransaction(someType, someName)).thenThrow(RuntimeException.class); Transaction result = Tracer.newTransaction(someType, someName); verify(someProducer, times(1)).newTransaction(someType, someName); assertTrue(result instanceof NullTransaction); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/test/java/com/ctrip/framework/apollo/metaservice/controller/ServiceControllerTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.metaservice.controller; import static org.junit.Assert.*; import static org.mockito.Mockito.when; import com.ctrip.framework.apollo.core.ServiceNameConsts; import com.ctrip.framework.apollo.core.dto.ServiceDTO; import com.ctrip.framework.apollo.metaservice.service.DiscoveryService; import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class ServiceControllerTest { @Mock private DiscoveryService discoveryService; @Mock private List<ServiceDTO> someServices; private ServiceController serviceController; @Before public void setUp() throws Exception { serviceController = new ServiceController(discoveryService); } @Test public void testGetMetaService() { assertTrue(serviceController.getMetaService().isEmpty()); } @Test public void testGetConfigService() { String someAppId = "someAppId"; String someClientIp = "someClientIp"; when(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_CONFIGSERVICE)) .thenReturn(someServices); assertEquals(someServices, serviceController.getConfigService(someAppId, someClientIp)); } @Test public void testGetAdminService() { when(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_ADMINSERVICE)) .thenReturn(someServices); assertEquals(someServices, serviceController.getAdminService()); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.metaservice.controller; import static org.junit.Assert.*; import static org.mockito.Mockito.when; import com.ctrip.framework.apollo.core.ServiceNameConsts; import com.ctrip.framework.apollo.core.dto.ServiceDTO; import com.ctrip.framework.apollo.metaservice.service.DiscoveryService; import java.util.List; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class ServiceControllerTest { @Mock private DiscoveryService discoveryService; @Mock private List<ServiceDTO> someServices; private ServiceController serviceController; @Before public void setUp() throws Exception { serviceController = new ServiceController(discoveryService); } @Test public void testGetMetaService() { assertTrue(serviceController.getMetaService().isEmpty()); } @Test public void testGetConfigService() { String someAppId = "someAppId"; String someClientIp = "someClientIp"; when(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_CONFIGSERVICE)) .thenReturn(someServices); assertEquals(someServices, serviceController.getConfigService(someAppId, someClientIp)); } @Test public void testGetAdminService() { when(discoveryService.getServiceInstances(ServiceNameConsts.APOLLO_ADMINSERVICE)) .thenReturn(someServices); assertEquals(someServices, serviceController.getAdminService()); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/NamespaceBranchController.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import com.ctrip.framework.apollo.biz.entity.GrayReleaseRule; import com.ctrip.framework.apollo.biz.entity.Namespace; import com.ctrip.framework.apollo.biz.message.MessageSender; import com.ctrip.framework.apollo.biz.message.Topics; import com.ctrip.framework.apollo.biz.service.NamespaceBranchService; import com.ctrip.framework.apollo.biz.service.NamespaceService; import com.ctrip.framework.apollo.biz.utils.ReleaseMessageKeyGenerator; import com.ctrip.framework.apollo.common.constants.NamespaceBranchStatus; import com.ctrip.framework.apollo.common.dto.GrayReleaseRuleDTO; import com.ctrip.framework.apollo.common.dto.NamespaceDTO; import com.ctrip.framework.apollo.common.exception.BadRequestException; import com.ctrip.framework.apollo.common.utils.BeanUtils; import com.ctrip.framework.apollo.common.utils.GrayReleaseRuleItemTransformer; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController public class NamespaceBranchController { private final MessageSender messageSender; private final NamespaceBranchService namespaceBranchService; private final NamespaceService namespaceService; public NamespaceBranchController( final MessageSender messageSender, final NamespaceBranchService namespaceBranchService, final NamespaceService namespaceService) { this.messageSender = messageSender; this.namespaceBranchService = namespaceBranchService; this.namespaceService = namespaceService; } @PostMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches") public NamespaceDTO createBranch(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName, @RequestParam("operator") String operator) { checkNamespace(appId, clusterName, namespaceName); Namespace createdBranch = namespaceBranchService.createBranch(appId, clusterName, namespaceName, operator); return BeanUtils.transform(NamespaceDTO.class, createdBranch); } @GetMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules") public GrayReleaseRuleDTO findBranchGrayRules(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName, @PathVariable String branchName) { checkBranch(appId, clusterName, namespaceName, branchName); GrayReleaseRule rules = namespaceBranchService.findBranchGrayRules(appId, clusterName, namespaceName, branchName); if (rules == null) { return null; } GrayReleaseRuleDTO ruleDTO = new GrayReleaseRuleDTO(rules.getAppId(), rules.getClusterName(), rules.getNamespaceName(), rules.getBranchName()); ruleDTO.setReleaseId(rules.getReleaseId()); ruleDTO.setRuleItems(GrayReleaseRuleItemTransformer.batchTransformFromJSON(rules.getRules())); return ruleDTO; } @Transactional @PutMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules") public void updateBranchGrayRules(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName, @PathVariable String branchName, @RequestBody GrayReleaseRuleDTO newRuleDto) { checkBranch(appId, clusterName, namespaceName, branchName); GrayReleaseRule newRules = BeanUtils.transform(GrayReleaseRule.class, newRuleDto); newRules.setRules(GrayReleaseRuleItemTransformer.batchTransformToJSON(newRuleDto.getRuleItems())); newRules.setBranchStatus(NamespaceBranchStatus.ACTIVE); namespaceBranchService.updateBranchGrayRules(appId, clusterName, namespaceName, branchName, newRules); messageSender.sendMessage(ReleaseMessageKeyGenerator.generate(appId, clusterName, namespaceName), Topics.APOLLO_RELEASE_TOPIC); } @Transactional @DeleteMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}") public void deleteBranch(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName, @PathVariable String branchName, @RequestParam("operator") String operator) { checkBranch(appId, clusterName, namespaceName, branchName); namespaceBranchService .deleteBranch(appId, clusterName, namespaceName, branchName, NamespaceBranchStatus.DELETED, operator); messageSender.sendMessage(ReleaseMessageKeyGenerator.generate(appId, clusterName, namespaceName), Topics.APOLLO_RELEASE_TOPIC); } @GetMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches") public NamespaceDTO loadNamespaceBranch(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName) { checkNamespace(appId, clusterName, namespaceName); Namespace childNamespace = namespaceBranchService.findBranch(appId, clusterName, namespaceName); if (childNamespace == null) { return null; } return BeanUtils.transform(NamespaceDTO.class, childNamespace); } private void checkBranch(String appId, String clusterName, String namespaceName, String branchName) { //1. check parent namespace checkNamespace(appId, clusterName, namespaceName); //2. check child namespace Namespace childNamespace = namespaceService.findOne(appId, branchName, namespaceName); if (childNamespace == null) { throw new BadRequestException(String.format("Namespace's branch not exist. AppId = %s, ClusterName = %s, " + "NamespaceName = %s, BranchName = %s", appId, clusterName, namespaceName, branchName)); } } private void checkNamespace(String appId, String clusterName, String namespaceName) { Namespace parentNamespace = namespaceService.findOne(appId, clusterName, namespaceName); if (parentNamespace == null) { throw new BadRequestException(String.format("Namespace not exist. AppId = %s, ClusterName = %s, NamespaceName = %s", appId, clusterName, namespaceName)); } } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import com.ctrip.framework.apollo.biz.entity.GrayReleaseRule; import com.ctrip.framework.apollo.biz.entity.Namespace; import com.ctrip.framework.apollo.biz.message.MessageSender; import com.ctrip.framework.apollo.biz.message.Topics; import com.ctrip.framework.apollo.biz.service.NamespaceBranchService; import com.ctrip.framework.apollo.biz.service.NamespaceService; import com.ctrip.framework.apollo.biz.utils.ReleaseMessageKeyGenerator; import com.ctrip.framework.apollo.common.constants.NamespaceBranchStatus; import com.ctrip.framework.apollo.common.dto.GrayReleaseRuleDTO; import com.ctrip.framework.apollo.common.dto.NamespaceDTO; import com.ctrip.framework.apollo.common.exception.BadRequestException; import com.ctrip.framework.apollo.common.utils.BeanUtils; import com.ctrip.framework.apollo.common.utils.GrayReleaseRuleItemTransformer; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController public class NamespaceBranchController { private final MessageSender messageSender; private final NamespaceBranchService namespaceBranchService; private final NamespaceService namespaceService; public NamespaceBranchController( final MessageSender messageSender, final NamespaceBranchService namespaceBranchService, final NamespaceService namespaceService) { this.messageSender = messageSender; this.namespaceBranchService = namespaceBranchService; this.namespaceService = namespaceService; } @PostMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches") public NamespaceDTO createBranch(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName, @RequestParam("operator") String operator) { checkNamespace(appId, clusterName, namespaceName); Namespace createdBranch = namespaceBranchService.createBranch(appId, clusterName, namespaceName, operator); return BeanUtils.transform(NamespaceDTO.class, createdBranch); } @GetMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules") public GrayReleaseRuleDTO findBranchGrayRules(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName, @PathVariable String branchName) { checkBranch(appId, clusterName, namespaceName, branchName); GrayReleaseRule rules = namespaceBranchService.findBranchGrayRules(appId, clusterName, namespaceName, branchName); if (rules == null) { return null; } GrayReleaseRuleDTO ruleDTO = new GrayReleaseRuleDTO(rules.getAppId(), rules.getClusterName(), rules.getNamespaceName(), rules.getBranchName()); ruleDTO.setReleaseId(rules.getReleaseId()); ruleDTO.setRuleItems(GrayReleaseRuleItemTransformer.batchTransformFromJSON(rules.getRules())); return ruleDTO; } @Transactional @PutMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules") public void updateBranchGrayRules(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName, @PathVariable String branchName, @RequestBody GrayReleaseRuleDTO newRuleDto) { checkBranch(appId, clusterName, namespaceName, branchName); GrayReleaseRule newRules = BeanUtils.transform(GrayReleaseRule.class, newRuleDto); newRules.setRules(GrayReleaseRuleItemTransformer.batchTransformToJSON(newRuleDto.getRuleItems())); newRules.setBranchStatus(NamespaceBranchStatus.ACTIVE); namespaceBranchService.updateBranchGrayRules(appId, clusterName, namespaceName, branchName, newRules); messageSender.sendMessage(ReleaseMessageKeyGenerator.generate(appId, clusterName, namespaceName), Topics.APOLLO_RELEASE_TOPIC); } @Transactional @DeleteMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}") public void deleteBranch(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName, @PathVariable String branchName, @RequestParam("operator") String operator) { checkBranch(appId, clusterName, namespaceName, branchName); namespaceBranchService .deleteBranch(appId, clusterName, namespaceName, branchName, NamespaceBranchStatus.DELETED, operator); messageSender.sendMessage(ReleaseMessageKeyGenerator.generate(appId, clusterName, namespaceName), Topics.APOLLO_RELEASE_TOPIC); } @GetMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches") public NamespaceDTO loadNamespaceBranch(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespaceName) { checkNamespace(appId, clusterName, namespaceName); Namespace childNamespace = namespaceBranchService.findBranch(appId, clusterName, namespaceName); if (childNamespace == null) { return null; } return BeanUtils.transform(NamespaceDTO.class, childNamespace); } private void checkBranch(String appId, String clusterName, String namespaceName, String branchName) { //1. check parent namespace checkNamespace(appId, clusterName, namespaceName); //2. check child namespace Namespace childNamespace = namespaceService.findOne(appId, branchName, namespaceName); if (childNamespace == null) { throw new BadRequestException(String.format("Namespace's branch not exist. AppId = %s, ClusterName = %s, " + "NamespaceName = %s, BranchName = %s", appId, clusterName, namespaceName, branchName)); } } private void checkNamespace(String appId, String clusterName, String namespaceName) { Namespace parentNamespace = namespaceService.findOne(appId, clusterName, namespaceName); if (parentNamespace == null) { throw new BadRequestException(String.format("Namespace not exist. AppId = %s, ClusterName = %s, NamespaceName = %s", appId, clusterName, namespaceName)); } } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/main/java/com/ctrip/framework/apollo/tracer/spi/MessageProducer.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.tracer.spi; /** * @author Jason Song(song_s@ctrip.com) */ public interface MessageProducer { /** * Log an error. * * @param cause root cause exception */ void logError(Throwable cause); /** * Log an error. * * @param cause root cause exception */ void logError(String message, Throwable cause); /** * Log an event in one shot with SUCCESS status. * * @param type event type * @param name event name */ void logEvent(String type, String name); /** * Log an event in one shot. * * @param type event type * @param name event name * @param status "0" means success, otherwise means error code * @param nameValuePairs name value pairs in the format of "a=1&b=2&..." */ void logEvent(String type, String name, String status, String nameValuePairs); /** * Create a new transaction with given type and name. * * @param type transaction type * @param name transaction name */ Transaction newTransaction(String type, String name); }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.tracer.spi; /** * @author Jason Song(song_s@ctrip.com) */ public interface MessageProducer { /** * Log an error. * * @param cause root cause exception */ void logError(Throwable cause); /** * Log an error. * * @param cause root cause exception */ void logError(String message, Throwable cause); /** * Log an event in one shot with SUCCESS status. * * @param type event type * @param name event name */ void logEvent(String type, String name); /** * Log an event in one shot. * * @param type event type * @param name event name * @param status "0" means success, otherwise means error code * @param nameValuePairs name value pairs in the format of "a=1&b=2&..." */ void logEvent(String type, String name, String status, String nameValuePairs); /** * Create a new transaction with given type and name. * * @param type transaction type * @param name transaction name */ Transaction newTransaction(String type, String name); }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/repository/PermissionRepository.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.repository; import com.ctrip.framework.apollo.portal.entity.po.Permission; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import java.util.Collection; import java.util.List; /** * @author Jason Song(song_s@ctrip.com) */ public interface PermissionRepository extends PagingAndSortingRepository<Permission, Long> { /** * find permission by permission type and targetId */ Permission findTopByPermissionTypeAndTargetId(String permissionType, String targetId); /** * find permissions by permission types and targetId */ List<Permission> findByPermissionTypeInAndTargetId(Collection<String> permissionTypes, String targetId); @Query("SELECT p.id from Permission p where p.targetId = ?1 or p.targetId like CONCAT(?1, '+%')") List<Long> findPermissionIdsByAppId(String appId); @Query("SELECT p.id from Permission p where p.targetId = CONCAT(?1, '+', ?2)") List<Long> findPermissionIdsByAppIdAndNamespace(String appId, String namespaceName); @Modifying @Query("UPDATE Permission SET IsDeleted=1, DataChange_LastModifiedBy = ?2 WHERE Id in ?1") Integer batchDelete(List<Long> permissionIds, String operator); }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.repository; import com.ctrip.framework.apollo.portal.entity.po.Permission; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import java.util.Collection; import java.util.List; /** * @author Jason Song(song_s@ctrip.com) */ public interface PermissionRepository extends PagingAndSortingRepository<Permission, Long> { /** * find permission by permission type and targetId */ Permission findTopByPermissionTypeAndTargetId(String permissionType, String targetId); /** * find permissions by permission types and targetId */ List<Permission> findByPermissionTypeInAndTargetId(Collection<String> permissionTypes, String targetId); @Query("SELECT p.id from Permission p where p.targetId = ?1 or p.targetId like CONCAT(?1, '+%')") List<Long> findPermissionIdsByAppId(String appId); @Query("SELECT p.id from Permission p where p.targetId = CONCAT(?1, '+', ?2)") List<Long> findPermissionIdsByAppIdAndNamespace(String appId, String namespaceName); @Modifying @Query("UPDATE Permission SET IsDeleted=1, DataChange_LastModifiedBy = ?2 WHERE Id in ?1") Integer batchDelete(List<Long> permissionIds, String operator); }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/utils/ReleaseKeyGeneratorTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.utils; import com.google.common.collect.Sets; import com.ctrip.framework.apollo.biz.MockBeanFactory; import com.ctrip.framework.apollo.biz.entity.Namespace; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import static org.junit.Assert.assertEquals; /** * @author Jason Song(song_s@ctrip.com) */ public class ReleaseKeyGeneratorTest { private static final Logger logger = LoggerFactory.getLogger(ReleaseKeyGeneratorTest.class); @Test public void testGenerateReleaseKey() throws Exception { String someAppId = "someAppId"; String someCluster = "someCluster"; String someNamespace = "someNamespace"; String anotherAppId = "anotherAppId"; Namespace namespace = MockBeanFactory.mockNamespace(someAppId, someCluster, someNamespace); Namespace anotherNamespace = MockBeanFactory.mockNamespace(anotherAppId, someCluster, someNamespace); int generateTimes = 50000; Set<String> releaseKeys = Sets.newConcurrentHashSet(); ExecutorService executorService = Executors.newFixedThreadPool(2); CountDownLatch latch = new CountDownLatch(1); executorService.submit(generateReleaseKeysTask(namespace, releaseKeys, generateTimes, latch)); executorService.submit(generateReleaseKeysTask(anotherNamespace, releaseKeys, generateTimes, latch)); latch.countDown(); executorService.shutdown(); executorService.awaitTermination(10, TimeUnit.SECONDS); //make sure keys are unique assertEquals(generateTimes * 2, releaseKeys.size()); } private Runnable generateReleaseKeysTask(Namespace namespace, Set<String> releaseKeys, int generateTimes, CountDownLatch latch) { return () -> { try { latch.await(); } catch (InterruptedException e) { //ignore } for (int i = 0; i < generateTimes; i++) { releaseKeys.add(ReleaseKeyGenerator.generateReleaseKey(namespace)); } }; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.utils; import com.google.common.collect.Sets; import com.ctrip.framework.apollo.biz.MockBeanFactory; import com.ctrip.framework.apollo.biz.entity.Namespace; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import static org.junit.Assert.assertEquals; /** * @author Jason Song(song_s@ctrip.com) */ public class ReleaseKeyGeneratorTest { private static final Logger logger = LoggerFactory.getLogger(ReleaseKeyGeneratorTest.class); @Test public void testGenerateReleaseKey() throws Exception { String someAppId = "someAppId"; String someCluster = "someCluster"; String someNamespace = "someNamespace"; String anotherAppId = "anotherAppId"; Namespace namespace = MockBeanFactory.mockNamespace(someAppId, someCluster, someNamespace); Namespace anotherNamespace = MockBeanFactory.mockNamespace(anotherAppId, someCluster, someNamespace); int generateTimes = 50000; Set<String> releaseKeys = Sets.newConcurrentHashSet(); ExecutorService executorService = Executors.newFixedThreadPool(2); CountDownLatch latch = new CountDownLatch(1); executorService.submit(generateReleaseKeysTask(namespace, releaseKeys, generateTimes, latch)); executorService.submit(generateReleaseKeysTask(anotherNamespace, releaseKeys, generateTimes, latch)); latch.countDown(); executorService.shutdown(); executorService.awaitTermination(10, TimeUnit.SECONDS); //make sure keys are unique assertEquals(generateTimes * 2, releaseKeys.size()); } private Runnable generateReleaseKeysTask(Namespace namespace, Set<String> releaseKeys, int generateTimes, CountDownLatch latch) { return () -> { try { latch.await(); } catch (InterruptedException e) { //ignore } for (int i = 0; i < generateTimes; i++) { releaseKeys.add(ReleaseKeyGenerator.generateReleaseKey(namespace)); } }; } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/test/java/com/ctrip/framework/foundation/internals/provider/DefaultServerProviderTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.foundation.internals.provider; import static com.ctrip.framework.foundation.internals.provider.DefaultServerProvider.DEFAULT_SERVER_PROPERTIES_PATH_ON_LINUX; import static com.ctrip.framework.foundation.internals.provider.DefaultServerProvider.DEFAULT_SERVER_PROPERTIES_PATH_ON_WINDOWS; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import com.ctrip.framework.foundation.internals.Utils; import java.io.File; import java.io.FileInputStream; import org.junit.After; import org.junit.Before; import org.junit.Test; import com.ctrip.framework.foundation.internals.provider.DefaultServerProvider; public class DefaultServerProviderTest { private DefaultServerProvider defaultServerProvider; @Before public void setUp() throws Exception { cleanUp(); defaultServerProvider = new DefaultServerProvider(); } @After public void tearDown() throws Exception { cleanUp(); } private void cleanUp() { System.clearProperty("env"); System.clearProperty("idc"); System.clearProperty("apollo.path.server.properties"); } @Test public void testGetServerPropertiesPathDefault() { assertEquals(Utils.isOSWindows() ? DEFAULT_SERVER_PROPERTIES_PATH_ON_WINDOWS : DEFAULT_SERVER_PROPERTIES_PATH_ON_LINUX, defaultServerProvider.getServerPropertiesPath()); } @Test public void testGetServerPropertiesPathCustom() { final String customPath = "/simple/custom/path"; System.setProperty("apollo.path.server.properties", customPath); assertEquals(customPath, defaultServerProvider.getServerPropertiesPath()); } @Test public void testEnvWithSystemProperty() throws Exception { String someEnv = "someEnv"; String someDc = "someDc"; System.setProperty("env", someEnv); System.setProperty("idc", someDc); defaultServerProvider.initialize(null); assertEquals(someEnv, defaultServerProvider.getEnvType()); assertEquals(someDc, defaultServerProvider.getDataCenter()); } @Test public void testWithPropertiesStream() throws Exception { File baseDir = new File("src/test/resources/properties"); File serverProperties = new File(baseDir, "server.properties"); defaultServerProvider.initialize(new FileInputStream(serverProperties)); assertEquals("SHAJQ", defaultServerProvider.getDataCenter()); assertTrue(defaultServerProvider.isEnvTypeSet()); assertEquals("DEV", defaultServerProvider.getEnvType()); } @Test public void testWithUTF8BomPropertiesStream() throws Exception { File baseDir = new File("src/test/resources/properties"); File serverProperties = new File(baseDir, "server-with-utf8bom.properties"); defaultServerProvider.initialize(new FileInputStream(serverProperties)); assertEquals("SHAJQ", defaultServerProvider.getDataCenter()); assertTrue(defaultServerProvider.isEnvTypeSet()); assertEquals("DEV", defaultServerProvider.getEnvType()); } @Test public void testWithPropertiesStreamAndEnvFromSystemProperty() throws Exception { String prodEnv = "pro"; System.setProperty("env", prodEnv); File baseDir = new File("src/test/resources/properties"); File serverProperties = new File(baseDir, "server.properties"); defaultServerProvider.initialize(new FileInputStream(serverProperties)); String predefinedDataCenter = "SHAJQ"; assertEquals(predefinedDataCenter, defaultServerProvider.getDataCenter()); assertTrue(defaultServerProvider.isEnvTypeSet()); assertEquals(prodEnv, defaultServerProvider.getEnvType()); } @Test public void testWithNoPropertiesStream() throws Exception { defaultServerProvider.initialize(null); assertNull(defaultServerProvider.getDataCenter()); assertFalse(defaultServerProvider.isEnvTypeSet()); assertNull(defaultServerProvider.getEnvType()); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.foundation.internals.provider; import static com.ctrip.framework.foundation.internals.provider.DefaultServerProvider.DEFAULT_SERVER_PROPERTIES_PATH_ON_LINUX; import static com.ctrip.framework.foundation.internals.provider.DefaultServerProvider.DEFAULT_SERVER_PROPERTIES_PATH_ON_WINDOWS; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import com.ctrip.framework.foundation.internals.Utils; import java.io.File; import java.io.FileInputStream; import org.junit.After; import org.junit.Before; import org.junit.Test; import com.ctrip.framework.foundation.internals.provider.DefaultServerProvider; public class DefaultServerProviderTest { private DefaultServerProvider defaultServerProvider; @Before public void setUp() throws Exception { cleanUp(); defaultServerProvider = new DefaultServerProvider(); } @After public void tearDown() throws Exception { cleanUp(); } private void cleanUp() { System.clearProperty("env"); System.clearProperty("idc"); System.clearProperty("apollo.path.server.properties"); } @Test public void testGetServerPropertiesPathDefault() { assertEquals(Utils.isOSWindows() ? DEFAULT_SERVER_PROPERTIES_PATH_ON_WINDOWS : DEFAULT_SERVER_PROPERTIES_PATH_ON_LINUX, defaultServerProvider.getServerPropertiesPath()); } @Test public void testGetServerPropertiesPathCustom() { final String customPath = "/simple/custom/path"; System.setProperty("apollo.path.server.properties", customPath); assertEquals(customPath, defaultServerProvider.getServerPropertiesPath()); } @Test public void testEnvWithSystemProperty() throws Exception { String someEnv = "someEnv"; String someDc = "someDc"; System.setProperty("env", someEnv); System.setProperty("idc", someDc); defaultServerProvider.initialize(null); assertEquals(someEnv, defaultServerProvider.getEnvType()); assertEquals(someDc, defaultServerProvider.getDataCenter()); } @Test public void testWithPropertiesStream() throws Exception { File baseDir = new File("src/test/resources/properties"); File serverProperties = new File(baseDir, "server.properties"); defaultServerProvider.initialize(new FileInputStream(serverProperties)); assertEquals("SHAJQ", defaultServerProvider.getDataCenter()); assertTrue(defaultServerProvider.isEnvTypeSet()); assertEquals("DEV", defaultServerProvider.getEnvType()); } @Test public void testWithUTF8BomPropertiesStream() throws Exception { File baseDir = new File("src/test/resources/properties"); File serverProperties = new File(baseDir, "server-with-utf8bom.properties"); defaultServerProvider.initialize(new FileInputStream(serverProperties)); assertEquals("SHAJQ", defaultServerProvider.getDataCenter()); assertTrue(defaultServerProvider.isEnvTypeSet()); assertEquals("DEV", defaultServerProvider.getEnvType()); } @Test public void testWithPropertiesStreamAndEnvFromSystemProperty() throws Exception { String prodEnv = "pro"; System.setProperty("env", prodEnv); File baseDir = new File("src/test/resources/properties"); File serverProperties = new File(baseDir, "server.properties"); defaultServerProvider.initialize(new FileInputStream(serverProperties)); String predefinedDataCenter = "SHAJQ"; assertEquals(predefinedDataCenter, defaultServerProvider.getDataCenter()); assertTrue(defaultServerProvider.isEnvTypeSet()); assertEquals(prodEnv, defaultServerProvider.getEnvType()); } @Test public void testWithNoPropertiesStream() throws Exception { defaultServerProvider.initialize(null); assertNull(defaultServerProvider.getDataCenter()); assertFalse(defaultServerProvider.isEnvTypeSet()); assertNull(defaultServerProvider.getEnvType()); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/ReleaseControllerTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import com.ctrip.framework.apollo.biz.entity.Namespace; import com.ctrip.framework.apollo.biz.message.MessageSender; import com.ctrip.framework.apollo.biz.message.Topics; import com.ctrip.framework.apollo.biz.repository.ReleaseRepository; import com.ctrip.framework.apollo.biz.service.NamespaceService; import com.ctrip.framework.apollo.biz.service.ReleaseService; import com.ctrip.framework.apollo.common.dto.AppDTO; import com.ctrip.framework.apollo.common.dto.ClusterDTO; import com.ctrip.framework.apollo.common.dto.ItemDTO; import com.ctrip.framework.apollo.common.dto.NamespaceDTO; import com.ctrip.framework.apollo.common.dto.ReleaseDTO; import com.ctrip.framework.apollo.core.ConfigConsts; import com.google.common.base.Joiner; import com.google.gson.Gson; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.jdbc.Sql.ExecutionPhase; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import java.util.HashMap; import java.util.Map; import static org.mockito.Mockito.*; public class ReleaseControllerTest extends AbstractControllerTest { private static final Gson GSON = new Gson(); @Autowired ReleaseRepository releaseRepository; @Test @Sql(scripts = "/controller/test-release.sql", executionPhase = ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD) public void testReleaseBuild() { String appId = "someAppId"; AppDTO app = restTemplate.getForObject("http://localhost:" + port + "/apps/" + appId, AppDTO.class); ClusterDTO cluster = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/default", ClusterDTO.class); NamespaceDTO namespace = restTemplate.getForObject("http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/application", NamespaceDTO.class); Assert.assertEquals("someAppId", app.getAppId()); Assert.assertEquals("default", cluster.getName()); Assert.assertEquals("application", namespace.getNamespaceName()); ItemDTO[] items = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/items", ItemDTO[].class); Assert.assertEquals(3, items.length); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(); parameters.add("name", "someReleaseName"); parameters.add("comment", "someComment"); parameters.add("operator", "test"); HttpEntity<MultiValueMap<String, String>> entity = new HttpEntity<>(parameters, headers); ResponseEntity<ReleaseDTO> response = restTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/releases", entity, ReleaseDTO.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); ReleaseDTO release = response.getBody(); Assert.assertEquals("someReleaseName", release.getName()); Assert.assertEquals("someComment", release.getComment()); Assert.assertEquals("someAppId", release.getAppId()); Assert.assertEquals("default", release.getClusterName()); Assert.assertEquals("application", release.getNamespaceName()); Map<String, String> configurations = new HashMap<>(); configurations.put("k1", "v1"); configurations.put("k2", "v2"); configurations.put("k3", "v3"); Assert.assertEquals(GSON.toJson(configurations), release.getConfigurations()); } @Test public void testMessageSendAfterBuildRelease() throws Exception { String someAppId = "someAppId"; String someNamespaceName = "someNamespace"; String someCluster = "someCluster"; String someName = "someName"; String someComment = "someComment"; String someUserName = "someUser"; NamespaceService someNamespaceService = mock(NamespaceService.class); ReleaseService someReleaseService = mock(ReleaseService.class); MessageSender someMessageSender = mock(MessageSender.class); Namespace someNamespace = mock(Namespace.class); ReleaseController releaseController = new ReleaseController(someReleaseService, someNamespaceService, someMessageSender, null); when(someNamespaceService.findOne(someAppId, someCluster, someNamespaceName)) .thenReturn(someNamespace); releaseController .publish(someAppId, someCluster, someNamespaceName, someName, someComment, "test", false); verify(someMessageSender, times(1)) .sendMessage(Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, someNamespaceName), Topics.APOLLO_RELEASE_TOPIC); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.controller; import com.ctrip.framework.apollo.biz.entity.Namespace; import com.ctrip.framework.apollo.biz.message.MessageSender; import com.ctrip.framework.apollo.biz.message.Topics; import com.ctrip.framework.apollo.biz.repository.ReleaseRepository; import com.ctrip.framework.apollo.biz.service.NamespaceService; import com.ctrip.framework.apollo.biz.service.ReleaseService; import com.ctrip.framework.apollo.common.dto.AppDTO; import com.ctrip.framework.apollo.common.dto.ClusterDTO; import com.ctrip.framework.apollo.common.dto.ItemDTO; import com.ctrip.framework.apollo.common.dto.NamespaceDTO; import com.ctrip.framework.apollo.common.dto.ReleaseDTO; import com.ctrip.framework.apollo.core.ConfigConsts; import com.google.common.base.Joiner; import com.google.gson.Gson; import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.context.jdbc.Sql; import org.springframework.test.context.jdbc.Sql.ExecutionPhase; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import java.util.HashMap; import java.util.Map; import static org.mockito.Mockito.*; public class ReleaseControllerTest extends AbstractControllerTest { private static final Gson GSON = new Gson(); @Autowired ReleaseRepository releaseRepository; @Test @Sql(scripts = "/controller/test-release.sql", executionPhase = ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD) public void testReleaseBuild() { String appId = "someAppId"; AppDTO app = restTemplate.getForObject("http://localhost:" + port + "/apps/" + appId, AppDTO.class); ClusterDTO cluster = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/default", ClusterDTO.class); NamespaceDTO namespace = restTemplate.getForObject("http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/application", NamespaceDTO.class); Assert.assertEquals("someAppId", app.getAppId()); Assert.assertEquals("default", cluster.getName()); Assert.assertEquals("application", namespace.getNamespaceName()); ItemDTO[] items = restTemplate.getForObject( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/items", ItemDTO[].class); Assert.assertEquals(3, items.length); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(); parameters.add("name", "someReleaseName"); parameters.add("comment", "someComment"); parameters.add("operator", "test"); HttpEntity<MultiValueMap<String, String>> entity = new HttpEntity<>(parameters, headers); ResponseEntity<ReleaseDTO> response = restTemplate.postForEntity( "http://localhost:" + port + "/apps/" + app.getAppId() + "/clusters/" + cluster.getName() + "/namespaces/" + namespace.getNamespaceName() + "/releases", entity, ReleaseDTO.class); Assert.assertEquals(HttpStatus.OK, response.getStatusCode()); ReleaseDTO release = response.getBody(); Assert.assertEquals("someReleaseName", release.getName()); Assert.assertEquals("someComment", release.getComment()); Assert.assertEquals("someAppId", release.getAppId()); Assert.assertEquals("default", release.getClusterName()); Assert.assertEquals("application", release.getNamespaceName()); Map<String, String> configurations = new HashMap<>(); configurations.put("k1", "v1"); configurations.put("k2", "v2"); configurations.put("k3", "v3"); Assert.assertEquals(GSON.toJson(configurations), release.getConfigurations()); } @Test public void testMessageSendAfterBuildRelease() throws Exception { String someAppId = "someAppId"; String someNamespaceName = "someNamespace"; String someCluster = "someCluster"; String someName = "someName"; String someComment = "someComment"; String someUserName = "someUser"; NamespaceService someNamespaceService = mock(NamespaceService.class); ReleaseService someReleaseService = mock(ReleaseService.class); MessageSender someMessageSender = mock(MessageSender.class); Namespace someNamespace = mock(Namespace.class); ReleaseController releaseController = new ReleaseController(someReleaseService, someNamespaceService, someMessageSender, null); when(someNamespaceService.findOne(someAppId, someCluster, someNamespaceName)) .thenReturn(someNamespace); releaseController .publish(someAppId, someCluster, someNamespaceName, someName, someComment, "test", false); verify(someMessageSender, times(1)) .sendMessage(Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, someNamespaceName), Topics.APOLLO_RELEASE_TOPIC); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/NotificationControllerV2Test.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.configservice.controller; import com.ctrip.framework.apollo.biz.config.BizConfig; import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; import com.ctrip.framework.apollo.biz.message.Topics; import com.ctrip.framework.apollo.biz.utils.EntityManagerUtil; import com.ctrip.framework.apollo.configservice.service.ReleaseMessageServiceWithCache; import com.ctrip.framework.apollo.configservice.util.NamespaceUtil; import com.ctrip.framework.apollo.configservice.util.WatchKeysUtil; import com.ctrip.framework.apollo.configservice.wrapper.DeferredResultWrapper; import com.ctrip.framework.apollo.core.ConfigConsts; import com.ctrip.framework.apollo.core.dto.ApolloConfigNotification; import com.ctrip.framework.apollo.core.dto.ApolloNotificationMessages; import com.google.common.base.Joiner; import com.google.common.collect.HashMultimap; import com.google.common.collect.Lists; import com.google.common.collect.Multimap; import com.google.common.collect.Sets; import com.google.gson.Gson; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.web.context.request.async.DeferredResult; import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.concurrent.TimeUnit; import static org.awaitility.Awaitility.await; import static org.junit.Assert.*; import static org.mockito.Mockito.*; /** * @author Jason Song(song_s@ctrip.com) */ @RunWith(MockitoJUnitRunner.class) public class NotificationControllerV2Test { private NotificationControllerV2 controller; private String someAppId; private String someCluster; private String defaultCluster; private String defaultNamespace; private String somePublicNamespace; private String someDataCenter; private long someNotificationId; private String someClientIp; @Mock private ReleaseMessageServiceWithCache releaseMessageService; @Mock private EntityManagerUtil entityManagerUtil; @Mock private NamespaceUtil namespaceUtil; @Mock private WatchKeysUtil watchKeysUtil; @Mock private BizConfig bizConfig; private Gson gson; private Multimap<String, DeferredResultWrapper> deferredResults; @Before public void setUp() throws Exception { gson = new Gson(); controller = new NotificationControllerV2( watchKeysUtil, releaseMessageService, entityManagerUtil, namespaceUtil, gson, bizConfig ); when(bizConfig.releaseMessageNotificationBatch()).thenReturn(100); when(bizConfig.releaseMessageNotificationBatchIntervalInMilli()).thenReturn(5); someAppId = "someAppId"; someCluster = "someCluster"; defaultCluster = ConfigConsts.CLUSTER_NAME_DEFAULT; defaultNamespace = ConfigConsts.NAMESPACE_APPLICATION; somePublicNamespace = "somePublicNamespace"; someDataCenter = "someDC"; someNotificationId = 1; someClientIp = "someClientIp"; when(namespaceUtil.filterNamespaceName(defaultNamespace)).thenReturn(defaultNamespace); when(namespaceUtil.filterNamespaceName(somePublicNamespace)).thenReturn(somePublicNamespace); when(namespaceUtil.normalizeNamespace(someAppId, defaultNamespace)).thenReturn(defaultNamespace); when(namespaceUtil.normalizeNamespace(someAppId, somePublicNamespace)).thenReturn(somePublicNamespace); deferredResults = (Multimap<String, DeferredResultWrapper>) ReflectionTestUtils.getField(controller, "deferredResults"); } @Test public void testPollNotificationWithDefaultNamespace() throws Exception { String someWatchKey = "someKey"; String anotherWatchKey = "anotherKey"; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey, anotherWatchKey)); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace, someNotificationId); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace), someDataCenter)).thenReturn( watchKeysMap); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); assertEquals(watchKeysMap.size(), deferredResults.size()); assertWatchKeys(watchKeysMap, deferredResult); } @Test public void testPollNotificationWithDefaultNamespaceAsFile() throws Exception { String namespace = String.format("%s.%s", defaultNamespace, "properties"); when(namespaceUtil.filterNamespaceName(namespace)).thenReturn(defaultNamespace); String someWatchKey = "someKey"; String anotherWatchKey = "anotherKey"; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey, anotherWatchKey)); String notificationAsString = transformApolloConfigNotificationsToString(namespace, someNotificationId); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace), someDataCenter)).thenReturn( watchKeysMap); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); assertEquals(watchKeysMap.size(), deferredResults.size()); assertWatchKeys(watchKeysMap, deferredResult); } @Test public void testPollNotificationWithMultipleNamespaces() throws Exception { String defaultNamespaceAsFile = defaultNamespace + ".properties"; String somePublicNamespaceAsFile = somePublicNamespace + ".xml"; when(namespaceUtil.filterNamespaceName(defaultNamespaceAsFile)).thenReturn(defaultNamespace); when(namespaceUtil.filterNamespaceName(somePublicNamespaceAsFile)).thenReturn(somePublicNamespaceAsFile); when(namespaceUtil.normalizeNamespace(someAppId, somePublicNamespaceAsFile)).thenReturn(somePublicNamespaceAsFile); String someWatchKey = "someKey"; String anotherWatchKey = "anotherKey"; String somePublicWatchKey = "somePublicWatchKey"; String somePublicFileWatchKey = "somePublicFileWatchKey"; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey, anotherWatchKey)); watchKeysMap .putAll(assembleMultiMap(somePublicNamespace, Lists.newArrayList(somePublicWatchKey))); watchKeysMap .putAll(assembleMultiMap(somePublicNamespaceAsFile, Lists.newArrayList(somePublicFileWatchKey))); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespaceAsFile, someNotificationId, somePublicNamespace, someNotificationId, somePublicNamespaceAsFile, someNotificationId); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace, somePublicNamespace, somePublicNamespaceAsFile), someDataCenter)).thenReturn( watchKeysMap); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); assertEquals(watchKeysMap.size(), deferredResults.size()); assertWatchKeys(watchKeysMap, deferredResult); verify(watchKeysUtil, times(1)).assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace, somePublicNamespace, somePublicNamespaceAsFile), someDataCenter); } @Test public void testPollNotificationWithMultipleNamespaceWithNotificationIdOutDated() throws Exception { String someWatchKey = "someKey"; String anotherWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, somePublicNamespace); String yetAnotherWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, defaultCluster, somePublicNamespace); long notificationId = someNotificationId + 1; long yetAnotherNotificationId = someNotificationId; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey)); watchKeysMap .putAll(assembleMultiMap(somePublicNamespace, Lists.newArrayList(anotherWatchKey, yetAnotherWatchKey))); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace, somePublicNamespace), someDataCenter)).thenReturn( watchKeysMap); ReleaseMessage someReleaseMessage = mock(ReleaseMessage.class); when(someReleaseMessage.getId()).thenReturn(notificationId); when(someReleaseMessage.getMessage()).thenReturn(anotherWatchKey); ReleaseMessage yetAnotherReleaseMessage = mock(ReleaseMessage.class); when(yetAnotherReleaseMessage.getId()).thenReturn(yetAnotherNotificationId); when(yetAnotherReleaseMessage.getMessage()).thenReturn(yetAnotherWatchKey); when(releaseMessageService .findLatestReleaseMessagesGroupByMessages(Sets.newHashSet(watchKeysMap.values()))) .thenReturn(Lists.newArrayList(someReleaseMessage, yetAnotherReleaseMessage)); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace, someNotificationId, somePublicNamespace, someNotificationId); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); ResponseEntity<List<ApolloConfigNotification>> result = (ResponseEntity<List<ApolloConfigNotification>>) deferredResult.getResult(); assertEquals(HttpStatus.OK, result.getStatusCode()); assertEquals(1, result.getBody().size()); assertEquals(somePublicNamespace, result.getBody().get(0).getNamespaceName()); assertEquals(notificationId, result.getBody().get(0).getNotificationId()); ApolloNotificationMessages notificationMessages = result.getBody().get(0).getMessages(); assertEquals(2, notificationMessages.getDetails().size()); assertEquals(notificationId, notificationMessages.get(anotherWatchKey).longValue()); assertEquals(yetAnotherNotificationId, notificationMessages.get(yetAnotherWatchKey).longValue()); } @Test public void testPollNotificationWithMultipleNamespacesAndHandleMessage() throws Exception { String someWatchKey = "someKey"; String anotherWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, somePublicNamespace); Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey)); watchKeysMap .putAll(assembleMultiMap(somePublicNamespace, Lists.newArrayList(anotherWatchKey))); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace, somePublicNamespace), someDataCenter)).thenReturn( watchKeysMap); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace, someNotificationId, somePublicNamespace, someNotificationId); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); assertEquals(watchKeysMap.size(), deferredResults.size()); long someId = 1; ReleaseMessage someReleaseMessage = new ReleaseMessage(anotherWatchKey); someReleaseMessage.setId(someId); controller.handleMessage(someReleaseMessage, Topics.APOLLO_RELEASE_TOPIC); ResponseEntity<List<ApolloConfigNotification>> response = (ResponseEntity<List<ApolloConfigNotification>>) deferredResult.getResult(); assertEquals(1, response.getBody().size()); ApolloConfigNotification notification = response.getBody().get(0); assertEquals(HttpStatus.OK, response.getStatusCode()); assertEquals(somePublicNamespace, notification.getNamespaceName()); assertEquals(someId, notification.getNotificationId()); ApolloNotificationMessages notificationMessages = response.getBody().get(0).getMessages(); assertEquals(1, notificationMessages.getDetails().size()); assertEquals(someId, notificationMessages.get(anotherWatchKey).longValue()); } @Test public void testPollNotificationWithHandleMessageInBatch() throws Exception { String someWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, defaultNamespace); int someBatch = 1; int someBatchInterval = 10; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey)); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace, someNotificationId); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace), someDataCenter)).thenReturn(watchKeysMap); when(bizConfig.releaseMessageNotificationBatch()).thenReturn(someBatch); when(bizConfig.releaseMessageNotificationBatchIntervalInMilli()).thenReturn(someBatchInterval); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> anotherDeferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); long someId = 1; ReleaseMessage someReleaseMessage = new ReleaseMessage(someWatchKey); someReleaseMessage.setId(someId); controller.handleMessage(someReleaseMessage, Topics.APOLLO_RELEASE_TOPIC); //in batch mode, at most one of them should have result assertFalse(deferredResult.hasResult() && anotherDeferredResult.hasResult()); //now both of them should have result await().atMost(someBatchInterval * 500, TimeUnit.MILLISECONDS).untilAsserted( () -> assertTrue(deferredResult.hasResult() && anotherDeferredResult.hasResult())); } @Test public void testPollNotificationWithIncorrectCase() throws Exception { String appIdWithIncorrectCase = someAppId.toUpperCase(); String namespaceWithIncorrectCase = defaultNamespace.toUpperCase(); String someMessage = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, defaultNamespace); String someWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(appIdWithIncorrectCase, someCluster, defaultNamespace); Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey)); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace.toUpperCase(), someNotificationId); when(namespaceUtil.filterNamespaceName(namespaceWithIncorrectCase)).thenReturn(namespaceWithIncorrectCase); when(namespaceUtil.normalizeNamespace(appIdWithIncorrectCase, namespaceWithIncorrectCase)).thenReturn(defaultNamespace); when(watchKeysUtil .assembleAllWatchKeys(appIdWithIncorrectCase, someCluster, Sets.newHashSet(defaultNamespace), someDataCenter)).thenReturn(watchKeysMap); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(appIdWithIncorrectCase, someCluster, notificationAsString, someDataCenter, someClientIp); long someId = 1; ReleaseMessage someReleaseMessage = new ReleaseMessage(someMessage); someReleaseMessage.setId(someId); controller.handleMessage(someReleaseMessage, Topics.APOLLO_RELEASE_TOPIC); assertTrue(deferredResult.hasResult()); ResponseEntity<List<ApolloConfigNotification>> response = (ResponseEntity<List<ApolloConfigNotification>>) deferredResult.getResult(); assertEquals(1, response.getBody().size()); ApolloConfigNotification notification = response.getBody().get(0); assertEquals(HttpStatus.OK, response.getStatusCode()); assertEquals(namespaceWithIncorrectCase, notification.getNamespaceName()); assertEquals(someId, notification.getNotificationId()); ApolloNotificationMessages notificationMessages = notification.getMessages(); assertEquals(1, notificationMessages.getDetails().size()); assertEquals(someId, notificationMessages.get(someMessage).longValue()); } private String transformApolloConfigNotificationsToString( String namespace, long notificationId) { List<ApolloConfigNotification> notifications = Lists.newArrayList(assembleApolloConfigNotification(namespace, notificationId)); return gson.toJson(notifications); } private String transformApolloConfigNotificationsToString(String namespace, long notificationId, String anotherNamespace, long anotherNotificationId) { List<ApolloConfigNotification> notifications = Lists.newArrayList(assembleApolloConfigNotification(namespace, notificationId), assembleApolloConfigNotification(anotherNamespace, anotherNotificationId)); return gson.toJson(notifications); } private String transformApolloConfigNotificationsToString(String namespace, long notificationId, String anotherNamespace, long anotherNotificationId, String yetAnotherNamespace, long yetAnotherNotificationId) { List<ApolloConfigNotification> notifications = Lists.newArrayList(assembleApolloConfigNotification(namespace, notificationId), assembleApolloConfigNotification(anotherNamespace, anotherNotificationId), assembleApolloConfigNotification(yetAnotherNamespace, yetAnotherNotificationId)); return gson.toJson(notifications); } private ApolloConfigNotification assembleApolloConfigNotification(String namespace, long notificationId) { ApolloConfigNotification notification = new ApolloConfigNotification(namespace, notificationId); return notification; } private Multimap<String, String> assembleMultiMap(String key, Iterable<String> values) { Multimap<String, String> multimap = HashMultimap.create(); multimap.putAll(key, values); return multimap; } private void assertWatchKeys(Multimap<String, String> watchKeysMap, DeferredResult deferredResult) { for (String watchKey : watchKeysMap.values()) { Collection<DeferredResultWrapper> deferredResultWrappers = deferredResults.get(watchKey); boolean found = false; for (DeferredResultWrapper wrapper: deferredResultWrappers) { if (Objects.equals(wrapper.getResult(), deferredResult)) { found = true; } } assertTrue(found); } } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.configservice.controller; import com.ctrip.framework.apollo.biz.config.BizConfig; import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; import com.ctrip.framework.apollo.biz.message.Topics; import com.ctrip.framework.apollo.biz.utils.EntityManagerUtil; import com.ctrip.framework.apollo.configservice.service.ReleaseMessageServiceWithCache; import com.ctrip.framework.apollo.configservice.util.NamespaceUtil; import com.ctrip.framework.apollo.configservice.util.WatchKeysUtil; import com.ctrip.framework.apollo.configservice.wrapper.DeferredResultWrapper; import com.ctrip.framework.apollo.core.ConfigConsts; import com.ctrip.framework.apollo.core.dto.ApolloConfigNotification; import com.ctrip.framework.apollo.core.dto.ApolloNotificationMessages; import com.google.common.base.Joiner; import com.google.common.collect.HashMultimap; import com.google.common.collect.Lists; import com.google.common.collect.Multimap; import com.google.common.collect.Sets; import com.google.gson.Gson; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.web.context.request.async.DeferredResult; import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.concurrent.TimeUnit; import static org.awaitility.Awaitility.await; import static org.junit.Assert.*; import static org.mockito.Mockito.*; /** * @author Jason Song(song_s@ctrip.com) */ @RunWith(MockitoJUnitRunner.class) public class NotificationControllerV2Test { private NotificationControllerV2 controller; private String someAppId; private String someCluster; private String defaultCluster; private String defaultNamespace; private String somePublicNamespace; private String someDataCenter; private long someNotificationId; private String someClientIp; @Mock private ReleaseMessageServiceWithCache releaseMessageService; @Mock private EntityManagerUtil entityManagerUtil; @Mock private NamespaceUtil namespaceUtil; @Mock private WatchKeysUtil watchKeysUtil; @Mock private BizConfig bizConfig; private Gson gson; private Multimap<String, DeferredResultWrapper> deferredResults; @Before public void setUp() throws Exception { gson = new Gson(); controller = new NotificationControllerV2( watchKeysUtil, releaseMessageService, entityManagerUtil, namespaceUtil, gson, bizConfig ); when(bizConfig.releaseMessageNotificationBatch()).thenReturn(100); when(bizConfig.releaseMessageNotificationBatchIntervalInMilli()).thenReturn(5); someAppId = "someAppId"; someCluster = "someCluster"; defaultCluster = ConfigConsts.CLUSTER_NAME_DEFAULT; defaultNamespace = ConfigConsts.NAMESPACE_APPLICATION; somePublicNamespace = "somePublicNamespace"; someDataCenter = "someDC"; someNotificationId = 1; someClientIp = "someClientIp"; when(namespaceUtil.filterNamespaceName(defaultNamespace)).thenReturn(defaultNamespace); when(namespaceUtil.filterNamespaceName(somePublicNamespace)).thenReturn(somePublicNamespace); when(namespaceUtil.normalizeNamespace(someAppId, defaultNamespace)).thenReturn(defaultNamespace); when(namespaceUtil.normalizeNamespace(someAppId, somePublicNamespace)).thenReturn(somePublicNamespace); deferredResults = (Multimap<String, DeferredResultWrapper>) ReflectionTestUtils.getField(controller, "deferredResults"); } @Test public void testPollNotificationWithDefaultNamespace() throws Exception { String someWatchKey = "someKey"; String anotherWatchKey = "anotherKey"; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey, anotherWatchKey)); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace, someNotificationId); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace), someDataCenter)).thenReturn( watchKeysMap); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); assertEquals(watchKeysMap.size(), deferredResults.size()); assertWatchKeys(watchKeysMap, deferredResult); } @Test public void testPollNotificationWithDefaultNamespaceAsFile() throws Exception { String namespace = String.format("%s.%s", defaultNamespace, "properties"); when(namespaceUtil.filterNamespaceName(namespace)).thenReturn(defaultNamespace); String someWatchKey = "someKey"; String anotherWatchKey = "anotherKey"; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey, anotherWatchKey)); String notificationAsString = transformApolloConfigNotificationsToString(namespace, someNotificationId); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace), someDataCenter)).thenReturn( watchKeysMap); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); assertEquals(watchKeysMap.size(), deferredResults.size()); assertWatchKeys(watchKeysMap, deferredResult); } @Test public void testPollNotificationWithMultipleNamespaces() throws Exception { String defaultNamespaceAsFile = defaultNamespace + ".properties"; String somePublicNamespaceAsFile = somePublicNamespace + ".xml"; when(namespaceUtil.filterNamespaceName(defaultNamespaceAsFile)).thenReturn(defaultNamespace); when(namespaceUtil.filterNamespaceName(somePublicNamespaceAsFile)).thenReturn(somePublicNamespaceAsFile); when(namespaceUtil.normalizeNamespace(someAppId, somePublicNamespaceAsFile)).thenReturn(somePublicNamespaceAsFile); String someWatchKey = "someKey"; String anotherWatchKey = "anotherKey"; String somePublicWatchKey = "somePublicWatchKey"; String somePublicFileWatchKey = "somePublicFileWatchKey"; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey, anotherWatchKey)); watchKeysMap .putAll(assembleMultiMap(somePublicNamespace, Lists.newArrayList(somePublicWatchKey))); watchKeysMap .putAll(assembleMultiMap(somePublicNamespaceAsFile, Lists.newArrayList(somePublicFileWatchKey))); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespaceAsFile, someNotificationId, somePublicNamespace, someNotificationId, somePublicNamespaceAsFile, someNotificationId); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace, somePublicNamespace, somePublicNamespaceAsFile), someDataCenter)).thenReturn( watchKeysMap); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); assertEquals(watchKeysMap.size(), deferredResults.size()); assertWatchKeys(watchKeysMap, deferredResult); verify(watchKeysUtil, times(1)).assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace, somePublicNamespace, somePublicNamespaceAsFile), someDataCenter); } @Test public void testPollNotificationWithMultipleNamespaceWithNotificationIdOutDated() throws Exception { String someWatchKey = "someKey"; String anotherWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, somePublicNamespace); String yetAnotherWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, defaultCluster, somePublicNamespace); long notificationId = someNotificationId + 1; long yetAnotherNotificationId = someNotificationId; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey)); watchKeysMap .putAll(assembleMultiMap(somePublicNamespace, Lists.newArrayList(anotherWatchKey, yetAnotherWatchKey))); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace, somePublicNamespace), someDataCenter)).thenReturn( watchKeysMap); ReleaseMessage someReleaseMessage = mock(ReleaseMessage.class); when(someReleaseMessage.getId()).thenReturn(notificationId); when(someReleaseMessage.getMessage()).thenReturn(anotherWatchKey); ReleaseMessage yetAnotherReleaseMessage = mock(ReleaseMessage.class); when(yetAnotherReleaseMessage.getId()).thenReturn(yetAnotherNotificationId); when(yetAnotherReleaseMessage.getMessage()).thenReturn(yetAnotherWatchKey); when(releaseMessageService .findLatestReleaseMessagesGroupByMessages(Sets.newHashSet(watchKeysMap.values()))) .thenReturn(Lists.newArrayList(someReleaseMessage, yetAnotherReleaseMessage)); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace, someNotificationId, somePublicNamespace, someNotificationId); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); ResponseEntity<List<ApolloConfigNotification>> result = (ResponseEntity<List<ApolloConfigNotification>>) deferredResult.getResult(); assertEquals(HttpStatus.OK, result.getStatusCode()); assertEquals(1, result.getBody().size()); assertEquals(somePublicNamespace, result.getBody().get(0).getNamespaceName()); assertEquals(notificationId, result.getBody().get(0).getNotificationId()); ApolloNotificationMessages notificationMessages = result.getBody().get(0).getMessages(); assertEquals(2, notificationMessages.getDetails().size()); assertEquals(notificationId, notificationMessages.get(anotherWatchKey).longValue()); assertEquals(yetAnotherNotificationId, notificationMessages.get(yetAnotherWatchKey).longValue()); } @Test public void testPollNotificationWithMultipleNamespacesAndHandleMessage() throws Exception { String someWatchKey = "someKey"; String anotherWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, somePublicNamespace); Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey)); watchKeysMap .putAll(assembleMultiMap(somePublicNamespace, Lists.newArrayList(anotherWatchKey))); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace, somePublicNamespace), someDataCenter)).thenReturn( watchKeysMap); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace, someNotificationId, somePublicNamespace, someNotificationId); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); assertEquals(watchKeysMap.size(), deferredResults.size()); long someId = 1; ReleaseMessage someReleaseMessage = new ReleaseMessage(anotherWatchKey); someReleaseMessage.setId(someId); controller.handleMessage(someReleaseMessage, Topics.APOLLO_RELEASE_TOPIC); ResponseEntity<List<ApolloConfigNotification>> response = (ResponseEntity<List<ApolloConfigNotification>>) deferredResult.getResult(); assertEquals(1, response.getBody().size()); ApolloConfigNotification notification = response.getBody().get(0); assertEquals(HttpStatus.OK, response.getStatusCode()); assertEquals(somePublicNamespace, notification.getNamespaceName()); assertEquals(someId, notification.getNotificationId()); ApolloNotificationMessages notificationMessages = response.getBody().get(0).getMessages(); assertEquals(1, notificationMessages.getDetails().size()); assertEquals(someId, notificationMessages.get(anotherWatchKey).longValue()); } @Test public void testPollNotificationWithHandleMessageInBatch() throws Exception { String someWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, defaultNamespace); int someBatch = 1; int someBatchInterval = 10; Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey)); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace, someNotificationId); when(watchKeysUtil .assembleAllWatchKeys(someAppId, someCluster, Sets.newHashSet(defaultNamespace), someDataCenter)).thenReturn(watchKeysMap); when(bizConfig.releaseMessageNotificationBatch()).thenReturn(someBatch); when(bizConfig.releaseMessageNotificationBatchIntervalInMilli()).thenReturn(someBatchInterval); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> anotherDeferredResult = controller .pollNotification(someAppId, someCluster, notificationAsString, someDataCenter, someClientIp); long someId = 1; ReleaseMessage someReleaseMessage = new ReleaseMessage(someWatchKey); someReleaseMessage.setId(someId); controller.handleMessage(someReleaseMessage, Topics.APOLLO_RELEASE_TOPIC); //in batch mode, at most one of them should have result assertFalse(deferredResult.hasResult() && anotherDeferredResult.hasResult()); //now both of them should have result await().atMost(someBatchInterval * 500, TimeUnit.MILLISECONDS).untilAsserted( () -> assertTrue(deferredResult.hasResult() && anotherDeferredResult.hasResult())); } @Test public void testPollNotificationWithIncorrectCase() throws Exception { String appIdWithIncorrectCase = someAppId.toUpperCase(); String namespaceWithIncorrectCase = defaultNamespace.toUpperCase(); String someMessage = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(someAppId, someCluster, defaultNamespace); String someWatchKey = Joiner.on(ConfigConsts.CLUSTER_NAMESPACE_SEPARATOR) .join(appIdWithIncorrectCase, someCluster, defaultNamespace); Multimap<String, String> watchKeysMap = assembleMultiMap(defaultNamespace, Lists.newArrayList(someWatchKey)); String notificationAsString = transformApolloConfigNotificationsToString(defaultNamespace.toUpperCase(), someNotificationId); when(namespaceUtil.filterNamespaceName(namespaceWithIncorrectCase)).thenReturn(namespaceWithIncorrectCase); when(namespaceUtil.normalizeNamespace(appIdWithIncorrectCase, namespaceWithIncorrectCase)).thenReturn(defaultNamespace); when(watchKeysUtil .assembleAllWatchKeys(appIdWithIncorrectCase, someCluster, Sets.newHashSet(defaultNamespace), someDataCenter)).thenReturn(watchKeysMap); DeferredResult<ResponseEntity<List<ApolloConfigNotification>>> deferredResult = controller .pollNotification(appIdWithIncorrectCase, someCluster, notificationAsString, someDataCenter, someClientIp); long someId = 1; ReleaseMessage someReleaseMessage = new ReleaseMessage(someMessage); someReleaseMessage.setId(someId); controller.handleMessage(someReleaseMessage, Topics.APOLLO_RELEASE_TOPIC); assertTrue(deferredResult.hasResult()); ResponseEntity<List<ApolloConfigNotification>> response = (ResponseEntity<List<ApolloConfigNotification>>) deferredResult.getResult(); assertEquals(1, response.getBody().size()); ApolloConfigNotification notification = response.getBody().get(0); assertEquals(HttpStatus.OK, response.getStatusCode()); assertEquals(namespaceWithIncorrectCase, notification.getNamespaceName()); assertEquals(someId, notification.getNotificationId()); ApolloNotificationMessages notificationMessages = notification.getMessages(); assertEquals(1, notificationMessages.getDetails().size()); assertEquals(someId, notificationMessages.get(someMessage).longValue()); } private String transformApolloConfigNotificationsToString( String namespace, long notificationId) { List<ApolloConfigNotification> notifications = Lists.newArrayList(assembleApolloConfigNotification(namespace, notificationId)); return gson.toJson(notifications); } private String transformApolloConfigNotificationsToString(String namespace, long notificationId, String anotherNamespace, long anotherNotificationId) { List<ApolloConfigNotification> notifications = Lists.newArrayList(assembleApolloConfigNotification(namespace, notificationId), assembleApolloConfigNotification(anotherNamespace, anotherNotificationId)); return gson.toJson(notifications); } private String transformApolloConfigNotificationsToString(String namespace, long notificationId, String anotherNamespace, long anotherNotificationId, String yetAnotherNamespace, long yetAnotherNotificationId) { List<ApolloConfigNotification> notifications = Lists.newArrayList(assembleApolloConfigNotification(namespace, notificationId), assembleApolloConfigNotification(anotherNamespace, anotherNotificationId), assembleApolloConfigNotification(yetAnotherNamespace, yetAnotherNotificationId)); return gson.toJson(notifications); } private ApolloConfigNotification assembleApolloConfigNotification(String namespace, long notificationId) { ApolloConfigNotification notification = new ApolloConfigNotification(namespace, notificationId); return notification; } private Multimap<String, String> assembleMultiMap(String key, Iterable<String> values) { Multimap<String, String> multimap = HashMultimap.create(); multimap.putAll(key, values); return multimap; } private void assertWatchKeys(Multimap<String, String> watchKeysMap, DeferredResult deferredResult) { for (String watchKey : watchKeysMap.values()) { Collection<DeferredResultWrapper> deferredResultWrappers = deferredResults.get(watchKey); boolean found = false; for (DeferredResultWrapper wrapper: deferredResultWrappers) { if (Objects.equals(wrapper.getResult(), deferredResult)) { found = true; } } assertTrue(found); } } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/main/java/com/ctrip/framework/apollo/internals/JsonConfigFile.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.internals; import com.ctrip.framework.apollo.core.enums.ConfigFileFormat; /** * @author Jason Song(song_s@ctrip.com) */ public class JsonConfigFile extends PlainTextConfigFile { public JsonConfigFile(String namespace, ConfigRepository configRepository) { super(namespace, configRepository); } @Override public ConfigFileFormat getConfigFileFormat() { return ConfigFileFormat.JSON; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.internals; import com.ctrip.framework.apollo.core.enums.ConfigFileFormat; /** * @author Jason Song(song_s@ctrip.com) */ public class JsonConfigFile extends PlainTextConfigFile { public JsonConfigFile(String namespace, ConfigRepository configRepository) { super(namespace, configRepository); } @Override public ConfigFileFormat getConfigFileFormat() { return ConfigFileFormat.JSON; } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/en/development/portal-how-to-implement-user-login-function.md
TODO
TODO
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/test/java/com/ctrip/framework/apollo/core/enums/EnvUtilsTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.core.enums; import static org.junit.Assert.*; import org.junit.Test; public class EnvUtilsTest { @Test public void testTransformEnv() throws Exception { assertEquals(Env.DEV, EnvUtils.transformEnv(Env.DEV.name())); assertEquals(Env.FAT, EnvUtils.transformEnv(Env.FAT.name().toLowerCase())); assertEquals(Env.UAT, EnvUtils.transformEnv(" " + Env.UAT.name().toUpperCase() + "")); assertEquals(Env.UNKNOWN, EnvUtils.transformEnv("someInvalidEnv")); } @Test public void testFromString() throws Exception { assertEquals(Env.DEV, Env.fromString(Env.DEV.name())); assertEquals(Env.FAT, Env.fromString(Env.FAT.name().toLowerCase())); assertEquals(Env.UAT, Env.fromString(" " + Env.UAT.name().toUpperCase() + "")); } @Test(expected = IllegalArgumentException.class) public void testFromInvalidString() throws Exception { Env.fromString("someInvalidEnv"); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.core.enums; import static org.junit.Assert.*; import org.junit.Test; public class EnvUtilsTest { @Test public void testTransformEnv() throws Exception { assertEquals(Env.DEV, EnvUtils.transformEnv(Env.DEV.name())); assertEquals(Env.FAT, EnvUtils.transformEnv(Env.FAT.name().toLowerCase())); assertEquals(Env.UAT, EnvUtils.transformEnv(" " + Env.UAT.name().toUpperCase() + "")); assertEquals(Env.UNKNOWN, EnvUtils.transformEnv("someInvalidEnv")); } @Test public void testFromString() throws Exception { assertEquals(Env.DEV, Env.fromString(Env.DEV.name())); assertEquals(Env.FAT, Env.fromString(Env.FAT.name().toLowerCase())); assertEquals(Env.UAT, Env.fromString(" " + Env.UAT.name().toUpperCase() + "")); } @Test(expected = IllegalArgumentException.class) public void testFromInvalidString() throws Exception { Env.fromString("someInvalidEnv"); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/customize/BizLoggingCustomizer.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.customize; import com.ctrip.framework.apollo.biz.config.BizConfig; import com.ctrip.framework.apollo.common.customize.LoggingCustomizer; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; @Component @Profile("ctrip") public class BizLoggingCustomizer extends LoggingCustomizer{ private final BizConfig bizConfig; public BizLoggingCustomizer(final BizConfig bizConfig) { this.bizConfig = bizConfig; } @Override protected String cloggingUrl() { return bizConfig.cloggingUrl(); } @Override protected String cloggingPort() { return bizConfig.cloggingPort(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.customize; import com.ctrip.framework.apollo.biz.config.BizConfig; import com.ctrip.framework.apollo.common.customize.LoggingCustomizer; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; @Component @Profile("ctrip") public class BizLoggingCustomizer extends LoggingCustomizer{ private final BizConfig bizConfig; public BizLoggingCustomizer(final BizConfig bizConfig) { this.bizConfig = bizConfig; } @Override protected String cloggingUrl() { return bizConfig.cloggingUrl(); } @Override protected String cloggingPort() { return bizConfig.cloggingPort(); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/CachedCompositePropertySource.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.spring.config; import com.ctrip.framework.apollo.ConfigChangeListener; import com.ctrip.framework.apollo.model.ConfigChangeEvent; import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.PropertySource; /** * @author Shawyeok (shawyeok@outlook.com) */ public class CachedCompositePropertySource extends CompositePropertySource implements ConfigChangeListener { private volatile String[] names; public CachedCompositePropertySource(String name) { super(name); } @Override public String[] getPropertyNames() { String[] propertyNames = this.names; if (propertyNames == null) { this.names = propertyNames = super.getPropertyNames(); } return propertyNames; } @Override public void addPropertySource(PropertySource<?> propertySource) { super.addPropertySource(propertySource); if (propertySource instanceof ConfigPropertySource) { ((ConfigPropertySource) propertySource).addChangeListener(this); } } @Override public void addFirstPropertySource(PropertySource<?> propertySource) { super.addFirstPropertySource(propertySource); if (propertySource instanceof ConfigPropertySource) { ((ConfigPropertySource) propertySource).addChangeListener(this); } } @Override public void onChange(ConfigChangeEvent changeEvent) { // clear property names cache if any sources has changed this.names = null; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.spring.config; import com.ctrip.framework.apollo.ConfigChangeListener; import com.ctrip.framework.apollo.model.ConfigChangeEvent; import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.PropertySource; /** * @author Shawyeok (shawyeok@outlook.com) */ public class CachedCompositePropertySource extends CompositePropertySource implements ConfigChangeListener { private volatile String[] names; public CachedCompositePropertySource(String name) { super(name); } @Override public String[] getPropertyNames() { String[] propertyNames = this.names; if (propertyNames == null) { this.names = propertyNames = super.getPropertyNames(); } return propertyNames; } @Override public void addPropertySource(PropertySource<?> propertySource) { super.addPropertySource(propertySource); if (propertySource instanceof ConfigPropertySource) { ((ConfigPropertySource) propertySource).addChangeListener(this); } } @Override public void addFirstPropertySource(PropertySource<?> propertySource) { super.addFirstPropertySource(propertySource); if (propertySource instanceof ConfigPropertySource) { ((ConfigPropertySource) propertySource).addChangeListener(this); } } @Override public void onChange(ConfigChangeEvent changeEvent) { // clear property names cache if any sources has changed this.names = null; } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/AppNamespaceRepository.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.repository; import com.ctrip.framework.apollo.common.entity.AppNamespace; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import java.util.List; import java.util.Set; public interface AppNamespaceRepository extends PagingAndSortingRepository<AppNamespace, Long>{ AppNamespace findByAppIdAndName(String appId, String namespaceName); List<AppNamespace> findByAppIdAndNameIn(String appId, Set<String> namespaceNames); AppNamespace findByNameAndIsPublicTrue(String namespaceName); List<AppNamespace> findByNameInAndIsPublicTrue(Set<String> namespaceNames); List<AppNamespace> findByAppIdAndIsPublic(String appId, boolean isPublic); List<AppNamespace> findByAppId(String appId); List<AppNamespace> findFirst500ByIdGreaterThanOrderByIdAsc(long id); @Modifying @Query("UPDATE AppNamespace SET IsDeleted=1,DataChange_LastModifiedBy = ?2 WHERE AppId=?1") int batchDeleteByAppId(String appId, String operator); @Modifying @Query("UPDATE AppNamespace SET IsDeleted=1,DataChange_LastModifiedBy = ?3 WHERE AppId=?1 and Name = ?2") int delete(String appId, String namespaceName, String operator); }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.repository; import com.ctrip.framework.apollo.common.entity.AppNamespace; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import java.util.List; import java.util.Set; public interface AppNamespaceRepository extends PagingAndSortingRepository<AppNamespace, Long>{ AppNamespace findByAppIdAndName(String appId, String namespaceName); List<AppNamespace> findByAppIdAndNameIn(String appId, Set<String> namespaceNames); AppNamespace findByNameAndIsPublicTrue(String namespaceName); List<AppNamespace> findByNameInAndIsPublicTrue(Set<String> namespaceNames); List<AppNamespace> findByAppIdAndIsPublic(String appId, boolean isPublic); List<AppNamespace> findByAppId(String appId); List<AppNamespace> findFirst500ByIdGreaterThanOrderByIdAsc(long id); @Modifying @Query("UPDATE AppNamespace SET IsDeleted=1,DataChange_LastModifiedBy = ?2 WHERE AppId=?1") int batchDeleteByAppId(String appId, String operator); @Modifying @Query("UPDATE AppNamespace SET IsDeleted=1,DataChange_LastModifiedBy = ?3 WHERE AppId=?1 and Name = ?2") int delete(String appId, String namespaceName, String operator); }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/util/AccessKeyUtilTest.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.configservice.util; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import com.ctrip.framework.apollo.configservice.service.AccessKeyServiceWithCache; import com.google.common.collect.Lists; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; /** * @author nisiyong */ @RunWith(MockitoJUnitRunner.class) public class AccessKeyUtilTest { private AccessKeyUtil accessKeyUtil; @Mock private AccessKeyServiceWithCache accessKeyServiceWithCache; @Mock private HttpServletRequest request; @Before public void setUp() { accessKeyUtil = new AccessKeyUtil(accessKeyServiceWithCache); } @Test public void testFindAvailableSecret() { String appId = "someAppId"; List<String> returnSecrets = Lists.newArrayList("someSecret"); when(accessKeyServiceWithCache.getAvailableSecrets(appId)).thenReturn(returnSecrets); List<String> availableSecret = accessKeyUtil.findAvailableSecret(appId); assertThat(availableSecret).containsExactly("someSecret"); verify(accessKeyServiceWithCache).getAvailableSecrets(appId); } @Test public void testExtractAppIdFromRequest1() { when(request.getServletPath()).thenReturn("/configs/someAppId/default/application"); String appId = accessKeyUtil.extractAppIdFromRequest(request); assertThat(appId).isEqualTo("someAppId"); } @Test public void testExtractAppIdFromRequest2() { when(request.getServletPath()).thenReturn("/configfiles/json/someAppId/default/application"); String appId = accessKeyUtil.extractAppIdFromRequest(request); assertThat(appId).isEqualTo("someAppId"); } @Test public void testExtractAppIdFromRequest3() { when(request.getServletPath()).thenReturn("/configfiles/someAppId/default/application"); String appId = accessKeyUtil.extractAppIdFromRequest(request); assertThat(appId).isEqualTo("someAppId"); } @Test public void testExtractAppIdFromRequest4() { when(request.getServletPath()).thenReturn("/notifications/v2"); when(request.getParameter("appId")).thenReturn("someAppId"); String appId = accessKeyUtil.extractAppIdFromRequest(request); assertThat(appId).isEqualTo("someAppId"); } @Test public void buildSignature() { String path = "/configs/someAppId/default/application"; String query = "ip=10.0.0.1"; String timestamp = "1575018989200"; String secret = "someSecret"; String actualSignature = accessKeyUtil.buildSignature(path, query, timestamp, secret); String expectedSignature = "WYjjyJFei6DYiaMlwZjew2O/Yqk="; assertThat(actualSignature).isEqualTo(expectedSignature); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.configservice.util; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import com.ctrip.framework.apollo.configservice.service.AccessKeyServiceWithCache; import com.google.common.collect.Lists; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; /** * @author nisiyong */ @RunWith(MockitoJUnitRunner.class) public class AccessKeyUtilTest { private AccessKeyUtil accessKeyUtil; @Mock private AccessKeyServiceWithCache accessKeyServiceWithCache; @Mock private HttpServletRequest request; @Before public void setUp() { accessKeyUtil = new AccessKeyUtil(accessKeyServiceWithCache); } @Test public void testFindAvailableSecret() { String appId = "someAppId"; List<String> returnSecrets = Lists.newArrayList("someSecret"); when(accessKeyServiceWithCache.getAvailableSecrets(appId)).thenReturn(returnSecrets); List<String> availableSecret = accessKeyUtil.findAvailableSecret(appId); assertThat(availableSecret).containsExactly("someSecret"); verify(accessKeyServiceWithCache).getAvailableSecrets(appId); } @Test public void testExtractAppIdFromRequest1() { when(request.getServletPath()).thenReturn("/configs/someAppId/default/application"); String appId = accessKeyUtil.extractAppIdFromRequest(request); assertThat(appId).isEqualTo("someAppId"); } @Test public void testExtractAppIdFromRequest2() { when(request.getServletPath()).thenReturn("/configfiles/json/someAppId/default/application"); String appId = accessKeyUtil.extractAppIdFromRequest(request); assertThat(appId).isEqualTo("someAppId"); } @Test public void testExtractAppIdFromRequest3() { when(request.getServletPath()).thenReturn("/configfiles/someAppId/default/application"); String appId = accessKeyUtil.extractAppIdFromRequest(request); assertThat(appId).isEqualTo("someAppId"); } @Test public void testExtractAppIdFromRequest4() { when(request.getServletPath()).thenReturn("/notifications/v2"); when(request.getParameter("appId")).thenReturn("someAppId"); String appId = accessKeyUtil.extractAppIdFromRequest(request); assertThat(appId).isEqualTo("someAppId"); } @Test public void buildSignature() { String path = "/configs/someAppId/default/application"; String query = "ip=10.0.0.1"; String timestamp = "1575018989200"; String secret = "someSecret"; String actualSignature = accessKeyUtil.buildSignature(path, query, timestamp, secret); String expectedSignature = "WYjjyJFei6DYiaMlwZjew2O/Yqk="; assertThat(actualSignature).isEqualTo(expectedSignature); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Instance.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.entity; import com.google.common.base.MoreObjects; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.PrePersist; import javax.persistence.Table; /** * @author Jason Song(song_s@ctrip.com) */ @Entity @Table(name = "Instance") public class Instance { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "Id") private long id; @Column(name = "AppId", nullable = false) private String appId; @Column(name = "ClusterName", nullable = false) private String clusterName; @Column(name = "DataCenter", nullable = false) private String dataCenter; @Column(name = "Ip", nullable = false) private String ip; @Column(name = "DataChange_CreatedTime", nullable = false) private Date dataChangeCreatedTime; @Column(name = "DataChange_LastTime") private Date dataChangeLastModifiedTime; @PrePersist protected void prePersist() { if (this.dataChangeCreatedTime == null) { dataChangeCreatedTime = new Date(); } if (this.dataChangeLastModifiedTime == null) { dataChangeLastModifiedTime = dataChangeCreatedTime; } } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } public String getClusterName() { return clusterName; } public void setClusterName(String clusterName) { this.clusterName = clusterName; } public String getDataCenter() { return dataCenter; } public void setDataCenter(String dataCenter) { this.dataCenter = dataCenter; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public Date getDataChangeCreatedTime() { return dataChangeCreatedTime; } public void setDataChangeCreatedTime(Date dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } public Date getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } public void setDataChangeLastModifiedTime(Date dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } @Override public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("id", id) .add("appId", appId) .add("clusterName", clusterName) .add("dataCenter", dataCenter) .add("ip", ip) .add("dataChangeCreatedTime", dataChangeCreatedTime) .add("dataChangeLastModifiedTime", dataChangeLastModifiedTime) .toString(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.entity; import com.google.common.base.MoreObjects; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.PrePersist; import javax.persistence.Table; /** * @author Jason Song(song_s@ctrip.com) */ @Entity @Table(name = "Instance") public class Instance { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "Id") private long id; @Column(name = "AppId", nullable = false) private String appId; @Column(name = "ClusterName", nullable = false) private String clusterName; @Column(name = "DataCenter", nullable = false) private String dataCenter; @Column(name = "Ip", nullable = false) private String ip; @Column(name = "DataChange_CreatedTime", nullable = false) private Date dataChangeCreatedTime; @Column(name = "DataChange_LastTime") private Date dataChangeLastModifiedTime; @PrePersist protected void prePersist() { if (this.dataChangeCreatedTime == null) { dataChangeCreatedTime = new Date(); } if (this.dataChangeLastModifiedTime == null) { dataChangeLastModifiedTime = dataChangeCreatedTime; } } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } public String getClusterName() { return clusterName; } public void setClusterName(String clusterName) { this.clusterName = clusterName; } public String getDataCenter() { return dataCenter; } public void setDataCenter(String dataCenter) { this.dataCenter = dataCenter; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public Date getDataChangeCreatedTime() { return dataChangeCreatedTime; } public void setDataChangeCreatedTime(Date dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } public Date getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; } public void setDataChangeLastModifiedTime(Date dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } @Override public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("id", id) .add("appId", appId) .add("clusterName", clusterName) .add("dataCenter", dataCenter) .add("ip", ip) .add("dataChangeCreatedTime", dataChangeCreatedTime) .add("dataChangeLastModifiedTime", dataChangeLastModifiedTime) .toString(); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/vo/NamespaceEnvRolesAssignedUsers.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.entity.vo; import com.ctrip.framework.apollo.portal.environment.Env; public class NamespaceEnvRolesAssignedUsers extends NamespaceRolesAssignedUsers { private String env; public Env getEnv() { return Env.valueOf(env); } public void setEnv(Env env) { this.env = env.toString(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.entity.vo; import com.ctrip.framework.apollo.portal.environment.Env; public class NamespaceEnvRolesAssignedUsers extends NamespaceRolesAssignedUsers { private String env; public Env getEnv() { return Env.valueOf(env); } public void setEnv(Env env) { this.env = env.toString(); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/test/resources/META-INF/services/com.ctrip.framework.foundation.internals.ServiceBootstrapTest$Interface1
com.ctrip.framework.foundation.internals.ServiceBootstrapTest$Interface1Impl
com.ctrip.framework.foundation.internals.ServiceBootstrapTest$Interface1Impl
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/test/resources/controller/test-release.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('someAppId','someAppName','someOwnerName','someOwnerName@ctrip.com'); INSERT INTO Cluster (AppId, Name) VALUES ('someAppId', 'default'); INSERT INTO AppNamespace (AppId, Name) VALUES ('someAppId', 'application'); INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (100, 'someAppId', 'default', 'application'); INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k1', 'v1', 'comment1'); INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k2', 'v2', 'comment1'); INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k3', 'v3', 'comment1');
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO App (AppId, Name, OwnerName, OwnerEmail) VALUES ('someAppId','someAppName','someOwnerName','someOwnerName@ctrip.com'); INSERT INTO Cluster (AppId, Name) VALUES ('someAppId', 'default'); INSERT INTO AppNamespace (AppId, Name) VALUES ('someAppId', 'application'); INSERT INTO Namespace (Id, AppId, ClusterName, NamespaceName) VALUES (100, 'someAppId', 'default', 'application'); INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k1', 'v1', 'comment1'); INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k2', 'v2', 'comment1'); INSERT INTO Item (NamespaceId, `Key`, Value, Comment) VALUES (100, 'k3', 'v3', 'comment1');
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/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(d[eU~ʼ'U͐ _uѪ1jIV}%H*A whK wh XBA = !\ }AtAgQW!HNҨ + :q4 p+ :q4 p+ :q4 p+ :q4 p+ :q4 [nCS]A7Ly^/?"HMArl'@#@? dx$p^x9=A,^Arl'@#@? dx$p^x9=A,^Arl'@#N.d[$6ָ! 2A5.oAB o#@m"@.d[_wYxD @ _n-d]G$B:YW2AU.pA"̮#@u !@-d]G$B:YW2AU.pA"̮#P.&oʼ'~RyO<!A-Ur?Uc% UKDU$$j AE$*A}yz:AB.&%<)\I"H2BFQWAui AWAui AWAui AWAui AWAui AqUÜ}[Oit<y Y@8䋀C$B:YW2AU.pA"̮#@u !@-d]G$B:YW2AU.pA"̮#@u !@- "IENDB`
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./.mvn/wrapper/maven-wrapper.properties
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.entity; import com.ctrip.framework.apollo.common.entity.BaseEntity; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Lob; import javax.persistence.Table; @Entity @Table(name = "Commit") @SQLDelete(sql = "Update Commit set isDeleted = 1 where id = ?") @Where(clause = "isDeleted = 0") public class Commit extends BaseEntity { @Lob @Column(name = "ChangeSets", nullable = false) private String changeSets; @Column(name = "AppId", nullable = false) private String appId; @Column(name = "ClusterName", nullable = false) private String clusterName; @Column(name = "NamespaceName", nullable = false) private String namespaceName; @Column(name = "Comment") private String comment; public String getChangeSets() { return changeSets; } public void setChangeSets(String changeSets) { this.changeSets = changeSets; } public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } public String getClusterName() { return clusterName; } public void setClusterName(String clusterName) { this.clusterName = clusterName; } public String getNamespaceName() { return namespaceName; } public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } @Override public String toString() { return toStringHelper().add("changeSets", changeSets).add("appId", appId).add("clusterName", clusterName) .add("namespaceName", namespaceName).add("comment", comment).toString(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.entity; import com.ctrip.framework.apollo.common.entity.BaseEntity; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Lob; import javax.persistence.Table; @Entity @Table(name = "Commit") @SQLDelete(sql = "Update Commit set isDeleted = 1 where id = ?") @Where(clause = "isDeleted = 0") public class Commit extends BaseEntity { @Lob @Column(name = "ChangeSets", nullable = false) private String changeSets; @Column(name = "AppId", nullable = false) private String appId; @Column(name = "ClusterName", nullable = false) private String clusterName; @Column(name = "NamespaceName", nullable = false) private String namespaceName; @Column(name = "Comment") private String comment; public String getChangeSets() { return changeSets; } public void setChangeSets(String changeSets) { this.changeSets = changeSets; } public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } public String getClusterName() { return clusterName; } public void setClusterName(String clusterName) { this.clusterName = clusterName; } public String getNamespaceName() { return namespaceName; } public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } @Override public String toString() { return toStringHelper().add("changeSets", changeSets).add("appId", appId).add("clusterName", clusterName) .add("namespaceName", namespaceName).add("comment", comment).toString(); } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/main/java/com/ctrip/framework/apollo/tracer/internals/cat/CatTransaction.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.tracer.internals.cat; import com.ctrip.framework.apollo.tracer.spi.Transaction; import java.lang.reflect.Method; /** * @author Jason Song(song_s@ctrip.com) */ public class CatTransaction implements Transaction { private static Class CAT_TRANSACTION_CLASS; private static Method SET_STATUS_WITH_STRING; private static Method SET_STATUS_WITH_THROWABLE; private static Method ADD_DATA_WITH_KEY_AND_VALUE; private static Method COMPLETE; private Object catTransaction; static { try { CAT_TRANSACTION_CLASS = Class.forName(CatNames.CAT_TRANSACTION_CLASS); SET_STATUS_WITH_STRING = CAT_TRANSACTION_CLASS.getMethod(CatNames.SET_STATUS_METHOD, String.class); SET_STATUS_WITH_THROWABLE = CAT_TRANSACTION_CLASS.getMethod(CatNames.SET_STATUS_METHOD, Throwable.class); ADD_DATA_WITH_KEY_AND_VALUE = CAT_TRANSACTION_CLASS.getMethod(CatNames.ADD_DATA_METHOD, String.class, Object.class); COMPLETE = CAT_TRANSACTION_CLASS.getMethod(CatNames.COMPLETE_METHOD); } catch (Throwable ex) { throw new IllegalStateException("Initialize Cat transaction failed", ex); } } static void init() { //do nothing, just to initialize the static variables } public CatTransaction(Object catTransaction) { this.catTransaction = catTransaction; } @Override public void setStatus(String status) { try { SET_STATUS_WITH_STRING.invoke(catTransaction, status); } catch (Throwable ex) { throw new IllegalStateException(ex); } } @Override public void setStatus(Throwable status) { try { SET_STATUS_WITH_THROWABLE.invoke(catTransaction, status); } catch (Throwable ex) { throw new IllegalStateException(ex); } } @Override public void addData(String key, Object value) { try { ADD_DATA_WITH_KEY_AND_VALUE.invoke(catTransaction, key, value); } catch (Throwable ex) { throw new IllegalStateException(ex); } } @Override public void complete() { try { COMPLETE.invoke(catTransaction); } catch (Throwable ex) { throw new IllegalStateException(ex); } } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.tracer.internals.cat; import com.ctrip.framework.apollo.tracer.spi.Transaction; import java.lang.reflect.Method; /** * @author Jason Song(song_s@ctrip.com) */ public class CatTransaction implements Transaction { private static Class CAT_TRANSACTION_CLASS; private static Method SET_STATUS_WITH_STRING; private static Method SET_STATUS_WITH_THROWABLE; private static Method ADD_DATA_WITH_KEY_AND_VALUE; private static Method COMPLETE; private Object catTransaction; static { try { CAT_TRANSACTION_CLASS = Class.forName(CatNames.CAT_TRANSACTION_CLASS); SET_STATUS_WITH_STRING = CAT_TRANSACTION_CLASS.getMethod(CatNames.SET_STATUS_METHOD, String.class); SET_STATUS_WITH_THROWABLE = CAT_TRANSACTION_CLASS.getMethod(CatNames.SET_STATUS_METHOD, Throwable.class); ADD_DATA_WITH_KEY_AND_VALUE = CAT_TRANSACTION_CLASS.getMethod(CatNames.ADD_DATA_METHOD, String.class, Object.class); COMPLETE = CAT_TRANSACTION_CLASS.getMethod(CatNames.COMPLETE_METHOD); } catch (Throwable ex) { throw new IllegalStateException("Initialize Cat transaction failed", ex); } } static void init() { //do nothing, just to initialize the static variables } public CatTransaction(Object catTransaction) { this.catTransaction = catTransaction; } @Override public void setStatus(String status) { try { SET_STATUS_WITH_STRING.invoke(catTransaction, status); } catch (Throwable ex) { throw new IllegalStateException(ex); } } @Override public void setStatus(Throwable status) { try { SET_STATUS_WITH_THROWABLE.invoke(catTransaction, status); } catch (Throwable ex) { throw new IllegalStateException(ex); } } @Override public void addData(String key, Object value) { try { ADD_DATA_WITH_KEY_AND_VALUE.invoke(catTransaction, key, value); } catch (Throwable ex) { throw new IllegalStateException(ex); } } @Override public void complete() { try { COMPLETE.invoke(catTransaction); } catch (Throwable ex) { throw new IllegalStateException(ex); } } }
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./doc/images/application-config-precedence.png
PNG  IHDR IDATx|{MKj1{/q\qNj'q$N8qލk0 S)w ! ^?opNB0X[fgfs;ޛ7o4]0HHHHH&=9HHHHHHHHHHB}۞ON$@$@$@$@B tcTqIHHHH $@$@$@$@$Ѝ P!ƍG'    * @7& p# sEeش9`P^д{ ˍy;i !3+؇HMI STԤxD/pRmv躎3Fcxt6DZ,0Z~:lU݉ 6:71 *a`. twneՀX46[э"LMܶ{;ؒWJܾJM&&SKA:gKq-n?~}]@03qy? NsO8.gՒ7jvEWN7=^N\Sۈ~oN<چN+<Ҟf!:ruXV矼s/\= qAx,> J`w? Xu&{)_i ]OSϛ{n9 B͉?"n ]R)4Oh}kV U{w3_Еߍqш2+&+<OD#:2BE*.6 ;B^>L={^;,a3DoUZ1-%AlV04[xfZUt3Ȅ([ln7S؟nńQeu{'gMs/Ͽ9Ξ9)I񭓶9ק  c@1XQVH@}CJʫQ_ߤ(FDeNq@+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M6jj?菇 ǚ% tWK2 %"sZpL’ "rIHHH  9!0D;:^,"N5 @W 0XR!PL( HuHHHHHP s 蹎ZuTc^#    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2I[סn@ɀH %U6§֬F@fMCRqlnUv8ݣɏ٧4a0Wt`MG#5cs<WL>c3W"gkvxgo#7?ɿ$#p@z bJZ4v??r 4:z58)&`th};xL_!ɉo `ۂ7&G $'1ovҊ%{Uf-;X3&F4Z|5p*p_3lЈx 5(8 AgUMhx|(G2R{ns4ƨiǧ=,'wxX"ow#)Uee]74AueˆHFBZ4< ." CVWP\MXнKY KB@ lp4~2Y1J@O'f2hpbo kfi=eh,% PVr[^GqdQ46㴌hD5/6\(ht a "LJؤH#½1à͋-0 |Nl~Avy$r!{t&?j*IcZ XD@>C{RuߘJA/;>Ou,/7 .8#Y/jp֕uq+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ % ciRuX  C `:{]տB:RW 3ۘ[~W \.WI_8LvRd4UzPUl#@貌Cd̾(" $-8[m6lݾٽ35n@n||;LA-){u[́-GB N{HB́u"74 9)KϾ%‚vXf8+AFϞu xW`py`h.O#o^~):N.Adyuc'k/^x.fN zfc͆픉ruc~$@$p<8y:~e|;f㗷ތWGjCg] c蕙Z8:q6<pجqƬhhl& fH_a"8lTt)k-59JG'y؉7N7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#61d4 JV)NfZP!z̑HHHHZ۝k+s,0eD,b?@#Q!8€= %,lRe1Sb@C3FF t7*G1K     G)ءd0FfsBcfY$@$@$@$@ݓ% c tG7JM6jj?菇 ǚ% tWK2 %"sZpL’ "rIHHH  9!0D;:^,"N5 @W 0XR!PL( HuHHHHHP s 蹎ZuTc^#    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2T %3"    #@ ڌ5&    .#@P2#    ?T¯Xc    2I[סn@ɀH %U6§֬F@fMCRqlnUv8ݣɏ٧4a0Wt`MG#5cs<WL>c3W"gkvxgo#7?ɿ$#p@z bJZ4v??r 4:z58)&`th};xL_!ɉo `ۂ7&G $'1ovҊ%{Uf-;X3&F4Z|5p*p_3lЈx 5(8 AgUMhx|(G2R{ns4ƨiǧ=,'wxX"ow#)Uee]74AueˆHFBZ4< ." CVWP\MXнKY KB@ lp4~2Y1J@O'f2hpbo kfi=eh,% PVr[^GqdQ46㴌hD5/6\(ht a "LJؤH#½1à͋-0 |Nl~Avy$r!{t&?j*IcZ XD@>C{RuߘJA/;>Ou,/7 .8#Y/jp֕uq+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ %    $@+i2/    3T¬X]    JT&"    0#@ % ciRuX  C `:{]տB:RW 3ۘ[~W \.WI_8LvRd4UzPUl#@貌Cd̾(" $-8[m6lݾٽ35n@n||;LA-){u[́-GB N{HB́u"74 9)KϾ%‚vXf8+AFϞu xW`py`h.O#o^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%B'3&2B{}3%`c6 ?竝xL9JbïEcUj:}c&v!!6?$"E@َZ9_Z'I1gTϗn.>\h"#Dg7֋DbK 7r.<ryvcca}IZCm[HpYg/0\ĬEP'))IƩhƜ5zh%ccc+~9OW`?Re`i}=ۦ|nj^%JltD>|@]~ ?-"( Ku .` іyyë./]i+uϮuE띍zړQ\#= MuvzNPE}mjK"("("OP<("("("@j"("(@?A@~t"("(@O AOm*"("(Ƀa*"("(= =("("T 'J("("*ڦ"("("OP<("("("@j"("(@?A@~t"("(@O AOm*"("(Ƀa*"("(= =("("T 'J("("*ڦ"("("OP<("("("@j"("(@?A@~t"("(@O AOm*"("(Ƀa*"("(= =("("T 'J("("*ڦ"("("OP<("("("0IDAT@j"("(@?A4(=1zm! Ǥ=9Z?M]uw#`>nXSZ!wynndV9Pt#ԟ݉'Cۃ ֝0z<(tpV FؿK ։j \G#8\nMiO્EBSx W 0u5Nɪn}zzpop<-7(&L_.XnP{ Wmho׋Íy_X«Gt@n#s4hE0y5º+Սe\%E-{<To7vi gU}ch:jB{n0fAr U 15!M@+,#,_E:%Ȋp(.ڛHレkާuW0(ۣO_}H7HRlNyS׊%:NT8(1V Fr@riav~ dT8WnH_cD`لav$Z|J?2'+ht+jW@݌~]FbZUPE@PE@P/i@t4"("(@"A­)"("(} ("("(  v("("-T [CG("("***ڙ"("("зPo="("("Ы@Ыpkg"("(@B@<t4"("(@"A­)"("(} ("("(;`ki)IENDB`
-1
apolloconfig/apollo
3,864
Lazy load ConfigUtil
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
lonre
2021-07-31T12:12:17Z
2021-08-04T00:43:24Z
02c43dd547db3d44253d0b08659b8b0e8e3a8374
bfdfd985fbdd7fd156ddb0be34507224a3db70f5
Lazy load ConfigUtil. prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca881a6afb2766725bdb3c09c14d450cc12f ## What's the purpose of this PR XXXXX ## Which issue(s) this PR fixes: Fixes # ## Brief changelog XXXXX Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Write necessary unit tests to verify the code. - [ ] Run `mvn clean test` to make sure this pull request doesn't break anything. - [ ] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/scripts/startup.sh
#!/bin/bash # # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # SERVICE_NAME=apollo-portal ## Adjust log dir if necessary LOG_DIR=/opt/logs/100003173 ## Adjust server port if necessary SERVER_PORT=${SERVER_PORT:=8070} ## Create log directory if not existed because JDK 8+ won't do that mkdir -p $LOG_DIR ## Adjust memory settings if necessary #export JAVA_OPTS="-Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=8" ## Only uncomment the following when you are using server jvm #export JAVA_OPTS="$JAVA_OPTS -server -XX:-ReduceInitialCardMarks" ########### The following is the same for configservice, adminservice, portal ########### export JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+DisableExplicitGC -XX:+ScavengeBeforeFullGC -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom" # DS_URL, DS_USERNAME, DS_PASSWORD are deprecated, please use SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD instead # DataSource URL USERNAME PASSWORD if [ "$DS_URL"x != x ] then export SPRING_DATASOURCE_URL=$DS_URL export SPRING_DATASOURCE_USERNAME=$DS_USERNAME export SPRING_DATASOURCE_PASSWORD=$DS_PASSWORD fi export JAVA_OPTS="$JAVA_OPTS -Dserver.port=$SERVER_PORT -Dlogging.file.name=$LOG_DIR/$SERVICE_NAME.log -XX:HeapDumpPath=$LOG_DIR/HeapDumpOnOutOfMemoryError/" export APP_NAME=$SERVICE_NAME PATH_TO_JAR=$SERVICE_NAME".jar" SERVER_URL="http://localhost:$SERVER_PORT" function checkPidAlive { for i in `ls -t $APP_NAME/$APP_NAME.pid 2>/dev/null` do read pid < $i result=$(ps -p "$pid") if [ "$?" -eq 0 ]; then return 0 else printf "\npid - $pid just quit unexpectedly, please check logs under $LOG_DIR and /tmp for more information!\n" exit 1; fi done printf "\nNo pid file found, startup may failed. Please check logs under $LOG_DIR and /tmp for more information!\n" exit 1; } if [ "$(uname)" == "Darwin" ]; then windows="0" elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then windows="0" elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then windows="1" else windows="0" fi # for Windows if [ "$windows" == "1" ] && [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then tmp_java_home=`cygpath -sw "$JAVA_HOME"` export JAVA_HOME=`cygpath -u $tmp_java_home` echo "Windows new JAVA_HOME is: $JAVA_HOME" fi # Find Java if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then javaexe="$JAVA_HOME/bin/java" elif type -p java > /dev/null 2>&1; then javaexe=$(type -p java) elif [[ -x "/usr/bin/java" ]]; then javaexe="/usr/bin/java" else echo "Unable to find Java" exit 1 fi if [[ "$javaexe" ]]; then version=$("$javaexe" -version 2>&1 | awk -F '"' '/version/ {print $2}') version=$(echo "$version" | awk -F. '{printf("%03d%03d",$1,$2);}') # now version is of format 009003 (9.3.x) if [ $version -ge 011000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" elif [ $version -ge 010000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" elif [ $version -ge 009000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" else JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC" JAVA_OPTS="$JAVA_OPTS -Xloggc:$LOG_DIR/gc.log -XX:+PrintGCDetails" JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=5M" fi fi cd `dirname $0`/.. for i in `ls $SERVICE_NAME-*.jar 2>/dev/null` do if [[ ! $i == *"-sources.jar" ]] then PATH_TO_JAR=$i break fi done if [[ ! -f PATH_TO_JAR && -d current ]]; then cd current for i in `ls $SERVICE_NAME-*.jar 2>/dev/null` do if [[ ! $i == *"-sources.jar" ]] then PATH_TO_JAR=$i break fi done fi # For Docker environment, start in foreground mode if [[ -n "$APOLLO_RUN_MODE" ]] && [[ "$APOLLO_RUN_MODE" == "Docker" ]]; then exec $javaexe -Dsun.misc.URLClassPath.disableJarChecking=true $JAVA_OPTS -jar $PATH_TO_JAR else if [[ -f $SERVICE_NAME".jar" ]]; then rm -rf $SERVICE_NAME".jar" fi printf "$(date) ==== Starting ==== \n" ln $PATH_TO_JAR $SERVICE_NAME".jar" chmod a+x $SERVICE_NAME".jar" ./$SERVICE_NAME".jar" start rc=$?; if [[ $rc != 0 ]]; then echo "$(date) Failed to start $SERVICE_NAME.jar, return code: $rc" exit $rc; fi declare -i counter=0 declare -i max_counter=48 # 48*5=240s declare -i total_time=0 printf "Waiting for server startup" until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "HTTP")" != "" ]]; do printf "." counter+=1 sleep 5 checkPidAlive done total_time=counter*5 if [[ (( counter -ge max_counter )) ]]; then printf "\n$(date) Server failed to start in $total_time seconds!\n" exit 1; fi printf "\n$(date) Server started in $total_time seconds!\n" exit 0; fi
#!/bin/bash # # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # SERVICE_NAME=apollo-portal ## Adjust log dir if necessary LOG_DIR=/opt/logs/100003173 ## Adjust server port if necessary SERVER_PORT=${SERVER_PORT:=8070} ## Create log directory if not existed because JDK 8+ won't do that mkdir -p $LOG_DIR ## Adjust memory settings if necessary #export JAVA_OPTS="-Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=8" ## Only uncomment the following when you are using server jvm #export JAVA_OPTS="$JAVA_OPTS -server -XX:-ReduceInitialCardMarks" ########### The following is the same for configservice, adminservice, portal ########### export JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+DisableExplicitGC -XX:+ScavengeBeforeFullGC -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom" # DS_URL, DS_USERNAME, DS_PASSWORD are deprecated, please use SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD instead # DataSource URL USERNAME PASSWORD if [ "$DS_URL"x != x ] then export SPRING_DATASOURCE_URL=$DS_URL export SPRING_DATASOURCE_USERNAME=$DS_USERNAME export SPRING_DATASOURCE_PASSWORD=$DS_PASSWORD fi export JAVA_OPTS="$JAVA_OPTS -Dserver.port=$SERVER_PORT -Dlogging.file.name=$LOG_DIR/$SERVICE_NAME.log -XX:HeapDumpPath=$LOG_DIR/HeapDumpOnOutOfMemoryError/" export APP_NAME=$SERVICE_NAME PATH_TO_JAR=$SERVICE_NAME".jar" SERVER_URL="http://localhost:$SERVER_PORT" function checkPidAlive { for i in `ls -t $APP_NAME/$APP_NAME.pid 2>/dev/null` do read pid < $i result=$(ps -p "$pid") if [ "$?" -eq 0 ]; then return 0 else printf "\npid - $pid just quit unexpectedly, please check logs under $LOG_DIR and /tmp for more information!\n" exit 1; fi done printf "\nNo pid file found, startup may failed. Please check logs under $LOG_DIR and /tmp for more information!\n" exit 1; } if [ "$(uname)" == "Darwin" ]; then windows="0" elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then windows="0" elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then windows="1" else windows="0" fi # for Windows if [ "$windows" == "1" ] && [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then tmp_java_home=`cygpath -sw "$JAVA_HOME"` export JAVA_HOME=`cygpath -u $tmp_java_home` echo "Windows new JAVA_HOME is: $JAVA_HOME" fi # Find Java if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then javaexe="$JAVA_HOME/bin/java" elif type -p java > /dev/null 2>&1; then javaexe=$(type -p java) elif [[ -x "/usr/bin/java" ]]; then javaexe="/usr/bin/java" else echo "Unable to find Java" exit 1 fi if [[ "$javaexe" ]]; then version=$("$javaexe" -version 2>&1 | awk -F '"' '/version/ {print $2}') version=$(echo "$version" | awk -F. '{printf("%03d%03d",$1,$2);}') # now version is of format 009003 (9.3.x) if [ $version -ge 011000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" elif [ $version -ge 010000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" elif [ $version -ge 009000 ]; then JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$LOG_DIR/gc.log:time,level,tags -Xlog:safepoint -Xlog:gc+heap=trace" else JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC" JAVA_OPTS="$JAVA_OPTS -Xloggc:$LOG_DIR/gc.log -XX:+PrintGCDetails" JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=5M" fi fi cd `dirname $0`/.. for i in `ls $SERVICE_NAME-*.jar 2>/dev/null` do if [[ ! $i == *"-sources.jar" ]] then PATH_TO_JAR=$i break fi done if [[ ! -f PATH_TO_JAR && -d current ]]; then cd current for i in `ls $SERVICE_NAME-*.jar 2>/dev/null` do if [[ ! $i == *"-sources.jar" ]] then PATH_TO_JAR=$i break fi done fi # For Docker environment, start in foreground mode if [[ -n "$APOLLO_RUN_MODE" ]] && [[ "$APOLLO_RUN_MODE" == "Docker" ]]; then exec $javaexe -Dsun.misc.URLClassPath.disableJarChecking=true $JAVA_OPTS -jar $PATH_TO_JAR else if [[ -f $SERVICE_NAME".jar" ]]; then rm -rf $SERVICE_NAME".jar" fi printf "$(date) ==== Starting ==== \n" ln $PATH_TO_JAR $SERVICE_NAME".jar" chmod a+x $SERVICE_NAME".jar" ./$SERVICE_NAME".jar" start rc=$?; if [[ $rc != 0 ]]; then echo "$(date) Failed to start $SERVICE_NAME.jar, return code: $rc" exit $rc; fi declare -i counter=0 declare -i max_counter=48 # 48*5=240s declare -i total_time=0 printf "Waiting for server startup" until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "HTTP")" != "" ]]; do printf "." counter+=1 sleep 5 checkPidAlive done total_time=counter*5 if [[ (( counter -ge max_counter )) ]]; then printf "\n$(date) Server failed to start in $total_time seconds!\n" exit 1; fi printf "\n$(date) Server started in $total_time seconds!\n" exit 0; fi
-1