获取SRC目录

InputStream input=当前ClassName.class.getClassLoader().getResourceAsStream("hibernate.cfg.xml");

获取编译后的bin目录

String binPath=HibernateSessionFactory.class.getClass().getResource("/").getPath();  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2021-06-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2021-10-10
  • 2021-11-02
  • 2021-09-04
相关资源
相似解决方案