Set System Property for JUnit Runner (Eclipse) to test a Spring Web App

后端 未结 3 1683
情深已故
情深已故 2021-02-07 02:26

Our web app uses SystemPropertyPlaceholder to load property files depending on the value of a system property (see below)

The default setup for running it locally is sto

3条回答
  •  清酒与你
    2021-02-07 03:15

    I am working on exactly the same problem now and hopefully found the way. You can call System.setProperty() into the static initializer of your test case.

提交回复
热议问题