Skip to content

Commit 752bcc9

Browse files
committed
Removed unused logger, client docs changes
1 parent 23d9dfe commit 752bcc9

File tree

3 files changed

+24
-31
lines changed

3 files changed

+24
-31
lines changed

docs/en/client/configuration.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,10 @@ the channels, stubs and other components without losing the features provided by
119119

120120
### GrpcClientBean
121121

122-
This should significantly help with ``@Autowire`` and ``@Qualifier`` because default annotation``@GrpcClient`` is
123-
not designed for usage with spring 'injection' annotations.
124-
``@GrpcClientBean`` require annotation ``@Cofiguration`` or inherited, for example ``@TestConfiguraiton``.
125-
It is definitely not recommended using ``@GrpcClientBean`` and field annotated with ``@GrpcClient`` for same
126-
configuration class, but it`s still possible.
122+
This should significantly help with `@Autowire` and `@Qualifier` because default annotation `@GrpcClient` is
123+
not designed for usage with spring 'injection' annotations. `@GrpcClientBean` require annotation `@Cofiguration`.
124+
It is definitely not recommended using `@GrpcClientBean` and field annotated with `@GrpcClient` for same
125+
configuration class, but it's still possible.
127126

128127
````java
129128
@Configuration
@@ -135,7 +134,7 @@ configuration class, but it`s still possible.
135134
public static class YourCustomConfiguration {
136135

137136
@Bean
138-
FoobarService(@Autowired TestServiceGrpc.TestServiceBlockingStub blockingStub) {
137+
FoobarService foobarService(@Autowired TestServiceGrpc.TestServiceBlockingStub blockingStub) {
139138
return new FoobarService(blockingStub);
140139
}
141140
}
@@ -151,31 +150,30 @@ public class FoobarService {
151150
.build();
152151
return blockingStub.sayHello(request).getMessage();
153152
}
154-
155153
}
156154
````
157155

158156
### GrpcClientBeans
159157

160-
``@GrpcClientBeans`` designed for registration multiple stubs to the spring context from single configuration class.
158+
`@GrpcClientBeans` designed for registration multiple stubs to the spring context from single configuration class.
161159

162160
````java
163-
@Configuration
164-
@GrpcClientBeans(value = {
165-
@GrpcClientBean(
166-
clazz = TestServiceGrpc.TestServiceBlockingStub.class,
167-
beanName = "blockingStub",
168-
client = @GrpcClient("test")),
169-
@GrpcClientBean(
170-
clazz = TestServiceGrpc.FactoryMethodAccessibleStub.class,
171-
beanName = "accessibleStub",
172-
client = @GrpcClient("test"))
173-
})
174-
public static class YourCustomConfiguration {
161+
@Configuration
162+
@GrpcClientBeans(value = {
163+
@GrpcClientBean(
164+
clazz = TestServiceGrpc.TestServiceBlockingStub.class,
165+
beanName = "blockingStub",
166+
client = @GrpcClient("test")),
167+
@GrpcClientBean(
168+
clazz = TestServiceGrpc.FactoryMethodAccessibleStub.class,
169+
beanName = "accessibleStub",
170+
client = @GrpcClient("test"))
171+
})
172+
public static class YourCustomConfiguration {
175173

176174
@Bean
177-
FoobarService(@Autowired TestServiceGrpc.TestServiceBlockingStub blockingStub,
178-
@Autowired TestServiceGrpc.FactoryMethodAccessibleStub accessibleStub) {
175+
FoobarService foobarService(@Autowired TestServiceGrpc.TestServiceBlockingStub blockingStub,
176+
@Autowired TestServiceGrpc.FactoryMethodAccessibleStub accessibleStub) {
179177
return new FoobarService(blockingStub, accessibleStub);
180178
}
181179
}
@@ -200,7 +198,6 @@ public class FoobarService {
200198
.build();
201199
return accessibleStub.sayHi(request).getMessage();
202200
}
203-
204201
}
205202
````
206203

docs/en/client/getting-started.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,8 @@ If you don't wish to use any advanced features, then the first element is probab
112112
`ApplicationStartedEvent`. Stubs connecting to services outside of the application can be used earlier; starting with
113113
`@PostConstruct` / `InitializingBean#afterPropertiesSet()`.
114114
- [`@GrpcClientBean`](https://javadoc.io/page/net.devh/grpc-client-spring-boot-autoconfigure/latest/net/devh/boot/grpc/client/inject/GrpcClientBean.html):
115-
The annotation should help with registration ``@GrpcClient`` to the spring context for usage with ``@Autowire`` and
116-
``@Qualifier``, required annotation ``@Configuration`` or inherited, for example ``@TestConfiguration``.
117-
- [`@GrpcClientBeans`](https://javadoc.io/page/net.devh/grpc-client-spring-boot-autoconfigure/latest/net/devh/boot/grpc/client/inject/GrpcClientBeans.html):
118-
The annotation should help with multiple registration ``@GrpcClient`` to the spring context.
115+
The annotation should help with registration `@GrpcClient` to the spring context for usage with `@Autowire` and
116+
`@Qualifier`, required annotation `@Configuration`. Also, this annotation is repeatable using `@GrpcClientBeans`.
119117
- [`Channel`](https://javadoc.io/page/io.grpc/grpc-all/latest/io/grpc/Channel.html):
120118
The Channel is a connection pool for a single address. The target servers might serve multiple grpc-services though.
121119
The address will be resolved using a `NameResolver` and might point to a fixed or dynamic number of servers.
@@ -184,7 +182,7 @@ Also you can feel free to inject stub with ``@GrpcClientBean`` with ``@Configura
184182
another services.
185183

186184
> **Note:** It is definitely not recommended using ``@GrpcClientBean`` and field annotated with ``@GrpcClient`` like in
187-
> the first example for same configuration class, but it`s still possible.
185+
> the previous example for same configuration class, but it`s still possible.
188186
189187
````java
190188
@Configuration
@@ -196,7 +194,7 @@ another services.
196194
public static class YourCustomConfiguration {
197195

198196
@Bean
199-
FoobarService(@Autowired TestServiceGrpc.TestServiceBlockingStub blockingStub) {
197+
FoobarService foobarService(@Autowired TestServiceGrpc.TestServiceBlockingStub blockingStub) {
200198
return new FoobarService(blockingStub);
201199
}
202200
}

grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientBeanPostProcessor.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import io.grpc.Channel;
4545
import io.grpc.ClientInterceptor;
4646
import io.grpc.stub.AbstractStub;
47-
import lombok.extern.slf4j.Slf4j;
4847
import net.devh.boot.grpc.client.channelfactory.GrpcChannelFactory;
4948
import net.devh.boot.grpc.client.nameresolver.NameResolverRegistration;
5049
import net.devh.boot.grpc.client.stubfactory.FallbackStubFactory;
@@ -57,7 +56,6 @@
5756
* @author Michael ([email protected])
5857
* @author Daniel Theuke ([email protected])
5958
*/
60-
@Slf4j
6159
public class GrpcClientBeanPostProcessor implements BeanPostProcessor {
6260

6361
private final ApplicationContext applicationContext;

0 commit comments

Comments
 (0)