How to create a Spring Boot test that runs with specific JVM arguments
问题 I want a to create a test for my spring boot application that uses specific JVM arguments, I want the JVM arguments to be used with only this test. Is this possible ? My goal is to set up a proxy for just one test, so if there is another approach to achieve that, please suggest it. 回答1: I solved this by adding a static bloc in the class and setting the system properties: static { System.setProperty("http.proxyHost", "myproxyserver.com"); System.setProperty("http.proxyPort", "80"); System