java 获取当前项目根目录地址 linux/windows通用

第一种

System.getProperty("user.dir")

第二种

this.getClass().getResource("/").getPath()

你可能感兴趣的:(后端,java)