0
点赞
收藏
分享

微信扫一扫

spring mvc 项目 系统在那个的相对路径

mjjackey 2023-04-12 阅读 86


String realPath= ContextLoader.getCurrentWebApplicationContext().getServletContext().getRealPath("/WEB-INF/spring/config.properties") ;
         Properties props=new Properties();
         try {
            props.load(new FileInputStream(realPath));
            realPath=props.getProperty(Constantsw.UPLOAD_PATH);


举报

相关推荐

0 条评论