Skip to content

Commit

Permalink
add 'govern' prefix to subproject name
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang committed May 17, 2021
1 parent d56f340 commit 08088ac
Show file tree
Hide file tree
Showing 260 changed files with 80 additions and 91 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ consistency between process cache and Redis.
> Kotlin DSL
``` kotlin
val governVersion = "0.9.17";
implementation("me.ahoo.govern:spring-cloud-starter-config:${governVersion}")
implementation("me.ahoo.govern:spring-cloud-starter-discovery:${governVersion}")
val governVersion = "0.9.18";
implementation("me.ahoo.govern:spring-cloud-starter-govern-config:${governVersion}")
implementation("me.ahoo.govern:spring-cloud-starter-govern-discovery:${governVersion}")
```

### Maven
Expand All @@ -33,18 +33,18 @@ consistency between process cache and Redis.
<modelVersion>4.0.0</modelVersion>
<artifactId>demo</artifactId>
<properties>
<govern.version>0.9.17</govern.version>
<govern.version>0.9.18</govern.version>
</properties>

<dependencies>
<dependency>
<groupId>me.ahoo.govern</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
<artifactId>spring-cloud-starter-govern-config</artifactId>
<version>${govern.version}</version>
</dependency>
<dependency>
<groupId>me.ahoo.govern</groupId>
<artifactId>spring-cloud-starter-discovery</artifactId>
<artifactId>spring-cloud-starter-govern-discovery</artifactId>
<version>${govern.version}</version>
</dependency>
</dependencies>
Expand Down Expand Up @@ -77,31 +77,31 @@ logging:
#### Option 1:Download the executable file
> Download [rest-api-server](https://github.com/Ahoo-Wang/govern-service/releases/download/0.9.17/rest-api-0.9.17.tar)
> Download [govern-rest-api-server](https://github.com/Ahoo-Wang/govern-service/releases/download/0.9.18/govern-rest-api-0.9.18.tar)
> tar *rest-api-0.9.17.tar*
> tar *govern-rest-api-0.9.18.tar*
```shell
cd rest-api-0.9.17
# Working directory: rest-api-0.9.17
bin/rest-api --server.port=8080 --govern.redis.uri=redis://localhost:6379
cd govern-rest-api-0.9.18
# Working directory: govern-rest-api-0.9.18
bin/govern-rest-api --server.port=8080 --govern.redis.uri=redis://localhost:6379
```

#### Option 2:Run On Docker

```shell
docker pull ahoowang/govern-service:0.9.17
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.17
docker pull ahoowang/govern-service:0.9.18
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.18
```

---
> MacBook Pro (M1)
>
> Please use *ahoowang/govern-service:0.9.17-armv7*
> Please use *ahoowang/govern-service:0.9.18-armv7*
```shell
docker pull ahoowang/govern-service:0.9.17-armv7
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.17-armv7
docker pull ahoowang/govern-service:0.9.18-armv7
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.18-armv7
```

#### Option 3:Run On Kubernetes
Expand All @@ -127,7 +127,7 @@ spec:
value: standalone
- name: GOVERN_REDIS_URI
value: redis://redis-uri:6379
image: ahoowang/govern-service:0.9.17
image: ahoowang/govern-service:0.9.18
name: govern-service
resources:
limits:
Expand Down Expand Up @@ -241,7 +241,7 @@ gradle config:jmh
# JMH version: 1.29
# VM version: JDK 11.0.11, OpenJDK 64-Bit Server VM, 11.0.11+9-LTS
# VM invoker: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java
# VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/govern-service/config/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant
# VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/govern-service/govern-config/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant
# Blackhole mode: full + dont-inline hint
# Warmup: 1 iterations, 10 s each
# Measurement: 1 iterations, 10 s each
Expand All @@ -265,7 +265,7 @@ gradle discovery:jmh
# JMH version: 1.29
# VM version: JDK 11.0.11, OpenJDK 64-Bit Server VM, 11.0.11+9-LTS
# VM invoker: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java
# VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/govern-service/discovery/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant
# VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/govern-service/govern-discovery/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant
# Blackhole mode: full + dont-inline hint
# Warmup: 1 iterations, 10 s each
# Measurement: 1 iterations, 10 s each
Expand Down
34 changes: 17 additions & 17 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
> Kotlin DSL
``` kotlin
val governVersion = "0.9.17";
implementation("me.ahoo.govern:spring-cloud-starter-config:${governVersion}")
implementation("me.ahoo.govern:spring-cloud-starter-discovery:${governVersion}")
val governVersion = "0.9.18";
implementation("me.ahoo.govern:spring-cloud-starter-govern-config:${governVersion}")
implementation("me.ahoo.govern:spring-cloud-starter-govern-discovery:${governVersion}")
```

### Maven
Expand All @@ -28,18 +28,18 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>demo</artifactId>
<properties>
<govern.version>0.9.17</govern.version>
<govern.version>0.9.18</govern.version>
</properties>

<dependencies>
<dependency>
<groupId>me.ahoo.govern</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
<artifactId>spring-cloud-starter-govern-config</artifactId>
<version>${govern.version}</version>
</dependency>
<dependency>
<groupId>me.ahoo.govern</groupId>
<artifactId>spring-cloud-starter-discovery</artifactId>
<artifactId>spring-cloud-starter-govern-discovery</artifactId>
<version>${govern.version}</version>
</dependency>
</dependencies>
Expand Down Expand Up @@ -72,21 +72,21 @@ logging:
#### 方式一:下载可执行文件
> 下载 [rest-api-server](https://github.com/Ahoo-Wang/govern-service/releases/download/0.9.17/rest-api-0.9.17.tar)
> 下载 [rest-api-server](https://github.com/Ahoo-Wang/govern-service/releases/download/0.9.18/govern-rest-api-0.9.18.tar)
> 解压 *rest-api-0.9.17.tar*
> 解压 *govern-rest-api-0.9.18.tar*
```shell
cd rest-api-0.9.17
# 工作目录: rest-api-0.9.17
bin/rest-api --server.port=8080 --govern.redis.uri=redis://localhost:6379
cd govern-rest-api-0.9.18
# 工作目录: govern-rest-api-0.9.18
bin/govern-rest-api --server.port=8080 --govern.redis.uri=redis://localhost:6379
```

#### 方式二:在 Docker 中运行

```shell
docker pull ahoowang/govern-service:0.9.17
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.17
docker pull ahoowang/govern-service:0.9.18
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.18
```

#### 方式三:在 Kubernetes 中运行
Expand All @@ -112,7 +112,7 @@ spec:
value: standalone
- name: GOVERN_REDIS_URI
value: redis://redis-uri:6379
image: ahoowang/govern-service:0.9.17
image: ahoowang/govern-service:0.9.18
name: govern-service
resources:
limits:
Expand All @@ -133,11 +133,11 @@ spec:
---
> MacBook Pro (M1)
>
> 请使用 *ahoowang/govern-service:0.9.17-armv7*
> 请使用 *ahoowang/govern-service:0.9.18-armv7*
```shell
docker pull ahoowang/govern-service:0.9.17-armv7
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.17-armv7
docker pull ahoowang/govern-service:0.9.18-armv7
docker run --name govern-service -d -p 8080:8080 --link redis -e GOVERN_REDIS_URI=redis://redis:6379 ahoowang/govern-service:0.9.18-armv7
```

---
Expand Down
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ plugins {
}

val bomProjects = listOf(
project(":bom"),
project(":dependencies")
project(":govern-bom"),
project(":govern-dependencies")
)
val coreProjects = listOf(
project(":config"),
project(":discovery")
project(":govern-config"),
project(":govern-discovery")
)
val restApiProject = project(":rest-api")
val restApiProject = project(":govern-rest-api")
val publishProjects = subprojects - restApiProject
val libraryProjects = publishProjects - bomProjects

Expand Down Expand Up @@ -61,7 +61,7 @@ configure(libraryProjects) {

dependencies {
val depLombok = "org.projectlombok:lombok:${rootProject.ext.get("lombokVersion")}"
this.add("api", platform(project(":dependencies")))
this.add("api", platform(project(":govern-dependencies")))
this.add("compileOnly", depLombok)
this.add("annotationProcessor", depLombok)
this.add("testCompileOnly", depLombok)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion config/build.gradle.kts → govern-config/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

dependencies {
api(project(":core"))
api(project(":govern-core"))
implementation("io.netty:netty-transport-native-epoll:linux-x86_64")
implementation("io.netty:netty-transport-native-kqueue:osx-x86_64")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import com.google.common.base.Strings;
import lombok.var;
import me.ahoo.govern.core.Consts;
import me.ahoo.govern.core.Namespaced;
import me.ahoo.govern.core.NamespacedContext;

/**
* @author ahoo wang
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package me.ahoo.govern.config.redis;

import lombok.var;
import me.ahoo.govern.config.ConfigKeyGenerator;
import me.ahoo.govern.config.ConfigRollback;
import me.ahoo.govern.core.Consts;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
import lombok.var;
import me.ahoo.govern.core.NamespaceService;
import me.ahoo.govern.core.TestRedisClient;
import me.ahoo.govern.core.listener.RedisMessageListenable;
import org.junit.jupiter.api.*;

import java.util.Objects;
import java.util.UUID;

import static org.junit.jupiter.api.Assertions.*;

/**
* @author ahoo wang
*/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

dependencies {
api(project(":core"))
api(project(":govern-core"))
api("io.lettuce:lettuce-core")
implementation("io.netty:netty-transport-native-epoll:linux-x86_64")
implementation("io.netty:netty-transport-native-kqueue:osx-x86_64")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import io.lettuce.core.RedisClient;
import io.lettuce.core.api.StatefulRedisConnection;
import lombok.var;
import me.ahoo.govern.core.Consts;
import me.ahoo.govern.discovery.redis.RedisServiceDiscovery;
import me.ahoo.govern.discovery.redis.RedisServiceRegistry;
import org.openjdk.jmh.annotations.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.lettuce.core.RedisClient;
import io.lettuce.core.api.StatefulRedisConnection;
import me.ahoo.govern.core.Consts;
import me.ahoo.govern.discovery.redis.RedisServiceRegistry;
import org.openjdk.jmh.annotations.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import lombok.var;
import me.ahoo.govern.core.Consts;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

/**
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions rest-api/build.gradle.kts → govern-rest-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tasks.jar.configure {
distributions {
main {
contents {
val dashboardDistPath = "${rootDir.absolutePath}/dashboard/dist";
val dashboardDistPath = "${rootDir.absolutePath}/govern-dashboard/dist";
from(dashboardDistPath).include("**")
}
}
Expand All @@ -29,19 +29,19 @@ application {
"-Xmx512M",
"-server",
"-XX:+UseG1GC",
"-Xlog:gc*:file=logs/rest-api-gc.log:time,tags:filecount=10,filesize=100M",
"-Xlog:gc*:file=logs/${applicationName}-gc.log:time,tags:filecount=10,filesize=100M",
"-Dspring.cloud.bootstrap.enabled=true",
"-Dspring.cloud.bootstrap.location=config/bootstrap.yaml"
)
}


dependencies {
implementation(platform(project(":dependencies")))
implementation(platform(project(":govern-dependencies")))
implementation("io.springfox:springfox-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation(project(":spring-cloud-starter-config"))
implementation(project(":spring-cloud-starter-discovery"))
implementation(project(":spring-cloud-starter-govern-config"))
implementation(project(":spring-cloud-starter-govern-discovery"))
implementation("com.google.guava:guava")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.cloud:spring-cloud-starter-openfeign")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spring:
weight: 18
web:
resources:
static-locations: file:./dashboard/dist/dashboard
static-locations: file:./govern-dashboard/dist/dashboard
servlet:
multipart:
max-file-size: 10MB
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package me.ahoo.govern.rest;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
api(project(":core"))
api(project(":govern-core"))

implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.cloud:spring-cloud-commons")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import io.lettuce.core.RedisClient;
import io.lettuce.core.cluster.RedisClusterClient;
import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands;

import me.ahoo.govern.core.RedisConfig;
import me.ahoo.govern.core.listener.MessageListenable;
import me.ahoo.govern.core.listener.RedisClusterMessageListenable;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=me.ahoo.govern
version=0.9.17
version=0.9.18

description=Govern Service On Redis
website=https://github.com/Ahoo-Wang/govern-service
Expand Down
Loading

0 comments on commit 08088ac

Please sign in to comment.