java web中resources路径

UserBean.class.getClassLoader().getResource(filePath).getPath()

或者

Thread.currentThread().getContextClassLoader().getResource(filepath).getPath();

 

posted on 2018-01-03 17:13  ..小树苗  阅读(798)  评论(0编辑  收藏  举报

导航