How to reference reading resources external configuration files?How to reference the jar external configuration files?
Answered
How to reference reading resources external configuration files?
How to reference the jar external configuration files?


Because I want to change the config the configuration without having to recompile.
but if i simply mark "config" dir as resources root in IntelliJ IDEA, the "config" dir had to be contained in the device-job.jar file, That's not what I expected.because i dont want to frequent recompile the device-job.jar file because of i changed the property in the config file which in the "config" dir.
eclipse can do it ? why not idea2016?
Please sign in to leave a comment.
1. Please make sure to configure Spring properly in IntelliJ IDEA, see https://www.jetbrains.com/help/idea/2017.1/managing-file-sets.html?search=spring and related topics, otherwise all resolving will not work properly
2. If you really want to use relative path, it should work if you simply mark "config" dir as resources root in IntelliJ IDEA. For various ways of referencing resources see Spring documentation http://docs.spring.io/spring/docs/current/spring-framework-reference/html/resources.html
but if i simply mark "config" dir as resources root in IntelliJ IDEA, the "config" dir had to be contained in the device-job.jar file, That's not what I expected.because i dont want to frequent recompile the device-job.jar file because of i changed the property in the config file which in the "config" dir.
How do you deploy your application? Somehow the IDE has to know the runtime layout of your app to resolve things. You can also disable the inspection via Alt-Enter globally or just for this tag.
i use maven deploy my applicaton. I have a lot of configuration files.
i packaged some files in to the device-job.jar which i unfrequent change .
on the contrary, i packaged some need frequent chnaged files in "config" dir not in to the device-job.jar