【发布时间】:2018-11-15 16:22:13
【问题描述】:
我正在为我的项目使用 Spring Boot 应用程序。在其中一个项目中,我需要在 jar 根路径中包含一个 config.properties 文件。 enter image description here 因为在我的项目中,一个外部 jar 期望来自文件系统的这个属性文件,意味着项目的根路径。
propertieFile.load(new FileInputStream("config.properties"));
实际上我在 eclipse maven 项目中有这个属性文件,但是在构建时它被忽略了。 enter image description here 你们中的任何一个都可以帮忙吗?提前致谢。
【问题讨论】:
-
照常放入src/main/resources...
标签: maven maven-plugin spring-boot-maven-plugin maven-resources-plugin maven-jar-plugin