List of usage examples for org.springframework.core.io AbstractResource getFilename
@Override
@Nullable
public String getFilename()
From source file:org.bytesoft.bytejta.supports.springcloud.property.TransactionPropertySource.java
public TransactionPropertySource(String name, EncodedResource source) { super(name, source); EncodedResource encoded = (EncodedResource) this.getSource(); AbstractResource resource = (AbstractResource) encoded.getResource(); String path = resource.getFilename(); if (StringUtils.isBlank(path)) { return;// ww w .j ava 2 s. c o m } String[] values = path.split(":"); if (values.length != 2) { return; } String protocol = values[0]; String resName = values[1]; if ("bytejta".equalsIgnoreCase(protocol) == false) { return; } else if ("loadbalancer.config".equalsIgnoreCase(resName) == false) { return; } this.enabled = true; }