use of com.baidu.disconf.client.DisconfMgrBean in project disconf-spring-boot-starter by xjzrc.
the class DisconfAutoConfiguration method disconfMgrBean.
/**
* 设置扫描包路径
* 初始化DisconfMgrBean
*
* @return DisconfMgrBean
*/
@Bean(destroyMethod = "destroy")
public DisconfMgrBean disconfMgrBean() {
DisconfMgrBean disconfMgrBean = new DisconfMgrBean();
if (StringUtils.isBlank(disconfProperties.getScanPackage())) {
LOGGER.error("disconf scan package is null!, please set the value in application.properties. (spring.disconf.scan-package=com.zen)");
throw new RuntimeException("disconf scan package is null!, please set the value in application.properties. (spring.disconf.scan-package=com.zen)");
}
disconfMgrBean.setScanPackage(disconfProperties.getScanPackage());
return disconfMgrBean;
}
Aggregations