Reputation: 2762
I put my config.properties file in src/test/resources/config.properties at intellij IDE.
When i initiaze this code
@Config.Sources({"classpath:config.properties"})
public interface PropertiesManager extends Config {
It cannot be found the file but the file is located at target/test-classes/config.properties. It just cannot find the file.
How to declare properly. Thanks. Please help.
Upvotes: -1
Views: 325
Reputation: 370
I have same scenario running fine: when you instantiate your config in test, then using properties file from test/resource folter is fine. So you should troubleshoot you build tool like maven or gradle: Why you tests do not find test resources.
Upvotes: 0