Skip to content

Commit 31f1e87

Browse files
author
Alexander Furer
committed
release 4.4.2
1 parent 3e5e385 commit 31f1e87

File tree

7 files changed

+27
-19
lines changed

7 files changed

+27
-19
lines changed

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Best viewed with image:https://www.octotree.io/_nuxt/img/03e72a3.svg["Octoree",w
1818
Auto-configures and runs the embedded gRPC server with @GRpcService-enabled beans as part of spring-boot application. +
1919

2020
[IMPORTANT]
21-
Starting from release `4.0.0` the starter is compiled and tested against Spring Boot *2.3.X* only, +
21+
Starting from release `4.0.0` the starter is compiled and tested against Spring Boot *2.X.X* only, +
2222
*1.5.X* Spring boot version support is dropped to allow tight Spring Boot Security framework integration.
2323

2424
== Setup
@@ -31,7 +31,7 @@ repositories {
3131
3232
}
3333
dependencies {
34-
compile 'io.github.lognet:grpc-spring-boot-starter:4.4.1'
34+
compile 'io.github.lognet:grpc-spring-boot-starter:4.4.2'
3535
}
3636
3737

ReleaseNotes.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
== Version 4.4.2
2+
* Spring Boot `2.4.1`
3+
* Spring Cloud `2020.0.0`
4+
15
== Version 4.4.1
26
* If more than 1 port is exposed, add `address` tag to Micrometer's `timer`
37

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
grpcVersion=1.34.1
2-
springBootVersion=2.3.4.RELEASE
3-
springCloudVersion=Hoxton.SR6
2+
springBootVersion=2.4.1
3+
springCloudVersion=2020.0.0
44

5-
version=4.4.2-SNAPSHOT
5+
version=4.4.2
66
group=io.github.lognet
77
description=Spring Boot starter for Google RPC.
88
gitHubUrl=https\://github.com/LogNet/grpc-spring-boot-starter

grpc-spring-boot-starter-demo/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ dependencies {
4141
testCompile 'com.pszymczyk.consul:embedded-consul:2.1.4'
4242
testCompile 'org.awaitility:awaitility:4.0.3'
4343

44-
testCompile "org.springframework.cloud:spring-cloud-config-server:2.1.1.RELEASE"
45-
testCompile "org.springframework.cloud:spring-cloud-config-client:2.1.1.RELEASE"
44+
45+
46+
testCompile "org.springframework.cloud:spring-cloud-config-server"
47+
testCompile "org.springframework.cloud:spring-cloud-config-client"
4648
testCompile "com.playtika.testcontainers:embedded-keycloak:1.76"
47-
testRuntime "org.springframework.cloud:spring-cloud-starter"
49+
testCompile "org.springframework.cloud:spring-cloud-starter-bootstrap"
4850

4951

5052
testImplementation 'org.hamcrest:hamcrest:2.1'

grpc-spring-boot-starter/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ apply plugin: 'signing'
1717
apply plugin: "de.marcphilipp.nexus-publish"
1818
apply plugin: 'io.franzbecker.gradle-lombok'
1919

20+
dependencyManagement {
21+
imports {
22+
mavenBom "org.springframework.boot:spring-boot-starter-parent:${springBootVersion}"
23+
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
24+
}
25+
}
2026
task delombok(type: io.franzbecker.gradle.lombok.task.DelombokTask) {
2127
def outputDir = file("$buildDir/delombok")
2228
outputs.dir(outputDir)
@@ -132,7 +138,7 @@ dependencies {
132138
compileOnly "org.springframework.security:spring-security-oauth2-jose"
133139
compileOnly 'org.springframework.boot:spring-boot-starter-validation'
134140
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
135-
compileOnly group: 'org.springframework.cloud', name: 'spring-cloud-starter-consul-discovery', version: '2.1.1.RELEASE'
141+
compileOnly 'org.springframework.cloud:spring-cloud-starter-consul-discovery'
136142

137143

138144
}

grpc-spring-boot-starter/src/main/java/org/lognet/springboot/grpc/autoconfigure/consul/GrpcConsulRegistrar.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.springframework.context.event.EventListener;
1313

1414
import java.util.Objects;
15-
import java.util.stream.Collectors;
1615

1716
public class GrpcConsulRegistrar implements SmartLifecycle {
1817

@@ -45,12 +44,7 @@ private ConsulRegistration getRegistration(GRpcServerInitializedEvent event) {
4544
String appName = "grpc-" + ConsulAutoRegistration.getAppName(consulProperties, applicationContext.getEnvironment());
4645
grpcService.setName(ConsulAutoRegistration.normalizeForDns(appName));
4746
grpcService.setId("grpc-" + ConsulAutoRegistration.getInstanceId(consulProperties, applicationContext));
48-
grpcService.setTags(ConsulAutoRegistration.createTags(consulProperties)
49-
.stream()
50-
.filter(t->!t.startsWith("secure="))
51-
.collect(Collectors.toList())
52-
);
53-
47+
grpcService.setTags(consulProperties.getTags());
5448

5549
if(consulProperties.isRegisterHealthCheck()) {
5650
GRpcConsulHealthCheck health = GRpcConsulHealthCheck.builder()

grpc-spring-boot-starter/src/main/java/org/lognet/springboot/grpc/security/jwt/JwtAuthProviderFactory.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package org.lognet.springboot.grpc.security.jwt;
22

3-
import net.minidev.json.JSONNavi;
4-
import net.minidev.json.JSONObject;
3+
4+
import com.nimbusds.jose.shaded.json.JSONNavi;
5+
import com.nimbusds.jose.shaded.json.JSONObject;
56
import org.springframework.security.core.GrantedAuthority;
67
import org.springframework.security.core.authority.SimpleGrantedAuthority;
78
import org.springframework.security.oauth2.jwt.JwtDecoder;
@@ -24,7 +25,8 @@ public static JwtAuthenticationProvider forRoles(JwtDecoder jwtDecoder){
2425
authenticationConverter.setJwtGrantedAuthoritiesConverter(jwt -> {
2526
final String claim = Optional.ofNullable(jwt.getClaimAsString("aud"))
2627
.orElse(jwt.getClaimAsString("azp"));
27-
Assert.hasText(claim,"Neither aud nor azp claims exist");
28+
Assert.hasText(claim,"Neither 'aud' nor 'azp' claims exist");
29+
2830
JSONObject resourceAccess = jwt.getClaim("resource_access");
2931

3032
final JSONNavi<?> roles = JSONNavi.newInstanceArray()

0 commit comments

Comments
 (0)