I have to run mvn clean compile after making any change to the code in order to load database.properties file in resources folder. How do I solve this issue so that I don't have to delete target folder and run mvn clean compile to run the application? My project is a multi-module project and I am loading database properties from resources folder like this:
LOGGER.info("Loading database properties");
Properties properties = new Properties();
properties.load(AzureApp.class.getClassLoader().getResourceAsStream("database.properties"));
This was a classloader issue. Deleted .idea folder and target folders and restarted the ide and it got resolved!