org.zodiac.autoconfigure.netty2.EnableNettyRpcClients Maven / Gradle / Ivy
package org.zodiac.autoconfigure.netty2;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;
import org.zodiac.autoconfigure.netty2.client.NettyRpcClientBeanDefinitionRegistrar;
import org.zodiac.netty.springboot2.client.NettyRpcLoadBalanced;
import org.zodiac.netty.springboot2.client.NettyRpcRequest;
import java.lang.annotation.*;
/**
* Enable embedded Rpc client protocol.
* The following functions will be enabled.
*
*
* - PPC client protocol. {@link NettyRpcClientBeanDefinitionRegistrar}
*
*
*
* You must implement the interface. Returns ip address of the server. {@link NettyRpcLoadBalanced#chooseAddress(NettyRpcRequest)}
*
* @see NettyServerProperties
* @see org.zodiac.netty.springboot2.client.NettyRpcLoadBalanced#chooseAddress(NettyRpcRequest)
* @see org.zodiac.autoconfigure.netty2.client.NettyRpcClientBeanDefinitionRegistrar
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import(value = {NettyRpcClientBeanDefinitionRegistrar.class})
@EnableConfigurationProperties(value = {NettyServerProperties.class})
public @interface EnableNettyRpcClients {
String[] value() default {};
String[] basePackages() default {};
}