
org.jsmart.zerocode.zerocodejavaexec.utils.HostConfigs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-testing Show documentation
Show all versions of http-testing Show documentation
How to use zerocode in your project
The newest version!
package org.jsmart.zerocode.zerocodejavaexec.utils;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import java.util.HashMap;
import java.util.Map;
import static org.slf4j.LoggerFactory.getLogger;
public class HostConfigs {
private static final org.slf4j.Logger LOGGER = getLogger(HostConfigs.class);
public static final String NEW_API_HOST = "new_api_host";
@Inject(optional = true)
@Named(NEW_API_HOST)
private String newApiHost;
// -----------------------------------------------------------
// You can @Inject any property from the config here via
// @Named("property key name from config file") as shown above
// -----------------------------------------------------------
public Map readProperties(String optionalString) {
Map propertiesMap = new HashMap<>();
propertiesMap.put(NEW_API_HOST, newApiHost);
return propertiesMap;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy