I have the following code...
@Service
public class PropertiesService {
...
@Value("external.config.active") private String useExternalConfig
So in intellij I set the VM Options to...
-Dexternal.config.active=true
But when I debug in the application this.useExternalConfig.equals("external.config.active") is true.
What do I have to do to set a Spring property in the run configuration for IJ
Update I see it being supplied in the java command...
/.../java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53192,suspend=y,server=n -Dexternal.config.active=true -javaagent:/.../Caches/IdeaIC2018.1/groovyHotSwap/gragent.jar -javaagent:/.../Caches/IdeaIC2018.1/captureAgent/debugger-agent.jar=file:/private/var/folders/3d/5f6dvvs573zg3ydvxbd0b0h40000gn/T/capture2.props -Dfile.encoding=UTF-8 -classpath
spring-boot:run -Dspring.profiles.active=devand it works - dgarceran