Skip to content

Commit ebdebbb

Browse files
committed
Rename HttpServiceGroups to ImportHttpServiceGroups
See gh-33992
1 parent 779f1b0 commit ebdebbb

File tree

10 files changed

+18
-11
lines changed

10 files changed

+18
-11
lines changed

Diff for: spring-web/src/main/java/org/springframework/web/service/registry/AbstractHttpServiceRegistrar.java

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
*
6969
* @author Rossen Stoyanchev
7070
* @author Phillip Webb
71+
* @author Olga Maciaszek-Sharma
7172
* @since 7.0
7273
* @see ImportHttpServices
7374
* @see HttpServiceProxyRegistryFactoryBean

Diff for: spring-web/src/main/java/org/springframework/web/service/registry/AnnotationHttpServiceRegistrar.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@
2525
* to determine the HTTP services and groups to register.
2626
*
2727
* @author Rossen Stoyanchev
28+
* @author Phillip Webb
29+
* @author Olga Maciaszek-Sharma
2830
* @since 7.0
2931
*/
3032
class AnnotationHttpServiceRegistrar extends AbstractHttpServiceRegistrar {
3133

3234
@Override
3335
protected void registerHttpServices(GroupRegistry registry, AnnotationMetadata importMetadata) {
3436

35-
MergedAnnotation<?> groupsAnnot = importMetadata.getAnnotations().get(HttpServiceGroups.class);
37+
MergedAnnotation<?> groupsAnnot = importMetadata.getAnnotations().get(ImportHttpServiceGroups.class);
3638
if (groupsAnnot.isPresent()) {
3739
HttpServiceGroup.ClientType clientType = groupsAnnot.getEnum("clientType", HttpServiceGroup.ClientType.class);
3840
for (MergedAnnotation<?> annot : groupsAnnot.getAnnotationArray("value", ImportHttpServices.class)) {

Diff for: spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceGroup.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
* {@link org.springframework.web.service.invoker.HttpServiceProxyFactory} and
2424
* HTTP client setup.
2525
*
26-
* @author Olga Maciaszek-Sharma
2726
* @author Rossen Stoyanchev
27+
* @author Olga Maciaszek-Sharma
2828
* @since 7.0
2929
*/
3030
public interface HttpServiceGroup {
@@ -70,7 +70,7 @@ enum ClientType {
7070
/**
7171
* Not specified, falling back on a default.
7272
* @see ImportHttpServices#clientType()
73-
* @see HttpServiceGroups#clientType()
73+
* @see ImportHttpServiceGroups#clientType()
7474
* @see AbstractHttpServiceRegistrar#setDefaultClientType
7575
*/
7676
UNSPECIFIED;

Diff for: spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceGroupConfigurer.java

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* Callback to configure the set of declared {@link HttpServiceGroup}s.
2727
*
2828
* @author Rossen Stoyanchev
29+
* @author Olga Maciaszek-Sharma
2930
* @since 7.0
3031
* @param <CB> the type of client builder, i.e. {@code RestClient} or {@code WebClient} builder.
3132
*/

Diff for: spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceProxyRegistry.java

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* A registry that contains HTTP Service client proxies.
2323
*
2424
* @author Rossen Stoyanchev
25+
* @author Olga Maciaszek-Sharma
2526
* @since 7.0
2627
* @see ImportHttpServices
2728
* @see HttpServiceProxyRegistryFactoryBean

Diff for: spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceProxyRegistryFactoryBean.java

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
*
5353
* @author Rossen Stoyanchev
5454
* @author Phillip Webb
55+
* @author Olga Maciaszek-Sharma
5556
* @since 7.0
5657
* @see AbstractHttpServiceRegistrar
5758
*/

Diff for: spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceGroups.java renamed to spring-web/src/main/java/org/springframework/web/service/registry/ImportHttpServiceGroups.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@
3232
* may be used to set the {@link #clientType()} and that would be inherited by
3333
* all nested annotations.
3434
*
35+
* @author Olga Maciaszek-Sharma
3536
* @author Rossen Stoyanchev
3637
* @since 7.0
3738
*/
3839
@Target(ElementType.TYPE)
3940
@Retention(RetentionPolicy.RUNTIME)
4041
@Documented
4142
@Import(AnnotationHttpServiceRegistrar.class)
42-
public @interface HttpServiceGroups {
43+
public @interface ImportHttpServiceGroups {
4344

4445
/**
4546
* Alias for {@link #groups()}.

Diff for: spring-web/src/main/java/org/springframework/web/service/registry/ImportHttpServices.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646
* @author Olga Maciaszek-Sharma
4747
* @author Rossen Stoyanchev
4848
* @since 7.0
49-
* @see HttpServiceGroups
49+
* @see ImportHttpServiceGroups
5050
* @see AbstractHttpServiceRegistrar
5151
*/
5252
@Retention(RetentionPolicy.RUNTIME)
5353
@Target(ElementType.TYPE)
54-
@Repeatable(HttpServiceGroups.class)
54+
@Repeatable(ImportHttpServiceGroups.class)
5555
@Import(AnnotationHttpServiceRegistrar.class)
5656
@Documented
5757
public @interface ImportHttpServices {

Diff for: spring-web/src/test/java/org/springframework/web/service/registry/AnnotationHttpServiceRegistrarTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private static class ListingConfig {
9797
private static class ScanConfig {
9898
}
9999

100-
@HttpServiceGroups(clientType = ClientType.WEB_CLIENT, groups = {
100+
@ImportHttpServiceGroups(clientType = ClientType.WEB_CLIENT, groups = {
101101
@ImportHttpServices(group = ECHO_GROUP, types = {EchoA.class}),
102102
@ImportHttpServices(group = GREETING_GROUP, types = {GreetingA.class})
103103
})

Diff for: spring-webflux/src/test/java/org/springframework/web/reactive/function/client/support/WebClientProxyRegistryIntegrationTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
import org.springframework.web.reactive.function.client.support.greeting.GreetingB;
3838
import org.springframework.web.service.registry.AbstractHttpServiceRegistrar;
3939
import org.springframework.web.service.registry.HttpServiceGroup.ClientType;
40-
import org.springframework.web.service.registry.HttpServiceGroups;
41-
import org.springframework.web.service.registry.HttpServiceProxyRegistry;
4240
import org.springframework.web.service.registry.ImportHttpServices;
41+
import org.springframework.web.service.registry.ImportHttpServiceGroups;
42+
import org.springframework.web.service.registry.HttpServiceProxyRegistry;
4343

4444
import static org.assertj.core.api.Assertions.assertThat;
4545

@@ -126,7 +126,7 @@ public WebClientHttpServiceGroupConfigurer groupConfigurer() {
126126

127127

128128
@Configuration(proxyBeanMethods = false)
129-
@HttpServiceGroups(clientType = ClientType.WEB_CLIENT, groups = {
129+
@ImportHttpServiceGroups(clientType = ClientType.WEB_CLIENT, groups = {
130130
@ImportHttpServices(group = "echo", types = {EchoA.class, EchoB.class}),
131131
@ImportHttpServices(group = "greeting", types = {GreetingA.class, GreetingB.class})
132132
})
@@ -135,7 +135,7 @@ private static class ListingConfig extends BaseEchoConfig {
135135

136136

137137
@Configuration(proxyBeanMethods = false)
138-
@HttpServiceGroups(clientType = ClientType.WEB_CLIENT, groups = {
138+
@ImportHttpServiceGroups(clientType = ClientType.WEB_CLIENT, groups = {
139139
@ImportHttpServices(group = "echo", basePackageClasses = EchoA.class),
140140
@ImportHttpServices(group = "greeting", basePackageClasses = GreetingA.class)
141141
})

0 commit comments

Comments
 (0)