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

mjjackey

关注

阅读 88

2023-04-12


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)

0 0 举报