1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Merge pull request #993 from akiyamamioty/feature/add-validation-on-nameserver

add validation on nameServer
This commit is contained in:
format 2019-10-23 15:43:46 +08:00 committed by GitHub
commit 16e9494487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,21 +16,27 @@
package com.alibaba.cloud.stream.binder.rocketmq.properties;
import javax.validation.constraints.Pattern;
import com.alibaba.cloud.stream.binder.rocketmq.RocketMQBinderConstants;
import org.apache.rocketmq.common.MixAll;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
/**
* @author Timur Valiev
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
*/
@ConfigurationProperties(prefix = "spring.cloud.stream.rocketmq.binder")
@Validated
public class RocketMQBinderConfigurationProperties {
/**
* The name server for rocketMQ, formats: `host:port;host:port`.
*/
@Pattern(regexp = "^[\\d.:;]+$",
message = "nameServer needs to match expression \"host:port;host:port\"")
private String nameServer = RocketMQBinderConstants.DEFAULT_NAME_SERVER;
/**