@JsonIgnore
	public List<String> getValidField() {
		return Arrays
				.stream(this.getClass().getDeclaredFields())
				.filter(field -> !field.isSynthetic())
				.map(field -> {
					try {
						if (!ObjectUtils.isEmpty(field.get(this))) {
							return field.getName();
						}
					}
					catch (IllegalAccessException e) {
						// won't happen
					}
					return null;
				})
				.filter(Objects::nonNull)
				.collect(Collectors.toList());
	}
Using By ConfigurationProperties.

@author <a href="mailto:fangjian0423@gmail.com">Jim</a>
@see NacosDataSourceProperties
@see ApolloDataSourceProperties
@see ZookeeperDataSourceProperties
@see FileDataSourceProperties
@see RedisDataSourceProperties
@see ConsulDataSourceProperties
spring-cloud-alibaba-starters/spring-cloud-alibaba-sentinel-datasource/src/main/java/com/alibaba/cloud/sentinel/datasource/config/DataSourcePropertiesConfiguration.java