Skip to content

Commit

Permalink
refactor: remove app.properties and move some config file's location (#…
Browse files Browse the repository at this point in the history
…4637)

* refactor(apollo-common): delete application-github.properties

* Delete app.properties

* refactor(apollo-configservice): config in assembly

* Delete app.properties

* refactor(apollo-adminservice): config in assembly

* Delete app.properties

* refactor(apollo-portal): config in assembly

* delete META-INF/app.properties

* delete resource src/main/config

* docs: fix path from src/main/config to src/main/resources

* Update CHANGES.md

* remove api of "app"
  • Loading branch information
Anilople committed Nov 10, 2022
1 parent b435050 commit dc3067b
Show file tree
Hide file tree
Showing 26 changed files with 12 additions and 194 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Apollo 2.1.0
* [fix doc bug](https://github.com/apolloconfig/apollo/pull/4579)
* [fix Grayscale release Item Value length limit can not be synchronized with its main version](https://github.com/apolloconfig/apollo/pull/4622)
* [feat: use can change spring.profiles.active's value without rebuild project](https://github.com/apolloconfig/apollo/pull/4616)
* [refactor: remove app.properties and move some config file's location](https://github.com/apolloconfig/apollo/pull/4637)

------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/11?closed=1)
11 changes: 1 addition & 10 deletions apollo-adminservice/src/assembly/assembly-descriptor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,7 @@
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>src/main/config</directory>
<outputDirectory>config</outputDirectory>
<excludes>
<exclude>apollo-adminservice.conf</exclude>
<exclude>application-github.properties</exclude>
</excludes>
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>src/main/config</directory>
<directory>target/classes</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>apollo-adminservice.conf</include>
Expand Down
17 changes: 0 additions & 17 deletions apollo-adminservice/src/main/config/app.properties

This file was deleted.

17 changes: 0 additions & 17 deletions apollo-adminservice/src/main/resources/META-INF/app.properties

This file was deleted.

17 changes: 0 additions & 17 deletions apollo-assembly/src/main/resources/META-INF/app.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
@RequestMapping(path = "/apollo")
public class ApolloInfoController {

@RequestMapping("app")
public String getApp() {
return Foundation.app().toString();
}

@RequestMapping("net")
public String getNet() {
return Foundation.net().toString();
Expand Down
11 changes: 1 addition & 10 deletions apollo-configservice/src/assembly/assembly-descriptor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,7 @@
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>src/main/config</directory>
<outputDirectory>config</outputDirectory>
<excludes>
<exclude>apollo-configservice.conf</exclude>
<exclude>application-github.properties</exclude>
</excludes>
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>src/main/config</directory>
<directory>target/classes</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>apollo-configservice.conf</include>
Expand Down
17 changes: 0 additions & 17 deletions apollo-configservice/src/main/config/app.properties

This file was deleted.

17 changes: 0 additions & 17 deletions apollo-configservice/src/main/resources/META-INF/app.properties

This file was deleted.

10 changes: 1 addition & 9 deletions apollo-portal/src/assembly/assembly-descriptor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,7 @@
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>src/main/config</directory>
<outputDirectory>config</outputDirectory>
<includes>
<include>app.properties</include>
</includes>
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>src/main/config</directory>
<directory>target/classes</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>apollo-portal.conf</include>
Expand Down
17 changes: 0 additions & 17 deletions apollo-portal/src/main/config/app.properties

This file was deleted.

19 changes: 0 additions & 19 deletions apollo-portal/src/main/config/application-github.properties

This file was deleted.

17 changes: 0 additions & 17 deletions apollo-portal/src/main/resources/META-INF/app.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Starting from version 1.2.0, Apollo supports ldap protocol login, which can be c

#### 1.1 Configure `application-ldap.yml`

After unpacking `apollo-portal-x.x.x-github.zip`, create `application-ldap.yml` in the `config` directory with the following reference ([sample](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/config/application-ldap-openldap-sample.yml)) , the relevant content needs to be adjusted according to the specific situation:
After unpacking `apollo-portal-x.x.x-github.zip`, create `application-ldap.yml` in the `config` directory with the following reference ([sample](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/resources/application-ldap-openldap-sample.yml)) , the relevant content needs to be adjusted according to the specific situation:

```yml
spring:
Expand Down Expand Up @@ -130,7 +130,7 @@ export JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=github,ldap"

#### 2.1 Configure `application-ldap.yml`

After unpacking `apollo-portal-x.x.x-github.zip`, create `application-ldap.yml` in the `config` directory with the following reference ([sample](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/config/application-ldap-activedirectory-sample.yml)) , the relevant content needs to be adapted to the specific case:
After unpacking `apollo-portal-x.x.x-github.zip`, create `application-ldap.yml` in the `config` directory with the following reference ([sample](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/resources/application-ldap-activedirectory-sample.yml)) , the relevant content needs to be adapted to the specific case:

```yml
spring:
Expand Down Expand Up @@ -170,7 +170,7 @@ export JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=github,ldap"

#### 3.1 Configure `application-ldap.yml`

After unpacking `apollo-portal-x.x.x-github.zip`, create `application-ldap.yml` in the `config` directory with the following reference ([sample](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/config/application-ldap-apacheds-sample.yml)) , the relevant content needs to be adjusted according to the specific situation:
After unpacking `apollo-portal-x.x.x-github.zip`, create `application-ldap.yml` in the `config` directory with the following reference ([sample](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/resources/application-ldap-apacheds-sample.yml)) , the relevant content needs to be adjusted according to the specific situation:

```yml
spring:
Expand Down Expand Up @@ -242,7 +242,7 @@ Before configuration, you need to prepare:

### 1. Configure `application-oidc.yml`

After unpacking `apollo-portal-x.x.x-github.zip`, create `application-oidc.yml` in the `config` directory with the following contents ([sample](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/config/application-oidc-sample.yml)) , the relevant content needs to be adapted to the specific case:
After unpacking `apollo-portal-x.x.x-github.zip`, create `application-oidc.yml` in the `config` directory with the following contents ([sample](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/resources/application-oidc-sample.yml)) , the relevant content needs to be adapted to the specific case:

#### 1.1 Minimum configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Apollo是配置管理系统,会提供权限管理(Authorization),理论

#### 1.1 配置`application-ldap.yml`

解压`apollo-portal-x.x.x-github.zip`后,在`config`目录下创建`application-ldap.yml`,内容参考如下([样例](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/config/application-ldap-openldap-sample.yml)),相关的内容需要按照具体情况调整:
解压`apollo-portal-x.x.x-github.zip`后,在`config`目录下创建`application-ldap.yml`,内容参考如下([样例](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/resources/application-ldap-openldap-sample.yml)),相关的内容需要按照具体情况调整:

```yml
spring:
Expand Down Expand Up @@ -126,7 +126,7 @@ export JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=github,ldap"

#### 2.1 配置`application-ldap.yml`

解压`apollo-portal-x.x.x-github.zip`后,在`config`目录下创建`application-ldap.yml`,内容参考如下([样例](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/config/application-ldap-activedirectory-sample.yml)),相关的内容需要按照具体情况调整:
解压`apollo-portal-x.x.x-github.zip`后,在`config`目录下创建`application-ldap.yml`,内容参考如下([样例](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/resources/application-ldap-activedirectory-sample.yml)),相关的内容需要按照具体情况调整:

```yml
spring:
Expand Down Expand Up @@ -166,7 +166,7 @@ export JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=github,ldap"

#### 3.1 配置`application-ldap.yml`

解压`apollo-portal-x.x.x-github.zip`后,在`config`目录下创建`application-ldap.yml`,内容参考如下([样例](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/config/application-ldap-apacheds-sample.yml)),相关的内容需要按照具体情况调整:
解压`apollo-portal-x.x.x-github.zip`后,在`config`目录下创建`application-ldap.yml`,内容参考如下([样例](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/resources/application-ldap-apacheds-sample.yml)),相关的内容需要按照具体情况调整:

```yml
spring:
Expand Down Expand Up @@ -236,7 +236,7 @@ export JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=github,ldap"

### 1. 配置 `application-oidc.yml`

解压`apollo-portal-x.x.x-github.zip`后,在`config`目录下创建`application-oidc.yml`,内容参考如下([样例](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/config/application-oidc-sample.yml)),相关的内容需要按照具体情况调整:
解压`apollo-portal-x.x.x-github.zip`后,在`config`目录下创建`application-oidc.yml`,内容参考如下([样例](https://github.com/apolloconfig/apollo/blob/master/apollo-portal/src/main/resources/application-oidc-sample.yml)),相关的内容需要按照具体情况调整:

#### 1.1 最小配置

Expand Down
14 changes: 0 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -581,20 +581,6 @@
<exclude>**/*.xml</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/config</directory>
<filtering>true</filtering>
<includes>
<include>application-github.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/config</directory>
<filtering>false</filtering>
<excludes>
<exclude>application-github.properties</exclude>
</excludes>
</resource>
</resources>
</build>
<profiles>
Expand Down

0 comments on commit dc3067b

Please sign in to comment.