
top.jfunc.common.propenv.DashStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils Show documentation
Show all versions of utils Show documentation
common utils like IOUtil,StrUtil,HoldProcessor.etc.
The newest version!
package top.jfunc.common.propenv;
import top.jfunc.common.utils.FileUtil;
import top.jfunc.common.utils.StrUtil;
/**
* ${fileName}-${env}.ext
* @author xiongshiyan at 2021/2/7 , contact me with email [email protected] or phone 15208384257
*/
public class DashStrategy implements EnvFileNameStrategy{
@Override
public String generate(String srcFileName, String env) {
if(StrUtil.isEmpty(env)){
return srcFileName;
}
return FileUtil.getFileNameNoEx(srcFileName) + "-" + env +
(srcFileName.contains(".") ? ("." + FileUtil.getExtensionName(srcFileName)) : "");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy