application.yml文件中配置路径的各种结果

    @Value("${pfx}")
    private String pfxPath;

    File file = new File(pfxPath);
    log.info("pfxPath value " + pfxPath);
    log.info("file.getPath()" + file.getPath());
    log.info("file.getAbsolutePath()" + file.getAbsolutePath());

 

 

原文地址:https://www.cnblogs.com/woyujiezhen/p/13575902.html