Skip to content

Commit

Permalink
Merge branch 'main' into pb-http-mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLiu1123 committed Dec 2, 2023
2 parents 67a8d94 + c812f13 commit 6f04791
Show file tree
Hide file tree
Showing 20 changed files with 59 additions and 48 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ on:
push:
branches:
- main
- 2.x
- 3.1.x
- 2.7.x
pull_request:
branches:
- main
- 2.x
- 3.1.x
- 2.7.x
jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ Mainly maintain the following versions:
is [main](https://github.com/DanielLiu1123/grpc-starter/).

3.x version is kept in sync with Spring Boot 3,
if you are using Spring Boot 3.1.5, then `grpc-boot-starter` 3.1.5 should be used.
if you are using Spring Boot 3.1.6, then `grpc-boot-starter` 3.1.6 should be used.

| Spring Boot | grpc-boot-starter |
|-------------|-------------------|
| 3.x | 3.1.5 |
| 3.x | 3.1.6 |

- 2.x

Expand All @@ -91,7 +91,7 @@ Mainly maintain the following versions:

| Spring Boot | grpc-boot-starter |
|-------------|-------------------|
| 2.x | 2.1.5 |
| 2.x | 2.1.6 |

## License

Expand Down
8 changes: 2 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ allprojects {
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://repo.spring.io/snapshot"
}
maven {
url "https://repo.spring.io/milestone"
}
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
compileJava {
options.encoding = 'UTF-8'
Expand Down
4 changes: 2 additions & 2 deletions docs/en-us/guide/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#### **Gradle**

```groovy
implementation platform('com.freemanan:grpc-starter-dependencies:3.1.5')
implementation platform('com.freemanan:grpc-starter-dependencies:3.1.6')
implementation 'com.freemanan:grpc-boot-starter'
```

Expand All @@ -17,7 +17,7 @@ implementation 'com.freemanan:grpc-boot-starter'
<dependency>
<groupId>com.freemanan</groupId>
<artifactId>grpc-starter-dependencies</artifactId>
<version>3.1.5</version>
<version>3.1.6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions docs/en-us/guide/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Mainly maintain the following versions:
is [main](https://github.com/DanielLiu1123/grpc-starter/).

3.x version is kept in sync with Spring Boot 3,
if you are using Spring Boot 3.1.5, then `grpc-boot-starter` 3.1.5 should be used.
if you are using Spring Boot 3.1.6, then `grpc-boot-starter` 3.1.6 should be used.

| Spring Boot | grpc-boot-starter |
|-------------|-------------------|
| 3.x | 3.1.5 |
| 3.x | 3.1.6 |

- 2.x

Expand All @@ -19,4 +19,4 @@ Mainly maintain the following versions:

| Spring Boot | grpc-boot-starter |
|-------------|-------------------|
| 2.x | 2.1.5 |
| 2.x | 2.1.6 |
2 changes: 1 addition & 1 deletion docs/zh-cn/coverpage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](assets/images/logo.png)

# gRPC Starter <small>3.1.5</small>
# gRPC Starter <small>3.1.6</small>

> Spring Boot Starters for gRPC ecosystem
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-cn/guide/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#### ** Gradle **

```groovy
implementation platform('com.freemanan:grpc-starter-dependencies:3.1.5')
implementation platform('com.freemanan:grpc-starter-dependencies:3.1.6')
implementation 'com.freemanan:grpc-boot-starter'
```

Expand All @@ -18,7 +18,7 @@ implementation 'com.freemanan:grpc-boot-starter'
<dependency>
<groupId>com.freemanan</groupId>
<artifactId>grpc-starter-dependencies</artifactId>
<version>3.1.5</version>
<version>3.1.6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions docs/zh-cn/guide/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
- 3.x

基于 Spring Boot 3,baseline 为 JDK 17,对应分支为 [main](https://github.com/DanielLiu1123/grpc-starter/),如果 Spring Boot 版本为 3.x,必须使用 3.x 版本。
如果使用 Spring Boot 的版本为 3.1.5,则应使用 `grpc-boot-starter` 3.1.5 版本。
如果使用 Spring Boot 的版本为 3.1.6,则应使用 `grpc-boot-starter` 3.1.6 版本。

| Spring Boot | grpc-boot-starter |
|-------------|-------------------|
| 3.x | 3.1.5 |
| 3.x | 3.1.6 |

- 2.x

基于 Spring Boot 2,baseline 为 JDK 8,对应分支为 [2.x](https://github.com/DanielLiu1123/grpc-starter/tree/2.x),如果 Spring Boot 版本为 2.x,必须使用 2.x 版本。

| Spring Boot | grpc-boot-starter |
|-------------|-------------------|
| 2.x | 2.1.5 |
| 2.x | 2.1.6 |
2 changes: 1 addition & 1 deletion examples/tracing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {

implementation("org.springframework.boot:spring-boot-starter-web")
implementation("io.micrometer:micrometer-tracing-bridge-brave")
implementation("com.freemanan:httpexchange-spring-boot-starter:3.1.5")
implementation("com.freemanan:httpexchange-spring-boot-starter:3.1.6")

testImplementation(project(":grpc-starters:grpc-starter-test"))
}
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
group=com.freemanan
group=io.github.danielliu1123
artifact=grpc-starter
version=3.1.6-SNAPSHOT
version=3.2.0-SNAPSHOT

# Spring related
springBootVersion=3.1.5
springCloudVersion=2022.0.4
springDependencyManagementVersion=1.1.3
springBootVersion=3.2.0
springCloudVersion=2023.0.0-RC1
springDependencyManagementVersion=1.1.4

# gRPC related
protobufGradlePluginVersion=0.9.4
# required JDK 11
bufGradlePluginVersion=0.8.6
grpcVersion=1.59.0
protobufVersion=3.24.4
grpcVersion=1.59.1
protobufVersion=3.25.1
pgvVersion=1.0.2
protovalidateVersion=0.1.6
protovalidateVersion=0.1.8

# Code quality
spotlessVersion=6.22.0
spotbugsVersion=6.0.0-rc.2
spotlessVersion=6.23.2
spotbugsVersion=6.0.0-rc.3

# Others
javaxValidationApiVersion=1.3.2
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public <T> T create() {
.getBeanDefinition();
abd.setLazyInit(true);

String channelBeanName = UUID.randomUUID().toString();
String channelBeanName = "grpc-channel-" + UUID.randomUUID();
BeanDefinitionHolder holder = new BeanDefinitionHolder(abd, channelBeanName);
BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory;
if (SPRING_CLOUD_CONTEXT_PRESENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private Mono<HandlerResult> handleException(
ArrayList<Throwable> exceptions = new ArrayList<>();
try {
if (log.isDebugEnabled()) {
log.debug("{} Using @ExceptionHandler {}", exchange.getLogPrefix(), invocable);
log.debug("{} using @ExceptionHandler {}", exchange.getLogPrefix(), invocable);
}
if (bindingContext != null) {
bindingContext.getModel().asMap().clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
public class Deps {

public static final String SPRING_BOOT_VERSION = "3.1.5";
public static final String SPRING_BOOT_VERSION = "3.2.0";

public static final String WEB_MVC_STARTER =
"org.springframework.boot:spring-boot-starter-web:" + SPRING_BOOT_VERSION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ public final class Deps {

private Deps() {}

public static final String SPRING_BOOT_VERSION = "3.1.5";
public static final String SPRING_BOOT_VERSION = "3.2.0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ void testMetricsBeans_whenAllConditionsMatched() {
.doesNotThrowAnyException();
assertThatCode(() -> ctx.getBean(AnnotationAwareAspectJAutoProxyCreator.class))
.doesNotThrowAnyException();
assertThatCode(() -> ctx.getBean(CountedAspect.class)).isInstanceOf(NoSuchBeanDefinitionException.class);
assertThatCode(() -> ctx.getBean(TimedAspect.class)).isInstanceOf(NoSuchBeanDefinitionException.class);
assertThatCode(() -> ctx.getBean(ObservedAspect.class)).isInstanceOf(NoSuchBeanDefinitionException.class);
// MetricsAspectsAutoConfiguration add CountedAspect, TimedAspect and ObservedAspect beans from 3.2.0
assertThatCode(() -> ctx.getBean(CountedAspect.class)).doesNotThrowAnyException();
assertThatCode(() -> ctx.getBean(TimedAspect.class)).doesNotThrowAnyException();
assertThatCode(() -> ctx.getBean(ObservedAspect.class)).doesNotThrowAnyException();

ctx.close();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
grpc:
test:
server:
port-type: in_process
8 changes: 8 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
pluginManagement {
repositories {
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
gradlePluginPortal()
}
}

rootProject.name = 'grpc-starter'

// core autoconfigure
Expand Down

0 comments on commit 6f04791

Please sign in to comment.