【发布时间】:2018-09-07 12:51:06
【问题描述】:
根据属性文件定义 GroupId 和 ArtifactId
我想知道是否可以从 Eclipse 中动态设置 SpringBoot 应用程序中文件 application.properties 上的属性集的 GroupId 和 ArtifactId
因为从同一个项目中,我基于@Profile生成了2个不同的项目(核心项目和网络项目)
【问题讨论】:
-
欢迎来到 SO!为什么不直接将其添加到
pom.xml文件中?或者您可能要求动态设置组 ID 和工件 ID? -
您的项目结构听起来不正确恕我直言。为什么不将项目拆分为有效的 Web 和核心项目?否则请看这里stackoverflow.com/questions/29428275/…
-
您可以根据需要向 application.properties 添加任意数量的属性并使用这些属性,但 Spring 从 pom 中提取其 BuildProperties 值。
标签: spring eclipse maven spring-mvc spring-boot