Skip to content

Commit 0d8b452

Browse files
authored
Improve README.adoc indentations (#358)
Merge pull request #358 * Improve README.adoc indentations [skip ci]
1 parent d646b89 commit 0d8b452

File tree

1 file changed

+34
-41
lines changed

1 file changed

+34
-41
lines changed

README.adoc

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,22 @@ Make sure to check out the link:./grpc-spring-boot-starter-gradle-plugin/README.
3333
[source,groovy]
3434
----
3535
repositories {
36-
mavenCentral()
37-
//maven { url "https://oss.sonatype.org/content/repositories/snapshots" } //for snapshot builds
38-
36+
mavenCentral()
37+
// maven { url "https://oss.sonatype.org/content/repositories/snapshots" } // for snapshot builds
3938
}
4039
dependencies {
41-
compile 'io.github.lognet:grpc-spring-boot-starter:5.1.1'
40+
compile 'io.github.lognet:grpc-spring-boot-starter:5.1.1'
4241
}
43-
44-
4542
----
4643

4744
By default, starter pulls `io.grpc:grpc-netty-shaded` as transitive dependency, if you are forced to use pure `grpc-netty` dependency:
4845

4946
[source,groovy]
5047
----
51-
compile ('io.github.lognet:grpc-spring-boot-starter:5.1.1') {
48+
compile ('io.github.lognet:grpc-spring-boot-starter:5.1.1') {
5249
exclude group: 'io.grpc', module: 'grpc-netty-shaded'
53-
}
54-
compile 'io.grpc:grpc-netty:1.54.1' // <1>
50+
}
51+
compile 'io.grpc:grpc-netty:1.54.1' // <1>
5552
----
5653
<1> Make sure to pull the version that matches the release.
5754

@@ -63,11 +60,11 @@ In this case you'll need to forcibly and explicitly set the `grpc` version to
6360
[source,groovy]
6461
----
6562
configurations.all {
66-
resolutionStrategy.eachDependency { details ->
63+
resolutionStrategy.eachDependency { details ->
6764
if ("io.grpc".equalsIgnoreCase(details.requested.group)) {
68-
details.useVersion "1.54.1"
69-
}
65+
details.useVersion "1.54.1"
7066
}
67+
}
7168
}
7269
----
7370

@@ -465,10 +462,10 @@ integrates SalesForce's https://github.com/salesforce/reactive-grpc[reactive-grp
465462
----
466463
import org.lognet.springboot.grpc.gradle.ReactiveFeature
467464
plugins {
468-
id "io.github.lognet.grpc-spring-boot"
465+
id "io.github.lognet.grpc-spring-boot"
469466
}
470467
grpcSpringBoot {
471-
reactiveFeature.set(ReactiveFeature.REACTOR) // or ReactiveFeature.RX
468+
reactiveFeature.set(ReactiveFeature.REACTOR) // or ReactiveFeature.RX
472469
}
473470
----
474471

@@ -539,11 +536,11 @@ public class HelloService extends GreeterGrpc.GreeterImplBase{
539536
...
540537
throw new GRpcRuntimeExceptionWrapper(new SomeException()) ; // <1>
541538
//or
542-
throw new GRpcRuntimeExceptionWrapper(new SomeException(),"myHint");// <2>
539+
throw new GRpcRuntimeExceptionWrapper(new SomeException(), "myHint");// <2>
543540
//or
544-
throw new SomeRuntimeException(); //<3>
541+
throw new SomeRuntimeException(); //<3>
545542
}
546-
@GRpcExceptionHandler
543+
@GRpcExceptionHandler
547544
public Status privateHandler (SomeException npe,GRpcExceptionScope scope){
548545
// INVOKED when thrown from HelloService service
549546
String myHint = scope.getHintAs(String.class); // <4>
@@ -601,24 +598,21 @@ If your gRPC method uses the same request and response message type, you can use
601598
----
602599
...
603600
<getter name="someField">
604-
605-
<!--should be empty for request message-->
606-
<constraint annotation="javax.validation.constraints.Size">
607-
<groups>
608-
<value>org.lognet.springboot.grpc.validation.group.RequestMessage</value> <1>
609-
</groups>
610-
<element name="min">0</element>
611-
<element name="max">0</element>
612-
613-
</constraint>
614-
615-
<!--should NOT be empty for response message-->
616-
<constraint annotation="javax.validation.constraints.NotEmpty">
617-
<groups>
618-
<value>org.lognet.springboot.grpc.validation.group.ResponseMessage</value> <2>
619-
</groups>
620-
</constraint>
621-
</getter>
601+
<!--should be empty for request message-->
602+
<constraint annotation="javax.validation.constraints.Size">
603+
<groups>
604+
<value>org.lognet.springboot.grpc.validation.group.RequestMessage</value> <1>
605+
</groups>
606+
<element name="min">0</element>
607+
<element name="max">0</element>
608+
</constraint>
609+
<!--should NOT be empty for response message-->
610+
<constraint annotation="javax.validation.constraints.NotEmpty">
611+
<groups>
612+
<value>org.lognet.springboot.grpc.validation.group.ResponseMessage</value> <2>
613+
</groups>
614+
</constraint>
615+
</getter>
622616
...
623617
----
624618
<1> Apply this constraint only for `request` message
@@ -629,12 +623,11 @@ Note also custom cross-field link:grpc-spring-boot-starter-demo/src/main/java/or
629623

630624
[source,xml]
631625
----
632-
<bean class="io.grpc.examples.GreeterOuterClass$Person">
633-
<class>
634-
<constraint annotation="org.lognet.springboot.grpc.demo.PersonConstraint"/>
635-
</class>
636-
...
637-
626+
<bean class="io.grpc.examples.GreeterOuterClass$Person">
627+
<class>
628+
<constraint annotation="org.lognet.springboot.grpc.demo.PersonConstraint"/>
629+
</class>
630+
<!-- ... -->
638631
</bean>
639632
----
640633

0 commit comments

Comments
 (0)