Intellij (Spring boot) isn't able to pass environments variables when I made run (Macbook Apple silicon).

已回答

I have a MacBook with an Apple silicon chip, I made a clone for the repo and built the project, and everything works fine.

But When I open Run/Debug Configurations, Add a new configuration using Gradle and make a run.

 

That will happen.
Could not resolve placeholder 'ENVIRONMENT' in value "${ENVIRONMENT}.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':edge-operator-mobile-service:bootRun'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1.


I tried to set the environment variable in application.properties the error was gone but a new error occurred.

NoSuchFileException: edge-operator-mobile-service/conf/dev.properties

Notice that the file exists with the correct path but the IDEA shows me an error.

The JDK version is 1.8 oracle. 
The gradle distribution of the project is gradle-4.6-all.

Has anyone faced the same issue before?



 

 

 

0

Hello,

I couldn't reproduce the issue on my side. Is it possible to share sample project example for investigation?

0

请先登录再写评论。