简体   繁体   中英

IntelliJ Idea 2016.1 does not read application properties

I have a spring boot project that compiles and works fine when i run it from 2015.3 IDE but not from 2016.1, it crashes at startup but it is because the configuration seems to be broken. What i have found is the following:

  • it seems that from within the ide 2016 the application.properties file is not honoured, i can see in the app logs that the profile is not set, while an active profile is actually sets in the aforementioned file
  • i can rebuild the project without problems
  • the compiled jar works if invoked from command line
  • the application.properties is in the src/main/resources folder (which is marked as a resource folder)
  • the very same project works (always had) if i run it from 2015 IDEA

PS i am running the IDE on linux 64bit with oracle jdk 1.8.0.u77

I had the same problem. My colleague found workaround, where you need to switch from Gradle wrapper to use local installation of Gradle.

Also full rebuild is needed probably.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM